{
  "name": "Extract invoice data from email to Google Sheets using GPT-4o AI automation",
  "nodes": [
    {
      "id": "70ca3a90-55c8-4e46-9278-6a8fd3d107cd",
      "name": "Gmail Trigger",
      "type": "n8n-nodes-base.gmailTrigger",
      "position": [
        -1820,
        220
      ]
    },
    {
      "id": "f7dcff0f-7e98-4042-a33e-2fc32d876908",
      "name": "Create blank spreadsheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -780,
        220
      ]
    },
    {
      "id": "9769ad04-a41c-4d55-806a-042b7d00e131",
      "name": "Move spreadsheet in invoice folder",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -560,
        220
      ]
    },
    {
      "id": "f9dbfe55-70b0-4abc-9745-9f4a65d5d1c2",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -1180,
        480
      ]
    },
    {
      "id": "00c59142-6079-4e9c-9374-ad487e48f072",
      "name": "Attachment Verification",
      "type": "n8n-nodes-base.filter",
      "position": [
        -1600,
        220
      ]
    },
    {
      "id": "8a29ac14-be2b-468a-97fa-540d28e80006",
      "name": "Extract Invoice data",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        -1380,
        220
      ]
    },
    {
      "id": "ae08cdc8-fcf9-4891-be86-b2dcf6f35278",
      "name": "Preparing Final data",
      "type": "n8n-nodes-base.code",
      "position": [
        -340,
        220
      ]
    },
    {
      "id": "7615a5b0-8761-43e2-82b0-32ac5c772f44",
      "name": "Final Spreadsheet with Invoice data",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -140,
        220
      ]
    },
    {
      "id": "e68aa386-7150-4070-a5d7-1dcb963b620d",
      "name": "Invoice AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -1160,
        220
      ]
    },
    {
      "id": "335a80c5-ad86-4379-b1a6-9a2ef7285f3c",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2860,
        100
      ],
      "parameters": {
        "width": 880,
        "height": 1520,
        "content": "AI Invoice Processor Agent: Email to Structured Data\nAutomatically extract, analyze, and organize invoice data from Gmail attachments into structured Google Sheets. Perfect for:\n✅ Accountants & bookke"
      }
    }
  ],
  "connections": {
    "Gmail Trigger": {
      "main": [
        [
          {
            "node": "Attachment Verification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Invoice AI Agent": {
      "main": [
        [
          {
            "node": "Create blank spreadsheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Invoice AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Extract Invoice data": {
      "main": [
        [
          {
            "node": "Invoice AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Preparing Final data": {
      "main": [
        [
          {
            "node": "Final Spreadsheet with Invoice data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Attachment Verification": {
      "main": [
        [
          {
            "node": "Extract Invoice data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create blank spreadsheet": {
      "main": [
        [
          {
            "node": "Move spreadsheet in invoice folder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Move spreadsheet in invoice folder": {
      "main": [
        [
          {
            "node": "Preparing Final data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}