Automated Workflow Documentation Generator using Gemini AI and Telegram - n8n Workflow

Use this powerful n8n workflow to instantly generate professional documentation, SEO titles, and standardized sticky notes for any n8n workflow JSON uploaded via Telegram, leveraging Google Gemini AI.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

n8n developers and agencies needing to standardize template submissions.
Technical writers who need to quickly document complex n8n workflows.
Users looking for advanced examples of AI integration within an n8n node structure.
Anyone who frequently creates or manages public n8n templates.

Overview

Generating high-quality, standardized documentation for every n8n workflow can be time-consuming, often requiring manual creation of sticky notes, SEO descriptions, and setup guides. This expert n8n workflow solves this by fully automating the process.

When a user uploads an n8n workflow JSON file to a designated Telegram bot, this automation takes over. It first securely scrubs all sensitive information (API keys, URLs, credentials) from the n8n node configurations. It then utilizes the Google Gemini AI model to analyze the workflow logic and generate structured, template-ready documentation, including the main sticky note and logical section sticky notes. The final output is a clean, documented n8n template file, ready for publishing, significantly reducing manual effort and ensuring high quality across all your n8n templates.

How it Works

This powerful automation starts with the Telegram Trigger n8n trigger node, waiting for incoming messages.


  1. Input and Validation (n8n trigger): The Telegram Trigger receives a message. The subsequent If n8n node checks if a document (a workflow JSON file) was attached. If not, it sends a failure message back to the user.

  2. File Extraction: If valid, the Telegram Get a File n8n node downloads the JSON file, and the Extract From File n8n node parses the binary data.

  3. Security and Analysis (n8n node Code): The Scrub & Analyze Workflow Code n8n node is vital. It runs a custom JavaScript script that recursively scans the entire n8n workflow for sensitive parameters (like webhookId, apiKey, and credentials) and replaces them with placeholders. It also analyzes the spatial position of every n8n node to help with later placement of sticky notes.

  4. AI Documentation Generation: The scrubbed workflow JSON string is passed to the AI Template Generator Chain LLM n8n node. This n8n node, configured with the Google Gemini Chat Model and a Structured Output Parser, executes an advanced prompt that instructs the AI to generate a documentation package (Main Sticky, Section Stickies, Title Suggestions, and Description) that strictly adheres to n8n template standards.

  5. Template Assembly (n8n node Code): The Assemble Final Template Code n8n node merges the AI-generated sticky notes and metadata back into the original, cleaned n8n workflow JSON structure. It calculates optimal positioning for the sticky notes relative to the actual n8n workflow nodes.

  6. Delivery: The workflow concludes by using Telegram n8n node actions (Send Template File, Send Checklist, Send Guide) to deliver the final documented n8n template file and related metadata back to the user who initiated the n8n workflow.

Installation Guide

To set up this n8n workflow, follow these steps:


  1. Import: Copy the provided n8n workflow JSON and import it into your n8n instance.

  2. Telegram Credentials (Trigger): Set up Telegram credentials for the Telegram Trigger1 n8n trigger node. This usually involves creating a bot via BotFather and configuring the webhook URL on your n8n instance.

  3. Telegram Credentials (Actions): Configure separate Telegram credentials (using the same bot token) for the downstream Telegram n8n node actions (Get a file, Send a text message, Send Template File, Send Checklist1, Send Guide1).

  4. Google Gemini/PaLM Credentials: Configure the required credentials for the Google Gemini Chat Model n8n node. This requires a valid API key for the Google Gemini platform.

  5. Activation: Ensure the n8n workflow is activated (set to 'Active' status) to begin listening for incoming Telegram file uploads. Upload an n8n workflow JSON file to your bot to test the automation.

Node Details

Telegram Trigger1 (n8n trigger): The entry point, listening for message updates, specifically looking for file uploads.
Check Input Type1 (If): Checks if the incoming message contains a document. This ensures only file inputs proceed to the next n8n node.
Scrub & Analyze Workflow (Code n8n node): Essential custom scripting logic that performs recursive scrubbing of secrets (API keys, tokens, credentials, and internal n8n metadata) and analyzes node positioning for intelligent sticky note placement.
Google Gemini Chat Model (LLM n8n node): Provides the necessary connection and context for the AI, enabling the advanced generation capabilities used by the Chain LLM n8n node.
AI Template Generator1 (Chain LLM n8n node): Contains the extensive prompt instructing the AI to act as an n8n template engineer, strictly defining the structure and content for the documentation and sticky notes within the n8n workflow.
Assemble Final Template1 (Code n8n node): Takes the raw cleaned n8n workflow and the AI-generated documentation fragments, intelligently recalculates positions, and reconstructs the final, documented n8n template file, ready for use.


  • Send Template File (Telegram n8n node): The final action, which uses binary data handling to send the generated n8n workflow template JSON file back to the Telegram chat.

Related n8n Workflows

Free

Nodes: 9 Nodes
Updated: December 26 2025
View all
Created by

Curious builder automating various problems using n8n

Featured*