AutomationFlowsAI & RAG › Ai-powered Invoice Processing Automation with Mistral OCR & Gpt-5.2

Ai-powered Invoice Processing Automation with Mistral OCR & Gpt-5.2

ByBadr @b4dr on n8n.io

🚀 Automate Invoice Processing with an End-to-End AI Workflow Powered by GPT-5.2

Event trigger★★★★☆ complexityAI-powered11 nodesGoogle Drive TriggerGoogle DriveHTTP RequestAgentOutput Parser StructuredOpenAI Chat
AI & RAG Trigger: Event Nodes: 11 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #4331 — we link there as the canonical source.

This workflow follows the Agent → Google Drive recipe pattern — see all workflows that pair these two integrations.

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
{
  "nodes": [
    {
      "id": "4dd4126f-116d-4900-b833-ab3df30f7902",
      "name": "Google Drive Trigger: New Invoice Detection",
      "type": "n8n-nodes-base.googleDriveTrigger",
      "position": [
        848,
        208
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "a34e3733-322e-4dfc-a242-fa6be35d0cc4",
      "name": "Google Drive: Download Invoice",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1072,
        208
      ],
      "parameters": {},
      "typeVersion": 3
    },
    {
      "id": "7de698eb-7018-43cc-8b1b-090ddab72f8a",
      "name": "Workflow Documentation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -160,
        -64
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "ecfa59ff-5223-4dcb-aab9-c08d529cd5b7",
      "name": "Mistral OCR API: Extract Text",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1504,
        208
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "8d445ec3-6c26-4cac-ba84-797be80e6a88",
      "name": "Data Splitter: OCR Pages",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        1744,
        208
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "c3f4f8dc-00a3-4660-9401-2f46c4110c2f",
      "name": "Field Extractor: Page Markdown",
      "type": "n8n-nodes-base.set",
      "position": [
        1984,
        208
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "d6f183e9-be6f-4a7d-8402-a3100e9db3df",
      "name": "Data Aggregator: Combine Pages",
      "type": "n8n-nodes-base.summarize",
      "position": [
        2208,
        208
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "b7f98812-1cbc-40e9-a1a8-8bdfffdb7a21",
      "name": "AI Agent: Structure Invoice Data",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        2432,
        208
      ],
      "parameters": {},
      "typeVersion": 1.9
    },
    {
      "id": "4451344d-641b-494a-805e-f27c98bda3e6",
      "name": "JSON Parser: Invoice Structure",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        2608,
        416
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "ee54892d-199b-4f04-b6da-bbe2a6fbe514",
      "name": "Convert invoice File to Base64",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        1312,
        208
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "5a7633c1-31ac-45ae-9460-bed46eb2b546",
      "name": "AI Engine: GPT-5.2",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        2304,
        416
      ],
      "parameters": {},
      "typeVersion": 1.2
    }
  ],
  "connections": {
    "AI Engine: GPT-5.2": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent: Structure Invoice Data",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Data Splitter: OCR Pages": {
      "main": [
        [
          {
            "node": "Field Extractor: Page Markdown",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Mistral OCR API: Extract Text": {
      "main": [
        [
          {
            "node": "Data Splitter: OCR Pages",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert invoice File to Base64": {
      "main": [
        [
          {
            "node": "Mistral OCR API: Extract Text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Data Aggregator: Combine Pages": {
      "main": [
        [
          {
            "node": "AI Agent: Structure Invoice Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Field Extractor: Page Markdown": {
      "main": [
        [
          {
            "node": "Data Aggregator: Combine Pages",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Drive: Download Invoice": {
      "main": [
        [
          {
            "node": "Convert invoice File to Base64",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Drive Trigger: New Invoice Detection": {
      "main": [
        [
          {
            "node": "Google Drive: Download Invoice",
            "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

🚀 Automate Invoice Processing with an End-to-End AI Workflow Powered by GPT-5.2

Source: https://n8n.io/workflows/4331/ — 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 comprehensive n8n workflow automates the entire Meta (Facebook/Instagram) advertising process, from asset analysis to ad creation. It combines AI-powered content analysis with automated ad deploy

Facebook Graph Api, HTTP Request, Google Drive +5
AI & RAG

Transcript Evalu8r V2 is a robust browser-based transcript analysis tool powered by Deepgram’s speech-to-text API and built into an n8n workflow template. This release introduces full in-browser audio

Google Drive Trigger, HTTP Request, Agent +5
AI & RAG

Transcript Evalu8r is an AI-powered transcript analysis workflow that automates the processing, visualization, and evaluation of transcribed conversations. This n8n workflow template is designed to he

Google Drive Trigger, HTTP Request, Agent +5
AI & RAG

Awesome N8N Templates. Uses notion, lmChatOpenAi, outputParserStructured, chainLlm. Event-driven trigger; 36 nodes.

Notion, OpenAI Chat, Output Parser Structured +8
AI & RAG

Watches a Google Drive folder for new (scanned) invoices. Each new file automatically triggers the workflow. Downloads and processes each invoice through OCR Space to extract the text. Extracts the co

HTTP Request, Google Drive, Google Sheets Tool +5