{
  "name": "Automate invoice data extraction from Google Drive to Airtable using Nanonets OCR & Command-R",
  "nodes": [
    {
      "id": "520e70c0-0a88-4837-95bd-dfc7a62f6b57",
      "name": "Download file",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        288,
        144
      ]
    },
    {
      "id": "71c96b1b-91fb-4b15-b9e6-eafe713d34f5",
      "name": "Move failed",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1696,
        208
      ]
    },
    {
      "id": "7f2ee535-6f0c-433a-a08d-daf53dc58ee9",
      "name": "Move successful",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1872,
        304
      ]
    },
    {
      "id": "1623bb25-f453-4e64-8ba9-3d8357c1a905",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -160,
        272
      ]
    },
    {
      "id": "8a20d5de-c6d6-40e1-be01-5e00c7340010",
      "name": "file name & ID",
      "type": "n8n-nodes-base.set",
      "position": [
        64,
        144
      ]
    },
    {
      "id": "b96ff546-abe2-4bf7-b8fd-67f29170a647",
      "name": "Done!",
      "type": "n8n-nodes-base.noOp",
      "position": [
        64,
        -48
      ]
    },
    {
      "id": "a5b9cc98-fb3e-4faf-84e9-37cdd5b3fd91",
      "name": "AI Agent-OCR",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        512,
        144
      ]
    },
    {
      "id": "d27bfe6f-619d-49f6-a965-60dcac00c3d9",
      "name": "Data Cleaner",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        864,
        80
      ]
    },
    {
      "id": "39ed5668-cf2b-4f76-8cb6-0f3ea0231059",
      "name": "OCR folder",
      "type": "n8n-nodes-base.googleDriveTrigger",
      "position": [
        -464,
        272
      ]
    },
    {
      "id": "b803e5e5-68e1-45b7-9474-3eb5bb7d0626",
      "name": "AirTable - Create a record1",
      "type": "n8n-nodes-base.airtable",
      "position": [
        1312,
        304
      ]
    },
    {
      "id": "0443a7f6-67da-4536-b980-082b48432d05",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1216,
        -112
      ],
      "parameters": {
        "width": 560,
        "height": 640,
        "content": "## 🚀 Welcome: OCR to Airtable Pipeline\nThis template automatically processes invoices and receipts:\n1.  **Watches** a Google Drive folder.\n2.  **Performs OCR** on the file.\n3.  **Cleans & Structures**"
      }
    },
    {
      "id": "9972fd7b-b812-4e10-a044-1c6d88ca3f92",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -592,
        -16
      ],
      "parameters": {
        "width": 352,
        "height": 448,
        "content": "## 1. Configure \"New File\" Trigger\n\nThis node watches for new files to process.\n\n**Your To-Do:**\n1.  Select your Google Drive **Credentials**.\n2.  Choose the **Folder to Watch** (this is your \"inbox\" "
      }
    },
    {
      "id": "f781ba6c-36cb-4158-9fa3-195e7d18d28a",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        544,
        512
      ]
    },
    {
      "id": "484cc002-53bb-42ea-a54d-f6c75d6e06e7",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        336,
        464
      ],
      "parameters": {
        "width": 496,
        "height": 480,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## 2. Configure OCR AI Model\n\nThis node connects to the AI model that performs the OCR.\n\n**Your To-Do:**\n1.  Select your **Credentials**. (If using Ollama, this is your OpenAI-compatibl"
      }
    },
    {
      "id": "eccbea42-cfd1-4a0b-9cc8-437813e4992b",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        784,
        -256
      ],
      "parameters": {
        "width": 416,
        "height": 448,
        "content": "## 3. Configure Data Cleaning AI\n\nThis AI node takes the raw OCR text, cleans it, and structures it into the required JSON format.\n\n**Your To-Do:**\n1.  Select your **Credentials** (can be the same as "
      }
    },
    {
      "id": "8db3ef29-185f-4ff6-a1bf-3b123eef61c6",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1104,
        288
      ],
      "parameters": {
        "width": 496,
        "height": 560,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## 4. Configure Airtable Output\n\nThis node saves the clean JSON data to your Airtable base.\n\n**Your To-Do:**\n1.  Make sure you duplicated the base from the link in the main note!\n2. "
      }
    },
    {
      "id": "27a3770b-391f-4688-89bd-19aca6b307ec",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1632,
        -48
      ],
      "parameters": {
        "width": 496,
        "height": 496,
        "content": "## 5. Configure \"Done\" & \"Failed\" Folders\n\nThese nodes move the processed file to keep your inbox clean.\n\n**Your To-Do:**\n1.  Select your Google Drive **Credentials** for both nodes.\n2.  In **`Move su"
      }
    },
    {
      "id": "ddfbafad-d739-4e26-b0f3-27ef4ccbeebd",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        -240
      ],
      "parameters": {
        "width": 464,
        "height": 320,
        "content": "## 6.✅ All Done!\n\nThis node signals that the loop has finished processing all the files from its last run.\n\nThe workflow is now idle and will wait for the next file to be added to your Google Drive fo"
      }
    }
  ],
  "connections": {
    "OCR folder": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Move failed": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent-OCR": {
      "main": [
        [
          {
            "node": "Data Cleaner",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Move failed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Data Cleaner": {
      "main": [
        [
          {
            "node": "AirTable - Create a record1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Move failed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download file": {
      "main": [
        [
          {
            "node": "AI Agent-OCR",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "file name & ID": {
      "main": [
        [
          {
            "node": "Download file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "Done!",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "file name & ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Move successful": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent-OCR",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "AI Agent-OCR",
            "type": "ai_languageModel",
            "index": 1
          }
        ]
      ]
    },
    "AirTable - Create a record1": {
      "main": [
        [
          {
            "node": "Move successful",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}