{
  "name": "AI-powered invoice extractor via Telegram to Airtable",
  "nodes": [
    {
      "id": "189e5268-10ed-4031-82d0-1b8e3e357b54",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1552,
        688
      ]
    },
    {
      "id": "049ecc9f-4b50-4816-85de-de014d5d67bd",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        1712,
        688
      ]
    },
    {
      "id": "a2fc4040-1e46-4dcf-a737-a5daf958b3d3",
      "name": "Create Line Item1",
      "type": "n8n-nodes-base.airtableTool",
      "position": [
        2032,
        688
      ]
    },
    {
      "id": "8b7727e5-d8a6-45c6-ab3a-ca0d9aaad5cf",
      "name": "Create Invoice1",
      "type": "n8n-nodes-base.airtableTool",
      "position": [
        1872,
        720
      ]
    },
    {
      "id": "891591f1-c49c-4a07-8e31-897c170ca3d3",
      "name": "Telegram3",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2208,
        448
      ]
    },
    {
      "id": "8d8a2f8e-c597-4c1c-b3b5-ef885a34fb58",
      "name": "Edit Fields1",
      "type": "n8n-nodes-base.set",
      "position": [
        1424,
        448
      ]
    },
    {
      "id": "464bf8e2-36b8-4fac-a8f5-aa6534a33ba6",
      "name": "Telegram2",
      "type": "n8n-nodes-base.telegram",
      "position": [
        976,
        304
      ]
    },
    {
      "id": "22233cf2-bea7-4e63-99ee-6fb4362ec5a5",
      "name": "Extract from File1",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        1184,
        288
      ]
    },
    {
      "id": "66f8e4dc-87ab-4aef-bbb6-092b9e9c2aa9",
      "name": "Switch1",
      "type": "n8n-nodes-base.switch",
      "position": [
        768,
        448
      ]
    },
    {
      "id": "9a9456f2-822d-49dc-bef7-c388fa305a25",
      "name": "Telegram Trigger1",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        544,
        448
      ]
    },
    {
      "id": "dfe45125-5b47-49ac-a554-b711877d9dd0",
      "name": "AI Agent1",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1744,
        448
      ]
    },
    {
      "id": "b72a51ed-2565-44f5-a604-404b7cce3464",
      "name": "Setup Requirements",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        176,
        -144
      ],
      "parameters": {
        "width": 300,
        "height": 474,
        "content": "📋 SETUP REQUIREMENTS\n\n🔧 Prerequisites:\n• Telegram Bot Token (from @BotFather)\n• OpenAI API Key (GPT-4o model access)\n• Airtable Account with API access\n\n📊 Airtable Setup:\n• Base: 'Invoice Tracker Prop"
      }
    },
    {
      "id": "ea014ffe-0cfc-4b11-9f30-25540383525c",
      "name": "Workflow Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        496,
        -144
      ],
      "parameters": {
        "width": 300,
        "height": 472,
        "content": "🤖 INVOICE CATEGORISER WORKFLOW\n\n📝 Purpose:\nAutomatically extracts invoice data from PDF files sent via Telegram and stores structured data in Airtable\n\n🔄 Process Flow:\n1. Telegram message received\n2. "
      }
    },
    {
      "id": "e3a61fbb-0fb3-4a5a-baba-a308aa9abac7",
      "name": "Usage Instructions",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        176,
        352
      ],
      "parameters": {
        "width": 300,
        "height": 524,
        "content": "📱 HOW TO USE\n\n1️⃣ Start Conversation:\n• Send any message to the Telegram bot\n• Bot will ask for company/individual name\n\n2️⃣ Upload Invoice:\n• Send PDF invoice as file attachment\n• Bot will automatica"
      }
    },
    {
      "id": "a4a18c9d-f8f3-44a4-b497-c8bd3ead9b53",
      "name": "Data Structure",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1232,
        -208
      ],
      "parameters": {
        "width": 280,
        "height": 440,
        "content": "📊 AIRTABLE DATA STRUCTURE\n\n📋 Invoices Table Fields:\n• Invoice Number, Date, Supplier\n• Supplier Address, Tax ID\n• PO Number, Due Date\n• Receiver Name, Address\n• Total Tax, Total Amount\n• Delivery Date"
      }
    },
    {
      "id": "00cc68f8-d71e-49fe-9a14-86159a111c7d",
      "name": "Troubleshooting",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1568,
        -272
      ],
      "parameters": {
        "width": 280,
        "height": 590,
        "content": "🔧 TROUBLESHOOTING\n\n❌ Common Issues:\n\n📄 PDF Not Processing:\n• Check file is actually PDF format\n• Ensure file size is reasonable\n• Verify PDF contains readable text\n\n🤖 AI Not Responding:\n• Check OpenAI"
      }
    },
    {
      "id": "1c1abbbd-b162-4803-9b90-28e663424a61",
      "name": "Configuration Notes",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        864,
        -288
      ],
      "parameters": {
        "width": 300,
        "height": 544,
        "content": "⚙️ CONFIGURATION NOTES\n\n🎯 AI Agent Settings:\n• Uses GPT-4o model for accuracy\n• Structured prompts for consistency\n• Memory enabled for context\n• Tools connected for Airtable operations\n\n📋 Data Valida"
      }
    }
  ],
  "connections": {
    "Switch1": {
      "main": [
        [
          {
            "node": "Telegram2",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Edit Fields1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent1": {
      "main": [
        [
          {
            "node": "Telegram3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram2": {
      "main": [
        [
          {
            "node": "Extract from File1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields1": {
      "main": [
        [
          {
            "node": "AI Agent1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent1",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Create Invoice1": {
      "ai_tool": [
        [
          {
            "node": "AI Agent1",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Create Line Item1": {
      "ai_tool": [
        [
          {
            "node": "AI Agent1",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent1",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger1": {
      "main": [
        [
          {
            "node": "Switch1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract from File1": {
      "main": [
        [
          {
            "node": "Edit Fields1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}