Use this n8n workflow to automatically generate real-time Swagger API documentation for all active webhooks across your n8n instance, enhancing visibility and integration efforts. This n8n template uses custom scripting.
Download this n8n workflow template and start using it instantly.
Managing numerous n8n workflow webhooks can become complex. This powerful n8n workflow solves the visibility problem by automatically introspecting the entire n8n instance. It uses the internal n8n API to gather details on all active workflows and their embedded webhook nodes, transforming this data into a standard Swagger 2.0 specification.
The resulting documentation is presented via an interactive Swagger UI rendered directly in the browser when the n8n trigger webhook is called. This eliminates the need for manual updates to documentation whenever a new n8n workflow or endpoint is deployed, providing significant value for DevOps and integration teams. Furthermore, it supports custom annotations in webhook notes to correctly document query and body parameters, making this n8n template exceptionally useful for building robust API layers.
Get Swagger n8n trigger, which is an HTTP Webhook configured to respond using a downstream node.n8n n8n node then executes a request against the internal n8n API, specifically retrieving details for all currently active n8n workflow configurations in the instance.Code n8n node. This node processes the raw workflow JSON data. It identifies all Webhook nodes and their corresponding Respond to Webhook nodes, analyzing the connections to determine the response type (JSON, text, or redirect).Code node constructs a Swagger 2.0 YAML string, extracting path, method, response codes, and dynamically adding parameter documentation if the original Webhook n8n node has relevant annotations in its notes (e.g., @query or @body).Respond to Webhook n8n node takes the generated Swagger YAML text and embeds it within an HTML template that initializes the Swagger UI bundle. This delivers an interactive documentation page directly back to the requester, offering a complete, dynamic documentation source generated by the n8n workflow itself.n8n node (Step 2). You must configure an 'n8n API' credential, typically by generating a Personal Access Token (PAT) within your n8n settings.// @query my_id string The resource identifier).https://your-n8n-instance/webhook/swagger). Get Swagger (Webhook Trigger): The starting n8n trigger. It listens on the /swagger path and uses the responseNode configuration to wait for the final output.
n8n (n8n Node): Fetches all active n8n workflow data using the internal n8n API. This ensures the documentation is always up-to-date with currently deployed endpoints.
Code (Custom Code Node): This is the automation engine of this n8n template. It parses the workflow structure, determines webhook-response connections, extracts optional parameter notes, and meticulously formats the data into a valid Swagger 2.0 YAML string. It includes complex logic (findValidTargets) for tracing connections between a Webhook n8n node and a Respond to Webhook n8n node.
Respond to Webhook (Final Action Node): The final n8n node that packages the generated Swagger YAML data into an HTML wrapper. This wrapper loads the Swagger UI frontend assets, rendering the interactive API documentation preview based on the live data generated by the n8n workflow.
Use this structured n8n workflow to analyze uploaded PDFs automatically. Featuring file validation (size/pages) and AI summarization via an OpenAI n8n node, this n8n templates solution is perfect for structured data extraction.

Use this n8n workflow to automatically scan websites for security vulnerabilities using OpenAI. Generate detailed, graded security reports and send them via Gmail. Find advanced n8n templates for DevSecOps.

Use this powerful n8n workflow template to perform deep, recursive web scraping. Scrape content up to a specified depth and automatically save all extracted data into a centralized Google Doc, tracking URLs via Google Sheets. This n8n workflow leverages the specialized Airtop n8n node for advanced extraction.

Use this n8n workflow to instantly fetch random cocktail recipes from an external API and post them to Mattermost channels via a webhook. A perfect example of useful n8n templates.

Automate website change detection using this powerful n8n workflow. Use hashing to track public documents, log changes to Google Sheets, and receive Gmail alerts.


he/him 🎲 Boardgames and role-play addicted 📸 Love snapping pictures 🪴 Plant dad 👨💻 Software Engineer made in Italy







































