Skip to main content

Generate self-documenting API portal for webhooks with n8n API & Bootstrap

Workflow preview

Workflow preview
100%
Generate self-documenting API portal for webhooks with n8n API & Bootstrap preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Keeping API documentation updated is a challenge, especially when your endpoints are powerful n8n webhooks. This project solves that problem by turning your n8n instance into a self documenting API...

Best for

  • Document Extraction automation workflows
  • Multimodal AI automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.aggregate, n8n-nodes-base.webhook, n8n-nodes-base.set, n8n-nodes-base.stickynote, n8n-nodes-base.respondtowebhook, n8n-nodes-base.html, n8n-nodes-base.executeworkflow, n8n-nodes-base.executeworkflowtrigger

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Matheus Pedrosa.

Original n8n.io source

1.1 Workflow description

Title
Generate self-documenting API portal for webhooks with n8n API & Bootstrap
Workflow name
Generate self-documenting API portal for webhooks with n8n API & Bootstrap

Workflow Overview

Keeping API documentation updated is a challenge, especially when your endpoints are powerful n8n webhooks. This project solves that problem by turning your n8n instance into a self-documenting API platform.

This workflow acts as a central engine that scans your entire n8n instance for designated webhooks and automatically generates a single, beautiful, and interactive HTML documentation page. By simply adding a standard Set node with specific metadata to any of your webhook workflows, you can make it instantly appear in your live documentation portal, complete with code examples and response schemas.

The final output is a single, callable URL that serves a professional, dark-themed, and easy-to-navigate documentation page for all your automated webhook endpoints.

Key Features:

  • Automatic Discovery: Scans all active workflows on your instance to find endpoints designated for documentation.
  • Simple Configuration via a Set Node: No custom nodes needed! Just add a Set node named API_DOCS to any workflow you want to document and fill in a simple JSON structure.
  • Rich HTML Output: Dynamically generates a single, responsive, dark-mode HTML page that looks professional right out of the box.
  • Interactive UI: Uses Bootstrap accordions, allowing users to expand and collapse each endpoint to keep the view clean and organized.
  • Developer-Friendly: Automatically generates a ready-to-use cURL command for each endpoint, making testing and integration incredibly fast.
  • Zero Dependencies: The entire solution runs within n8n. No need to set up or maintain external documentation tools like Swagger UI or Redoc.

Setup Instructions:

This solution has two parts: configuring the workflows you want to document, and setting up this generator workflow.

Part 1: In Each Workflow You Want to Document

  1. Next to your Webhook trigger node, add a Set node.
  2. Change its name to API_DOCS.
  3. Create a single variable named jsonOutput (or docsData) and set its type to JSON.
  4. Paste the following JSON structure into the value field and customize it with your endpoint's details:
{
  "expose": true,
  "webhookPath": "PASTE_YOUR_WEBHOOK_PATH_HERE",
  "method": "POST",
  "summary": "Your Endpoint Summary",
  "description": "A clear description of what this webhook does.",
  "tags": [
    "Sales",
    "Automation"
  ],
  "requestBody": {
    "exampleKey": "exampleValue"
  },
  "successCode": 200,
  "successResponse": {
    "status": "success",
    "message": "Webhook processed correctly."
  },
  "errorCode": 400,
  "errorResponse": {
    "status": "error",
    "message": "Invalid input."
  }
}

Part 2: In This Generator Workflow

  1. n8n API Node: Configure the GetWorkflows node with your n8n API credentials. It needs permission to read workflows.

  2. Configs Node: Customize the main settings for your documentation page, like the title (name_doc), version, and a short description.

  3. Webhook Trigger: The Webhook node at the start (default path is /api-doc) provides the final URL for your documentation page. Copy this URL and open it in your browser.

Required Credentials: n8n API Credentials: To allow this workflow to read your other workflows.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Aggregate

Type / Role
n8n-nodes-base.aggregate - aggregate
Config choices
Version 1

Block 2 - Webhook

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 2

Block 3 - Configs

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 4 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 5 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 6 - Respond

Type / Role
n8n-nodes-base.respondToWebhook - respondToWebhook
Config choices
Version 1.1

Block 7 - RespondHTML

Type / Role
n8n-nodes-base.respondToWebhook - respondToWebhook
Config choices
Version 1.1

Block 8 - MakeFullHTML

Type / Role
n8n-nodes-base.html - html
Config choices
Version 1.2

Block 9 - ExecuteSubWorkflow

Type / Role
n8n-nodes-base.executeWorkflow - executeWorkflow
Config choices
Version 1.2

Block 10 - Execute

Type / Role
n8n-nodes-base.executeWorkflowTrigger - executeWorkflowTrigger
Config choices
Version 1.1

Block 11 - GetWorkflows

Type / Role
n8n-nodes-base.n8n - n8n
Config choices
Version 1

Block 12 - FilterWorkflows

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 13 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 14 - Webhook1

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 2

Block 15 - API_DOCS

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 16 - FakeResponse

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 17 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Generate self-documenting API portal for webhooks with n8n API & Bootstrap
Complexity advanced
Nodes 17
Categories Document Extraction, Multimodal AI
Author Matheus Pedrosa
Published 21 Aug 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/7706/7706.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Generate self-documenting API portal for webhooks with n8n API & Bootstrap do?

Keeping API documentation updated is a challenge, especially when your endpoints are powerful n8n webhooks. This project solves that problem by turning your n8n instance into a self documenting API...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Document Extraction, Multimodal AI use case.