{
  "name": "✨🔪 Advanced AI powered document parsing & text extraction with Llama Parse",
  "nodes": [
    {
      "id": "ea7670da-896e-4b9c-b0c2-b3a3dbb6f88f",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -2320,
        80
      ]
    },
    {
      "id": "2c445d40-5d8b-469e-811e-7423f57ba054",
      "name": "Gmail",
      "type": "n8n-nodes-base.gmail",
      "position": [
        -2040,
        -1260
      ]
    },
    {
      "id": "f321e1d3-24ba-4623-bb31-93c7f6389aa9",
      "name": "Gmail Trigger",
      "type": "n8n-nodes-base.gmailTrigger",
      "position": [
        -2360,
        -1260
      ]
    },
    {
      "id": "ad2701f8-be77-465e-bd58-0e964ba412c0",
      "name": "Limit",
      "type": "n8n-nodes-base.limit",
      "position": [
        -1840,
        -1260
      ]
    },
    {
      "id": "c305dbce-714a-420e-8dd0-f5c6e80afa01",
      "name": "Get Message",
      "type": "n8n-nodes-base.gmail",
      "position": [
        -1640,
        -1260
      ]
    },
    {
      "id": "0e67527b-c886-41a1-b66b-c965fd6b44f3",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -920,
        -1500
      ],
      "parameters": {
        "width": 320,
        "height": 340,
        "content": "## Send to LlamaParse\nhttps://docs.cloud.llamaindex.ai/API/upload-file-api-v-1-parsing-upload-post"
      }
    },
    {
      "id": "85e72267-7be0-49ac-b305-4c07356ce244",
      "name": "Parse Document with LlamaParse",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -800,
        -1360
      ]
    },
    {
      "id": "2664705a-31d5-439b-b1e4-fc6b708a7baa",
      "name": "Summarize Email",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        -820,
        -680
      ]
    },
    {
      "id": "1405f933-b281-469f-a5b7-0de2f820dd09",
      "name": "gpt-4o-mini",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -720,
        -540
      ]
    },
    {
      "id": "ea299469-7889-45c9-a8f1-679be09e5aaf",
      "name": "Save LlamaParse ID and Summary to Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -140,
        -1020
      ]
    },
    {
      "id": "d8454cf2-5bef-4bfa-9471-c358ff067765",
      "name": "Save Document to Google Drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -820,
        -1020
      ]
    },
    {
      "id": "03f46b72-9e18-44a4-85ef-0eea058c3c6d",
      "name": "Extract Invoice Details as JSON",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        -1180,
        500
      ]
    },
    {
      "id": "3c371677-76e8-45d7-8c05-a4ca1cc0b1fe",
      "name": "gpt-4o-mini1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -1600,
        240
      ]
    },
    {
      "id": "9ff3f86f-9ffc-42fa-b428-a6bfabf2426a",
      "name": "gpt-4o-mini2",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -1080,
        640
      ]
    },
    {
      "id": "69a0505f-1fe4-4581-ad2d-5bc7d68874e9",
      "name": "Update Google Sheet by LlamaParse ID",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -540,
        600
      ]
    },
    {
      "id": "19907cba-4530-4f25-8a6f-435b1f8d23ad",
      "name": "Invoice Details",
      "type": "n8n-nodes-base.set",
      "position": [
        -780,
        400
      ]
    },
    {
      "id": "af95c024-8e36-499b-af32-4c661da49a61",
      "name": "Prepare Message",
      "type": "n8n-nodes-base.set",
      "position": [
        -540,
        400
      ]
    },
    {
      "id": "333f42a7-2665-4613-89c9-c184d764af37",
      "name": "Send Invoice Details as Telegram Message",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -340,
        400
      ]
    },
    {
      "id": "faa0768f-1d4c-42c4-902c-b2d0d40f0eb4",
      "name": "gpt-4o-mini3",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -1080,
        60
      ]
    },
    {
      "id": "d1a54284-60d1-4fac-b81b-4ed1610ddf2e",
      "name": "Send Error Message 2",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -780,
        600
      ]
    },
    {
      "id": "b1b50042-8270-4e13-b7b1-6d017e9be8d9",
      "name": "Send Error Message 1",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -780,
        60
      ]
    },
    {
      "id": "a365c8a1-c0fb-43f7-84fa-b68a0e9c087e",
      "name": "Send Document Summary as Telegram Message",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -540,
        -200
      ]
    },
    {
      "id": "6abd00a0-2971-49f9-812f-f65a0004136b",
      "name": "Summarize Document",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        -1180,
        -80
      ]
    },
    {
      "id": "e672bcf3-0d5f-4410-ac5b-660c3ba0c456",
      "name": "Classify Parsed Document",
      "type": "@n8n/n8n-nodes-langchain.textClassifier",
      "position": [
        -1680,
        80
      ]
    },
    {
      "id": "cc522966-3e6a-4830-bde9-d4e251752ec0",
      "name": "Get Parsed Markdown",
      "type": "n8n-nodes-base.set",
      "position": [
        -1980,
        80
      ]
    },
    {
      "id": "683fa521-dfd0-4b1c-905f-d5a4f56ab65a",
      "name": "Prepare Data",
      "type": "n8n-nodes-base.set",
      "position": [
        -640,
        -1020
      ]
    },
    {
      "id": "b64a21ab-0e1f-4d6c-b718-a9aaaa27ae19",
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -2040,
        -860
      ]
    },
    {
      "id": "cd0699cf-3a95-4dc8-806a-6a01339c598d",
      "name": "Is there an Email Attachement",
      "type": "n8n-nodes-base.if",
      "position": [
        -1420,
        -1260
      ]
    },
    {
      "id": "269ba37f-fa18-4333-be3c-eee6ef5c0f56",
      "name": "Aggregate",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        -1840,
        -860
      ]
    },
    {
      "id": "dffd2e83-58ff-49a0-b547-3b6f4b92dfa9",
      "name": "Edit Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        -1620,
        -860
      ]
    },
    {
      "id": "02a121a4-edea-45c4-b325-2f61b3d0b02e",
      "name": "Merge Email Processing",
      "type": "n8n-nodes-base.merge",
      "position": [
        -380,
        -1020
      ]
    },
    {
      "id": "c1310be3-6448-48d1-a954-caa3d4651075",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        -1120,
        -1020
      ]
    },
    {
      "id": "dbe3a235-0bae-4743-b53e-154b75911482",
      "name": "If Supported File Extensions",
      "type": "n8n-nodes-base.if",
      "position": [
        -1420,
        -860
      ]
    },
    {
      "id": "1413f84b-d1a9-4b0c-ae43-7f303a54527e",
      "name": "No Operation, do nothing",
      "type": "n8n-nodes-base.noOp",
      "position": [
        -1120,
        -1260
      ]
    },
    {
      "id": "9f3ae287-cb8b-466c-8dbe-678be30c2c04",
      "name": "No Operation, do nothing1",
      "type": "n8n-nodes-base.noOp",
      "position": [
        -1120,
        -780
      ]
    },
    {
      "id": "6f9b5ae2-22e8-4dc8-ba0b-06fbc585f209",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2140,
        -980
      ],
      "parameters": {
        "width": 920,
        "height": 320,
        "content": "## Check for Supported File Extension\nhttps://docs.cloud.llamaindex.ai/API/get-supported-file-extensions-api-v-1-parsing-supported-file-extensions-get"
      }
    },
    {
      "id": "28c5c09a-9a15-4af9-8253-59ae36dfe390",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2140,
        -1420
      ],
      "parameters": {
        "width": 920,
        "height": 400,
        "content": "## Get Emails with Attachments\n### ☀️Disclaimer\nThis workflow only processes the the first attachment of the email.\nAdjust search and limit settings to suit your use case."
      }
    },
    {
      "id": "3174a934-3b64-47b2-b81b-bfe717a034e2",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -920,
        -1120
      ],
      "parameters": {
        "width": 460,
        "height": 300,
        "content": "## Save Document to Google Drive"
      }
    },
    {
      "id": "92f079d1-c5bd-45fe-9372-7ff521eda15b",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -920,
        -780
      ],
      "parameters": {
        "width": 460,
        "height": 380,
        "content": "## Summarize the Email Message"
      }
    },
    {
      "id": "fd7d7e7a-005a-4a43-a3de-e9bb036bb615",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -220,
        -1120
      ],
      "parameters": {
        "width": 300,
        "height": 300,
        "content": "## Save To Google Sheets"
      }
    },
    {
      "id": "c6469054-0345-4371-8928-21a04c21b131",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3060,
        -1540
      ],
      "parameters": {
        "width": 540,
        "height": 1340,
        "content": "# Description\n\nThis workflow automates document processing using LlamaParse to extract and analyze text from various file formats. It intelligently processes documents, extracts structured data, and d"
      }
    },
    {
      "id": "b2024905-5c3b-49d5-89b9-ef41c4a4283c",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2440,
        -1340
      ],
      "parameters": {
        "width": 260,
        "height": 280,
        "content": "## 👍Try Me!"
      }
    },
    {
      "id": "22284854-4005-4678-94f8-d914e031e6fc",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2480,
        -1540
      ],
      "parameters": {
        "width": 2600,
        "height": 1180,
        "content": "# ✨🔪 Advanced AI Powered Document Parsing & Text Extraction with Llama Parse\n"
      }
    },
    {
      "id": "4f0c910e-7ae6-40ac-a659-c14a6704aaba",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1280,
        280
      ],
      "parameters": {
        "width": 1160,
        "height": 540,
        "content": "## Example Invoice Processing\n"
      }
    },
    {
      "id": "e63bbfe8-8be7-4e3f-a8f5-a85b2ee82959",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1220,
        360
      ],
      "parameters": {
        "width": 360,
        "height": 420,
        "content": "## Extract Invoice as JSON\n☀️Update User & System Prompt for Your Specific Use Case"
      }
    },
    {
      "id": "d321e139-0828-4932-b5a9-ef11f6ae9baa",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1280,
        -280
      ],
      "parameters": {
        "width": 980,
        "height": 520,
        "content": "## Example Document Summarizing\n"
      }
    },
    {
      "id": "ab9081bd-c1c5-4db1-8dcd-ff243a7ab9be",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1220,
        -200
      ],
      "parameters": {
        "width": 360,
        "height": 400,
        "content": "## Summarize Document\n☀️Update User & System Prompt for Your Specific Use Case"
      }
    },
    {
      "id": "c08bbfa8-abe1-47e2-babe-b62581bcd011",
      "name": "Sticky Note13",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1760,
        -40
      ],
      "parameters": {
        "width": 440,
        "height": 420,
        "content": "## Classify Parsed Document\nAdd More Classifications as Required"
      }
    },
    {
      "id": "5ffb907f-9701-401e-85e8-3b91a706ab10",
      "name": "Sticky Note14",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2060,
        -40
      ],
      "parameters": {
        "width": 260,
        "height": 320,
        "content": "## Parsed Markdown from LlamaParse"
      }
    },
    {
      "id": "a53034d2-34df-421a-aa14-d9d1bbc00fc5",
      "name": "Sticky Note15",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2440,
        -40
      ],
      "parameters": {
        "width": 340,
        "height": 320,
        "content": "## Receive Parsed Document from LlamaParse"
      }
    },
    {
      "id": "933f03f2-c231-4dcd-8aeb-ce716b8cc00e",
      "name": "Sticky Note16",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2480,
        -320
      ],
      "parameters": {
        "width": 2400,
        "height": 1180,
        "content": "# 🪝Webhook to Receive LlamaParse Response"
      }
    },
    {
      "id": "505a51e4-dea1-4876-964e-f59af728c65b",
      "name": "Sticky Note17",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1760,
        420
      ],
      "parameters": {
        "width": 440,
        "height": 400,
        "content": "## Save Parsed Document to Google Drive"
      }
    },
    {
      "id": "33ca5eaf-30da-4360-a12b-a7dd8614743f",
      "name": "Save Summarized Document to Google Drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -540,
        0
      ]
    },
    {
      "id": "a1e8264f-fa99-49a5-a837-6aaf3a2dc39a",
      "name": "Save Parsed Document to Google Drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -1600,
        560
      ]
    }
  ],
  "connections": {
    "Gmail": {
      "main": [
        [
          {
            "node": "Limit",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Limit": {
      "main": [
        [
          {
            "node": "Get Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "Parse Document with LlamaParse",
            "type": "main",
            "index": 0
          },
          {
            "node": "Save Document to Google Drive",
            "type": "main",
            "index": 0
          },
          {
            "node": "Summarize Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "Get Parsed Markdown",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "If Supported File Extensions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Message": {
      "main": [
        [
          {
            "node": "Is there an Email Attachement",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "gpt-4o-mini": {
      "ai_languageModel": [
        [
          {
            "node": "Summarize Email",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Data": {
      "main": [
        [
          {
            "node": "Merge Email Processing",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "gpt-4o-mini1": {
      "ai_languageModel": [
        [
          {
            "node": "Classify Parsed Document",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "gpt-4o-mini2": {
      "ai_languageModel": [
        [
          {
            "node": "Extract Invoice Details as JSON",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "gpt-4o-mini3": {
      "ai_languageModel": [
        [
          {
            "node": "Summarize Document",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Gmail Trigger": {
      "main": [
        [
          {
            "node": "Gmail",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Invoice Details": {
      "main": [
        [
          {
            "node": "Prepare Message",
            "type": "main",
            "index": 0
          },
          {
            "node": "Update Google Sheet by LlamaParse ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Message": {
      "main": [
        [
          {
            "node": "Send Invoice Details as Telegram Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Summarize Email": {
      "main": [
        [
          {
            "node": "Merge Email Processing",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Summarize Document": {
      "main": [
        [
          {
            "node": "Send Document Summary as Telegram Message",
            "type": "main",
            "index": 0
          },
          {
            "node": "Save Summarized Document to Google Drive",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send Error Message 1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Parsed Markdown": {
      "main": [
        [
          {
            "node": "Classify Parsed Document",
            "type": "main",
            "index": 0
          },
          {
            "node": "Save Parsed Document to Google Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Email Processing": {
      "main": [
        [
          {
            "node": "Save LlamaParse ID and Summary to Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Classify Parsed Document": {
      "main": [
        [
          {
            "node": "Summarize Document",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Extract Invoice Details as JSON",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Supported File Extensions": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ],
        [
          {
            "node": "No Operation, do nothing1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is there an Email Attachement": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "No Operation, do nothing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save Document to Google Drive": {
      "main": [
        [
          {
            "node": "Prepare Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Document with LlamaParse": {
      "main": [
        [
          {
            "node": "Merge Email Processing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Invoice Details as JSON": {
      "main": [
        [
          {
            "node": "Invoice Details",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send Error Message 2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save LlamaParse ID and Summary to Google Sheets": {
      "main": [
        []
      ]
    }
  }
}