✨ $500 AI Visibility Audit — live at Spurlock Studios. Book the audit

Operations & Systems

n8n Flowchart | Subflow 3 (Single Flow)

This n8n subflow visualizes a specified workflow by dynamically generating a Mermaid flowchart diagram. It fetches the target workflow's details via the n8n API, then processes its nodes and connections to create the Mermaid syntax. The generated chart includes custom shapes for…

Built · ~4 hours saved per week

n8n Flowchart Generator Subflow Overview This workflow functions as a powerful utility subflow designed to automatically generate a visual flowchart diagram from any existing n8n workflow. When called by another workflow and provided with a specific Workflow ID, it fetches the target workflow's structural data, processes it, and constructs a complete flowchart definition using Mermaid.js syntax. The primary goal is to automate the creation of technical documentation, providing a clear, visual representation of a workflow's logic, including nodes, connections, and conditional paths. This drastically simplifies understanding complex processes, aids in debugging, and facilitates collaboration among team members by ensuring the documentation always mirrors the actual workflow implementation. Technologies Used - n8n: The core automation platform. - n8n API: Used internally to fetch the detailed JSON structure of a specified workflow. - JavaScript (Code Node): The engine of the workflow, used to parse the workflow's JSON data and algorithmically translate it into a different format. - Mermaid.js: An open-source, Javascript-based diagramming and charting tool that renders text-based definitions into visual diagrams. The workflow's final output is a string of Mermaid syntax. Node-by-Node Analysis H3: When Executed by Another Workflow (Trigger) This node serves as the entry point for the subflow. It's designed to be called by a parent workflow, which must pass in a single piece of data: the workflow ID of the workflow that needs to be visualized. This modular design allows any other process to use this flowcharting capability on demand. - Purpose: To initiate the flowchart generation process. - Configuration: It is configured to expect a field named workflow ID. - Value: It makes the entire flowcharting logic reusable and callable from anywhere within your n8n instance, promoting a DRY (Don't Repeat Yourself) approach to internal tooling. H3: Single workflow (n8n API Node) This node takes the workflow ID received by the trigger and uses n8n's own internal API to retrieve the complete JSON definition of that workflow.

Tags: Marketing, Clients/Customers/Leads, n8n, Data Transformation, Content Creation

Integrations: Code

Related automations

Back to the Automation Library