AutomationFlowsAI & RAG › Agent Documenter

Agent Documenter

Agent Documenter. Uses workflowTrigger, httpRequest. Event-driven trigger; 4 nodes.

Event trigger★★★★☆ complexity4 nodesWorkflow TriggerHTTP Request
AI & RAG Trigger: Event Nodes: 4 Complexity: ★★★★☆ Added:

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "Agent Documenter",
  "nodes": [
    {
      "parameters": {
        "workflowId": "agent-swarm-main"
      },
      "id": "workflow-trigger",
      "name": "Workflow Trigger",
      "type": "n8n-nodes-base.workflowTrigger",
      "typeVersion": 1.1,
      "position": [
        250,
        300
      ]
    },
    {
      "parameters": {
        "jsCode": "// Extract results to document from parent workflow\nconst input = $input.item.json;\nconst subtask = input.current_subtask || input;\n\nreturn {\n  json: {\n    results: input.results || subtask.description || '',\n    task: subtask.subtask || input.original_task || '',\n    agent_outputs: input.agent_outputs || {},\n    context: input.context || {}\n  }\n};"
      },
      "id": "prepare-document",
      "name": "Prepare Document",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        450,
        300
      ]
    },
    {
      "parameters": {
        "url": "=https://api.openai.com/v1/chat/completions",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"model\": \"gpt-4o\",\n  \"messages\": [\n    {\n      \"role\": \"system\",\n      \"content\": \"Du bist der DOCUMENTER im Agent-Swarm-System.\\n\\nROLLE:\\nFesthalten und Strukturieren von Ergebnissen f\u00fcr langfristige Nutzung.\\n\\nAUFGABEN:\\n- Fasse Ergebnisse verst\u00e4ndlich zusammen\\n- Erstelle strukturierte Dokumentation (Markdown)\\n- Schreibe Checklisten, Referenztexte\\n- Bereite Inhalte zum Abspeichern auf\\n\\nREGELN:\\n- Erfinde keine neuen Inhalte (nur dokumentieren)\\n- Dokumentiere nur, was erarbeitet wurde\\n- Schreibe klar, knapp und strukturiert\\n- Stelle langfristige Lesbarkeit sicher\\n\\nOUTPUT-FORMAT (Markdown):\\n# Dokumentation: [Titel]\\n\\n## Zusammenfassung\\n[Kurze Zusammenfassung]\\n\\n## Ergebnisse\\n[Strukturierte Liste]\\n\\n## Technische Details\\n[Falls zutreffend]\\n\\n## Verwendung\\n[Anleitung]\\n\\n## N\u00e4chste Schritte\\n[Optional]\"\n    },\n    {\n      \"role\": \"user\",\n      \"content\": \"=Ergebnisse: {{ $json.results }}\\nTask: {{ $json.task }}\\nAgent-Outputs: {{ JSON.stringify($json.agent_outputs) }}\"\n    }\n  ],\n  \"temperature\": 0.3\n}",
        "options": {}
      },
      "id": "documenter-llm",
      "name": "Documenter LLM",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        650,
        300
      ],
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "// Extract and format documenter output\nconst response = $input.item.json;\nlet documentation;\n\ntry {\n  if (response.choices && response.choices[0]) {\n    documentation = response.choices[0].message.content;\n  } else if (response.content) {\n    documentation = typeof response.content === 'string' ? response.content : JSON.stringify(response.content);\n  } else {\n    documentation = JSON.stringify(response);\n  }\n} catch (e) {\n  documentation = `Error generating documentation: ${e.message}`;\n}\n\nreturn {\n  json: {\n    output: documentation,\n    status: 'completed',\n    agent: 'documenter',\n    timestamp: new Date().toISOString()\n  }\n};"
      },
      "id": "format-documentation",
      "name": "Format Documentation",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        850,
        300
      ]
    }
  ],
  "connections": {
    "Workflow Trigger": {
      "main": [
        [
          {
            "node": "Prepare Document",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Document": {
      "main": [
        [
          {
            "node": "Documenter LLM",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Documenter LLM": {
      "main": [
        [
          {
            "node": "Format Documentation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "staticData": null,
  "tags": [],
  "triggerCount": 0,
  "updatedAt": "2025-12-19T12:00:00.000Z",
  "versionId": "1"
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Agent Documenter. Uses workflowTrigger, httpRequest. Event-driven trigger; 4 nodes.

Source: https://github.com/timo-goetz-ai/apki-infra-hetzner/blob/133589ea8bc73203bd0b1e7a93f1df5c0a71941c/workflows/agent_swarm_04_agent-documenter.json — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

Agent Builder. Uses workflowTrigger, httpRequest. Event-driven trigger; 4 nodes.

Workflow Trigger, HTTP Request
AI & RAG

This is for SaaS founders, agency owners, and Sales Ops managers who use HubSpot but are tired of "toe-stepping." If your BDRs are accidentally emailing your AE’s active deals, or Marketing is blastin

Data Table, HTTP Request
AI & RAG

Inquiry-Agent. Uses @digitalocean/n8n-nodes-digitalocean-gradient-serverless-inference, stopAndError, googleDocs, gmail. Event-driven trigger; 59 nodes.

@Digitalocean/N8N Nodes Digitalocean Gradient Serverless Inference, Stop And Error, Google Docs +4
AI & RAG

AI Social Media Automation for Multiple Platforms using Blotato. Uses telegramTrigger, @blotato/n8n-nodes-blotato, telegram, httpRequest. Event-driven trigger; 52 nodes.

Telegram Trigger, @Blotato/N8N Nodes Blotato, Telegram +1
AI & RAG

CLEAN Agent - Manual Trigger. Uses googleDrive, googleSheets, httpRequest. Event-driven trigger; 49 nodes.

Google Drive, Google Sheets, HTTP Request