{
  "name": "Parse invoices & documents with Gemini AI, OCR, and Google Sheets integration",
  "nodes": [
    {
      "id": "98517a08-3fc4-4c0c-aa4b-44d93c864eb4",
      "name": "Check file type",
      "type": "n8n-nodes-base.switch",
      "position": [
        220,
        860
      ]
    },
    {
      "id": "6ef5d99c-b842-4290-9766-8b780df66f6b",
      "name": "Invoice data",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        738,
        1110
      ]
    },
    {
      "id": "6b0ce6fd-5d09-4bc2-a3b2-cc8c0e2878d6",
      "name": "Invoice Data",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1256,
        760
      ]
    },
    {
      "id": "7f5b8ffe-d4e8-4b7b-803e-6c37d0da0221",
      "name": "Transfrom data",
      "type": "n8n-nodes-base.code",
      "position": [
        1036,
        760
      ]
    },
    {
      "id": "b818ac61-4837-4a9f-b90e-bb6b4b7739c1",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        748,
        880
      ]
    },
    {
      "id": "2941bf32-0db6-4486-8696-e207de09364c",
      "name": "Format data from text",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        660,
        660
      ]
    },
    {
      "id": "7c829587-f028-4332-831f-92f9529b72ca",
      "name": "Webhook Invoice upload",
      "type": "n8n-nodes-base.webhook",
      "position": [
        0,
        860
      ]
    },
    {
      "id": "05176b33-fcda-4f1a-84fa-2449108a0a54",
      "name": "PDF to Text",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        440,
        860
      ]
    },
    {
      "id": "81690344-d04c-428b-b720-bb539fbe2bbe",
      "name": "Image to Text",
      "type": "n8n-nodes-tesseractjs.tesseractNode",
      "position": [
        440,
        660
      ]
    },
    {
      "id": "a0f49ed7-1d42-4df8-a802-74754d1549c0",
      "name": "CSV to JSON",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        440,
        1110
      ]
    },
    {
      "id": "0473ba6b-734e-4f53-8ecb-86711db1bd76",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -60,
        1300
      ],
      "parameters": {
        "width": 1500,
        "height": 540,
        "content": "---\n### **Purpose**\n * To automatically extract structured data from uploaded documents (PDFs, images, or CSVs) — such as invoices, logs, or reports — and save the results into Google Sheets using AI "
      }
    },
    {
      "id": "63a9e69e-566c-4db6-9d31-b25f438fbd26",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -72,
        550
      ],
      "parameters": {
        "width": 1500,
        "height": 720,
        "content": "## Smart Document Parser for Invoices, Logs or Sensor Reports (PDF/Image/csv to Sheet)"
      }
    }
  ],
  "connections": {
    "CSV to JSON": {
      "main": [
        [
          {
            "node": "Invoice data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "PDF to Text": {
      "main": [
        [
          {
            "node": "Format data from text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Image to Text": {
      "main": [
        [
          {
            "node": "Format data from text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Transfrom data": {
      "main": [
        [
          {
            "node": "Invoice Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check file type": {
      "main": [
        [
          {
            "node": "Image to Text",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "PDF to Text",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "CSV to JSON",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format data from text": {
      "main": [
        [
          {
            "node": "Transfrom data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook Invoice upload": {
      "main": [
        [
          {
            "node": "Check file type",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Format data from text",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  }
}