{
  "name": "Automated invoice-PO matching with Google Gemini AI and email notifications",
  "nodes": [
    {
      "id": "67440d4f-4122-4732-92a4-cf62bf064159",
      "name": "Google Drive Trigger",
      "type": "n8n-nodes-base.googleDriveTrigger",
      "position": [
        -992,
        -208
      ]
    },
    {
      "id": "98a803af-25a6-4933-a0eb-29afa7fe95ac",
      "name": "Download file",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -768,
        -208
      ]
    },
    {
      "id": "ecadedd7-ba41-4212-8ec0-57c8ce47d075",
      "name": "Extract from File",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        -544,
        -208
      ]
    },
    {
      "id": "301efe65-f9d1-41d4-9b9b-1727eec6e2ac",
      "name": "Information Extractor",
      "type": "@n8n/n8n-nodes-langchain.informationExtractor",
      "position": [
        -320,
        -208
      ]
    },
    {
      "id": "ec28ded6-e060-481d-9434-c1b86130ac67",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -256,
        16
      ]
    },
    {
      "id": "70cf4980-33f4-4c61-ac16-e3ea16fbf92c",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        32,
        -208
      ]
    },
    {
      "id": "23b35100-3876-4f9f-bcca-52710f96f354",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        320,
        -256
      ]
    },
    {
      "id": "664fe47a-83cb-4cfd-b210-a175b0d6a312",
      "name": "Google Gemini Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        256,
        -32
      ]
    },
    {
      "id": "6604eac1-8429-4dad-9ede-350fd8d2b591",
      "name": "PO_DB",
      "type": "n8n-nodes-base.googleSheetsTool",
      "position": [
        384,
        -32
      ]
    },
    {
      "id": "10a033f5-b15d-402d-81c1-a9ee6753b90e",
      "name": "Update_Row",
      "type": "n8n-nodes-base.googleSheetsTool",
      "position": [
        512,
        -32
      ]
    },
    {
      "id": "860e77ab-9c58-4548-be34-7d8bbff8a06a",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        720,
        -256
      ]
    },
    {
      "id": "79803fd2-cea1-4f89-80bb-2263774b12dd",
      "name": "Append row in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        928,
        -416
      ]
    },
    {
      "id": "bd4a913c-2fd9-4f19-b712-eecfc766e814",
      "name": "Send a message",
      "type": "n8n-nodes-base.microsoftOutlook",
      "position": [
        960,
        -80
      ]
    },
    {
      "id": "fd896f77-5a44-4772-bf2b-fb258c639ec1",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        640,
        96
      ]
    },
    {
      "id": "44330d6b-06af-4d6b-864e-91c243adb29a",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1104,
        -592
      ],
      "parameters": {
        "width": 688,
        "height": 320,
        "content": "## Invoice PO matching process\n\n1. It extracts the data from invoice\n2. Using AI model extract the required fields from teh data\n3. Check if teh amount is greater than 5000 \n4. Send for review with PO"
      }
    },
    {
      "id": "b3d2c3de-2632-46d7-bbfe-a50faf2b293a",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1040,
        -224
      ],
      "parameters": {
        "width": 1024,
        "height": 224,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\nExtract the invoice data and extarct the required information from invoice"
      }
    },
    {
      "id": "2c8ccecd-6fdf-4bbf-995c-3d6269966477",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        -432
      ],
      "parameters": {
        "width": 528,
        "height": null,
        "content": "Check the amount is greater than 5000 and validated with PO database"
      }
    },
    {
      "id": "6826e75f-1496-4abd-b2a3-4ebabe0b9dd5",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        784,
        -592
      ],
      "parameters": {
        "width": 320,
        "height": null,
        "content": "Approval for payment process"
      }
    },
    {
      "id": "ac78f8cc-0413-40df-a6df-8de8175b9003",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        880,
        80
      ],
      "parameters": {
        "width": 320,
        "height": null,
        "content": "Send email if not match"
      }
    }
  ],
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Append row in sheet",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "PO_DB": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Switch": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Append row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update_Row": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Download file": {
      "main": [
        [
          {
            "node": "Extract from File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract from File": {
      "main": [
        [
          {
            "node": "Information Extractor",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Drive Trigger": {
      "main": [
        [
          {
            "node": "Download file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Information Extractor": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Information Extractor",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  }
}