AutomationFlowsAI & RAG › General Parsing Agent

General Parsing Agent

General Parsing Agent. Uses watchFilesystem, readBinaryFile, httpRequest, writeBinaryFile. Event-driven trigger; 10 nodes.

Event trigger★★★★☆ complexity10 nodesWatch FilesystemRead Binary FileHTTP RequestWrite Binary File
AI & RAG Trigger: Event Nodes: 10 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": "General Parsing Agent",
  "nodes": [
    {
      "id": "ManualTrigger",
      "name": "Manual Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        200,
        200
      ]
    },
    {
      "id": "WebhookTrigger",
      "name": "Webhook Trigger",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        200,
        0
      ],
      "parameters": {
        "httpMethod": "POST",
        "path": "parse",
        "responseMode": "onReceived",
        "options": {
          "binaryData": true
        }
      }
    },
    {
      "id": "FolderWatch",
      "name": "Watch Folder",
      "type": "n8n-nodes-base.watchFilesystem",
      "typeVersion": 1,
      "position": [
        200,
        400
      ],
      "parameters": {
        "path": "/srv/dev-disk-by-uuid-537f57a7-b319-4227-9798-8ebfd4681f71/data/huntdata/inbox",
        "polling": true,
        "interval": 60
      }
    },
    {
      "id": "LoadFile",
      "name": "Load File",
      "type": "n8n-nodes-base.readBinaryFile",
      "typeVersion": 1,
      "position": [
        450,
        400
      ],
      "parameters": {
        "filePath": "={{$json[\"path\"]}}"
      }
    },
    {
      "id": "NormalizeInput",
      "name": "Normalize Input",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        700,
        200
      ],
      "parameters": {
        "functionCode": "return [{ binary: { data: items[0].binary?.data || items[0].binary?.file } }];"
      }
    },
    {
      "id": "SendToParser",
      "name": "Send to Parser",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        950,
        200
      ],
      "parameters": {
        "url": "http://pdfparser:8777/parse",
        "method": "POST",
        "sendBinaryData": true,
        "binaryPropertyName": "data"
      }
    },
    {
      "id": "SaveJSON",
      "name": "Save JSON",
      "type": "n8n-nodes-base.writeBinaryFile",
      "typeVersion": 1,
      "position": [
        1200,
        200
      ],
      "parameters": {
        "fileName": "={{$now.toISO()}}.json",
        "filePath": "/srv/dev-disk-by-uuid-537f57a7-b319-4227-9798-8ebfd4681f71/data/huntdata/parsed",
        "dataPropertyName": "data"
      }
    },
    {
      "id": "OptionalLLM",
      "name": "LLM Summary (On Demand)",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [
        1450,
        200
      ],
      "parameters": {
        "conditions": {
          "boolean": [
            {
              "value1": "={{$json[\"summarize\"]}}",
              "value2": true
            }
          ]
        }
      }
    },
    {
      "id": "LLMCall",
      "name": "Call LLM",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        1700,
        100
      ],
      "parameters": {
        "url": "http://ollama:11434/api/generate",
        "method": "POST",
        "jsonParameters": true,
        "body": {
          "model": "llama3",
          "prompt": "Summarize the following parsed document:\\n\\n{{$json}}"
        }
      }
    },
    {
      "id": "ReturnResponse",
      "name": "Return Response",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1,
      "position": [
        1700,
        300
      ],
      "parameters": {
        "responseBody": "={{$json}}"
      }
    }
  ],
  "connections": {
    "ManualTrigger": {
      "main": [
        [
          {
            "node": "NormalizeInput",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "WebhookTrigger": {
      "main": [
        [
          {
            "node": "NormalizeInput",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "FolderWatch": {
      "main": [
        [
          {
            "node": "LoadFile",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "LoadFile": {
      "main": [
        [
          {
            "node": "NormalizeInput",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "NormalizeInput": {
      "main": [
        [
          {
            "node": "SendToParser",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SendToParser": {
      "main": [
        [
          {
            "node": "SaveJSON",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SaveJSON": {
      "main": [
        [
          {
            "node": "OptionalLLM",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OptionalLLM": {
      "main": [
        [
          {
            "node": "LLMCall",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "ReturnResponse",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "LLMCall": {
      "main": [
        [
          {
            "node": "ReturnResponse",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

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

About this workflow

General Parsing Agent. Uses watchFilesystem, readBinaryFile, httpRequest, writeBinaryFile. Event-driven trigger; 10 nodes.

Source: https://gist.github.com/gregbo66/5ecdd885e2ff0383679fcb90c5eda4c2 — 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

This workflow creates a multi-talented AI assistant named Simran that interacts with users via Telegram. It can handle text and voice messages, understand the user's intent, and perform various tasks.

MongoDB, Chain Llm, Google Gemini Chat +11
AI & RAG

Pobieranie dokumentów. Uses httpRequest, microsoftSql, seaTable, readBinaryFile. Event-driven trigger; 59 nodes.

HTTP Request, Microsoft Sql, Sea Table +5
AI & RAG

Estimate material price and total cost for grouped BIM/CAD elements using an LLM-driven analysis. The workflow accepts an existing XLSX (from your model) or, if missing, can trigger a local RvtExporte

OpenAI, Agent, Anthropic Chat +6
AI & RAG

Estimate embodied carbon (CO2e) for grouped BIM/CAD elements. The workflow accepts an existing XLSX (grouped element data) or, if missing, can trigger a local RvtExporter.exe to generate one. It detec

OpenAI, Agent, Anthropic Chat +6
AI & RAG

Transform any PDF document into an engaging, natural-sounding podcast using Google's Gemini AI and advanced Text-to-Speech technology. This automated workflow extracts text content, generates conversa

Chain Llm, Google Gemini Chat, HTTP Request +1