Automated Technical Documentation Generation using AI - n8n Workflow

Generate professional, structured documentation for any n8n workflow automatically using GPT-4o-mini. This specialized n8n template uses custom code and AI to create accurate sticky notes for every n8n node.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

A Markdown-formatted string containing a bulleted list.
n8n Automation Specialists who build complex n8n workflow templates.
Technical Writers needing to quickly document n8n processes.
Teams requiring consistent, standardized documentation embedded directly within their n8n workflows.
Users looking for advanced examples of how to combine custom code and AI in an n8n workflow.

Overview

Maintaining documentation for complex n8n workflows can be time-consuming. This specialized n8n workflow solves this problem by automating the generation of high-quality, structured sticky notes for every element in a target n8n template.

It utilizes the power of gpt-4o-mini to analyze the configuration of each n8n node, crafting clear explanations, key parameter details, and validation tips. The automation handles the entire process: loading the target n8n workflow, parsing the JSON, generating the notes, calculating an organized layout (RTL), and saving the finished, fully documented n8n workflow back to disk. This is a critical n8n tool for scaling documentation efforts.

How it Works

A step-by-step breakdown of this powerful n8n workflow:


  1. Trigger and Context Setting: The n8n workflow is started using the When clicking โ€˜Execute workflowโ€™ n8n trigger. A subsequent Set n8n node (Your Workflow Description) provides general context about the workflow being documented to the AI.

  2. Workflow Loading: The load workflow n8n node reads the target workflow JSON file from the defined path.

  3. Parsing and Filtering: The Parse Workflow n8n node (Code) validates the input structure, filters out any existing stickyNote nodes, and creates an array of 'real' n8n nodes ready for documentation.

  4. Overall Documentation: The Overall Sticky Note (OpenAI) n8n node receives a summary of the n8n workflow structure and uses the LLM to generate a high-level overview note. This content is prepared for final assembly.

  5. Per-Node Documentation: The filtered nodes are split into individual items (Split Out Items), and each item is passed to the Node Sticky Notes (OpenAI) n8n node. This node uses a specialized prompt to analyze the JSON configuration of that single n8n node and generate a detailed documentation sticky note draft.

  6. Layout Calculation: The Layout Blocks RTL (Code) n8n node takes the newly generated sticky note content and the original n8n node data. It calculates optimized positions, ensuring the sticky note is placed beneath its corresponding n8n node in a readable, right-to-left layout. It also registers new positions for the original nodes.

  7. Final Assembly: All componentsโ€”the original workflow, the new node positions, the overall overview sticky note content, and the per-node sticky notesโ€”are merged (Merge1, Merge2). The Assemble Workflow (Code) node integrates these parts, ensuring clean removal of old stickies and correct positioning of all elements in the final documented n8n workflow JSON.

  8. Saving Output: The final documented n8n workflow is saved as a new JSON file using the Save documented Workflow n8n node.

Installation Guide

A Markdown-formatted string explaining the installation and credential setup.

๐Ÿš€ Installation Guide


  1. Import the n8n workflow: Copy the provided JSON code and import it into your n8n instance via the Workflows section (Import from JSON).

  2. OpenAI Credentials: This n8n workflow requires an OpenAI credential setup.

Click on the Overall Sticky Note and Node Sticky Notes nodes.
In the Credentials section, select or create a new 'OpenAI API' credential.
Input your OpenAI API Key.

  1. File Path Configuration: You must configure the paths to read and write the workflow JSON files:

Update the load workflow (Read/Write File) n8n node parameter File Selector to point to the workflow JSON file you wish to document (e.g., /home/user/myproject/targetworkflow.json).
* Update the Save documented Workflow (Read/Write File) n8n node parameter File Name to specify the location where the documented output will be saved (e.g., /home/user/myproject/documentedworkflow.json).

  1. Execute: Click 'Execute workflow' to run the automation and generate the documented output.

Node Details

A Markdown-formatted string listing key nodes.

When clicking โ€˜Execute workflowโ€™ (Manual Trigger)
Function: Acts as the starting n8n trigger for manual execution, initiating the entire documentation process.
Key Configuration: None, it is a simple n8n trigger.

load workflow (Read/Write File)
Function: Loads the raw JSON file of the target n8n workflow that needs documentation.
Key Configuration: File Selector must be updated to the target workflow's file path.

Parse Workflow (Code)
Function: Custom logic to handle various JSON wrapping formats, filter out existing stickyNote n8n node types, and prepare a clean array of real nodes for the AI.
Key Configuration: Contains JavaScript logic to unwrap the workflow structure and summarize nodes.

Overall Sticky Note (OpenAI)
Function: Generates the high-level documentation overview for the entire n8n workflow using gpt-4o-mini, based on a detailed technical writer system prompt.
Key Configuration: Uses the gpt-4o-mini model and receives the workflow summary text as input context.

Node Sticky Notes (OpenAI)
Function: Iterates over every single n8n node, generating a specific, technical sticky note detailing its purpose, inputs/outputs, and key fields.
Key Configuration: Uses the gpt-4o-mini model, prompting the AI with the specific n8n node's JSON structure.

Layout Blocks RTL (Code)
Function: A complex custom code n8n node that calculates the optimal visual positioning for every n8n node and its newly created sticky note, arranging them from right to left (RTL) on the canvas to maintain visual organization.
Key Configuration: Defines constant parameters for node and sticky note dimensions (NODEW: 300, STICKYW: 380, GAPX, GAPY).

Assemble Workflow (Code)
Function: The final step in this n8n workflow. It reconstructs the target workflow JSON, injecting the overall overview sticky note, applying all calculated node moves, and inserting the individual per-n8n node sticky notes.
Key Configuration: Includes logic to apply moves, remove old sticky notes, and position the overview note to the far left.

Save documented Workflow (Read/Write File)
Function: Writes the fully documented n8n workflow template JSON to the output file path.
Key Configuration: File Name defines the output path for the new workflow file.

Related n8n Workflows

Free

Nodes: 8 Nodes
Updated: December 26 2025
View all
Created by
Luis Acosta
Luis Acosta

I'm passionate about people and technology, with a hands-on and creative approach. Lately, my main focus has shifted towards process automation using artificial intelligence and the creation of meaningful content. I enjoy exploring how emerging technologies can simplify workflows, enhance productivity, and open new creative possibilities.

Featured*