n8n

How to Generate OpenAI n8n Workflow Documentation?

Build a live docs site for your automations. Teams can view, auto generate, edit, and save workflow pages in one place. Great for keeping internal knowledge current without extra tools.

The system exposes webhook URLs that serve HTML and Markdown. It pulls all workflows and tags from the n8n API, sorts them, and builds a clean table and a left menu. When a page is missing, it uses OpenAI to draft a clear doc and a Mermaid diagram from real node data. A simple browser editor lets anyone update text and save it back to a folder on your server, with instant preview. Files are read, written, and created as needed, and every route returns either HTML or Markdown on demand.

Setup needs an OpenAI API key and a writable docs folder. For cloud or self hosted, set the instance URL so links work. Expect faster documentation work and better visibility across automations. Ideal for IT and ops teams that manage many workflows and need a simple way to keep docs fresh.

What are the key features?

  • Webhook endpoints serve main site, single pages, editor, and save actions.
  • Pull all workflows and tags via n8n API and sort by last update.
  • Build Markdown tables for the instance overview and tag filters.
  • Read and write Markdown files to a chosen project folder with auto create if missing.
  • Detect missing pages and generate content with OpenAI using a structured parser.
  • Create Mermaid charts from node data for quick visual maps.
  • Show a live Markdown editor with preview and simple Save or Cancel options.
  • Return clean HTML or Markdown responses with correct headers.

What are the benefits?

  • Reduce manual documentation from hours to minutes with AI drafted pages
  • Keep an always up to date index of all workflows and tags
  • Let teammates edit docs in the browser and save with one click
  • Improve accuracy by generating docs from real workflow data
  • Support visual understanding with Mermaid diagrams of flows

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with OpenAI and n8n. See the Tools Required section above for links to create accounts with these services.
  3. In the n8n credentials manager, create an OpenAI credential: double click the OpenAI Chat Model node, open the Credential to connect with dropdown, click Create new credential, then paste your OpenAI API key from your OpenAI account API page and save.
  4. In the n8n credentials manager, create an n8n API credential: double click each n8n API node, click Create new credential, set the Base URL to your n8n instance URL, create a Personal Access Token in your n8n user settings, paste the token, and save.
  5. Open the CONFIG node and set project_path to a writable folder that n8n can access. On self hosted, make sure the folder exists or allow the workflow to create it.
  6. In the CONFIG node, set the instance URL so links to each workflow open correctly. On self hosted, confirm N8N_PROTOCOL and N8N_HOST environment variables match your public URL.
  7. Copy the production webhook URLs from the docs routes. Use the main URL for the site home and the single page URL for viewing or editing a workflow page.
  8. Test the index: open the main page URL in your browser. You should see a table of workflows and a tag list. If empty, confirm the n8n API credential works and that your user can read workflows.
  9. Test page generation: request a docs page that does not exist. Check that a draft is created by OpenAI and that a Mermaid diagram renders. If generation fails, confirm the OpenAI credential and model settings.
  10. Test editing and saving: open a page in the editor, make a small change, and click Save. Verify a Markdown file is written to the project_path. If save fails, fix folder permissions or path.
  11. Optional security note: the save route has no authentication. Protect these endpoints with IP allow lists, a reverse proxy rule, or run inside a private network.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

OpenAI

Sign up

Pay-as-you-go: GPT-5 at $1.25 per 1M input tokens and $10 per 1M output tokens

n8n API

Sign up

Community Edition (self-hosted): $0 (public REST API available). Cloud Starter: $20 / mo billed annually ($24 monthly); API unavailable during free trial.

Credits:
Ted's Tech Talks

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.