{
  "name": "Automated PDF invoice processing & approval flow using OpenAI and Google Sheets",
  "nodes": [
    {
      "id": "59b4e37b-f52f-415a-bb6f-7a249984ec3a",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        3280,
        840
      ]
    },
    {
      "id": "d9d53795-da16-4921-9c50-a4ce036b564f",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        3500,
        840
      ]
    },
    {
      "id": "69406dc2-fb14-40bd-a24b-5fa28aaa338c",
      "name": "Invoice Folder Monitor",
      "type": "n8n-nodes-base.googleDriveTrigger",
      "position": [
        2620,
        420
      ]
    },
    {
      "id": "ab3bbd35-7d81-482e-a9f6-242c7b98cd49",
      "name": "Download Invoice PDF",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        2820,
        420
      ]
    },
    {
      "id": "fc5a0c82-a1e9-468d-a2a5-0f8e7291f1d9",
      "name": "Invoice Parser AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        3300,
        640
      ]
    },
    {
      "id": "bb0a4401-9feb-4240-a62f-ad90c6c642a1",
      "name": "Insert Invoice Data",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        4180,
        640
      ]
    },
    {
      "id": "d1980b52-aa0a-479b-892f-9e81abfb35f6",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2260,
        420
      ],
      "parameters": {
        "width": 280,
        "height": 600,
        "content": "## SETUP REQUIRED\n**Author:** [Billy Christi](https://n8n.io/creators/billy/)\n\n**Copy the Google Sheet template here**:  \n👉 [PDF Invoice Parser with Approval Workflow – Google Sheet Template](https://"
      }
    },
    {
      "id": "858e3989-352d-4d73-a299-394b73780d59",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2600,
        1060
      ],
      "parameters": {
        "width": 700,
        "height": 560,
        "content": "## 🧾 Automated PDF Invoice Processing & Approval Flow using OpenAI and Google Sheets\n\nWhat This Template Does:\n\n- Monitors **Google Drive**, **Gmail**, and a **web form** for incoming PDF invoices  \n-"
      }
    },
    {
      "id": "9fa12368-2a78-4a94-9eec-4fcbfe2f0254",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3340,
        1060
      ],
      "parameters": {
        "width": 620,
        "height": 620,
        "content": "## 📋 WORKFLOW PROCESS OVERVIEW\n\n1. **Invoice Collection**  \nInvoices are captured through three triggers: new PDFs in a Google Drive folder, incoming Gmail messages with PDF attachments, or direct upl"
      }
    },
    {
      "id": "0aeca259-2a98-48c3-a892-94bf7eac802a",
      "name": "Send Invoice for Approval",
      "type": "n8n-nodes-base.gmail",
      "position": [
        3640,
        640
      ]
    },
    {
      "id": "2224840e-b38b-4375-9726-4355db099d6c",
      "name": "Monitor Email Attachments",
      "type": "n8n-nodes-base.gmailTrigger",
      "position": [
        2820,
        640
      ]
    },
    {
      "id": "f4ff8acd-d3a0-45c4-89eb-5d32c2311cf0",
      "name": "Upload Invoice (PDF) Form",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        2820,
        840
      ]
    },
    {
      "id": "c2c7545e-344e-480d-8ff7-c14a275460cb",
      "name": "Extract Text from Drive PDF",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        3020,
        420
      ]
    },
    {
      "id": "51b5bedc-ac31-4e31-a854-89d63c8fe410",
      "name": "Extract Text from Email PDF",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        3020,
        640
      ]
    },
    {
      "id": "aca28461-3f7b-4530-aaec-a61bb402895b",
      "name": "Extract Text from Form PDF",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        3020,
        840
      ]
    },
    {
      "id": "189f7e81-1391-4baa-baa1-63419f92cccb",
      "name": "Check Approval Decision",
      "type": "n8n-nodes-base.if",
      "position": [
        3900,
        640
      ]
    },
    {
      "id": "24d89a38-91cc-429d-af6a-8616d67c1e03",
      "name": "Send Rejection Alert",
      "type": "n8n-nodes-base.gmail",
      "position": [
        4040,
        900
      ]
    },
    {
      "id": "5a2f9411-4233-4173-8541-53ba13de6268",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4400,
        340
      ],
      "parameters": {
        "width": 380,
        "height": 760,
        "content": "# 👋 Hi, I’m Billy\n![My Photo](https://i.ibb.co/Gvn63Bzc/Billy-Christi-AI-Automation.jpg)\nI help businesses build **n8n workflows** & **AI automation projects**.  \nNeed help with n8n or AI Automation p"
      }
    }
  ],
  "connections": {
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Invoice Parser AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Download Invoice PDF": {
      "main": [
        [
          {
            "node": "Extract Text from Drive PDF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Rejection Alert": {
      "main": [
        [
          {
            "node": "Insert Invoice Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Invoice Folder Monitor": {
      "main": [
        [
          {
            "node": "Download Invoice PDF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Approval Decision": {
      "main": [
        [
          {
            "node": "Insert Invoice Data",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send Rejection Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Invoice Parser AI Agent": {
      "main": [
        [
          {
            "node": "Send Invoice for Approval",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Invoice Parser AI Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Monitor Email Attachments": {
      "main": [
        [
          {
            "node": "Extract Text from Email PDF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Invoice for Approval": {
      "main": [
        [
          {
            "node": "Check Approval Decision",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Invoice (PDF) Form": {
      "main": [
        [
          {
            "node": "Extract Text from Form PDF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Text from Form PDF": {
      "main": [
        [
          {
            "node": "Invoice Parser AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Text from Drive PDF": {
      "main": [
        [
          {
            "node": "Invoice Parser AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Text from Email PDF": {
      "main": [
        [
          {
            "node": "Invoice Parser AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}