{
  "name": "Analyze food ingredients from Telegram photos using Gemini and Airtable",
  "nodes": [
    {
      "id": "fc0ac288-3105-47a1-aa92-d76440e02c93",
      "name": "Data Aggregation",
      "type": "n8n-nodes-base.code",
      "position": [
        672,
        -80
      ]
    },
    {
      "id": "bee23e18-c3ae-4bd4-be5c-8b93d1b42817",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1472,
        -80
      ]
    },
    {
      "id": "086c3b46-dcc5-48f3-be8a-ff555aa587ff",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1192,
        144
      ]
    },
    {
      "id": "0dcc9287-6d9f-4db5-afdd-eb8cfaf39efd",
      "name": "AI OCR Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1120,
        -80
      ]
    },
    {
      "id": "303f78e7-1295-43ca-8c28-6f6e118412e3",
      "name": "JSON Parse & Routing",
      "type": "n8n-nodes-base.code",
      "position": [
        1824,
        -80
      ]
    },
    {
      "id": "06fe722f-1a28-4f0f-bd28-35781ba23a0f",
      "name": "Send a text message",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2048,
        -80
      ]
    },
    {
      "id": "a3c9ec6b-5bb2-42f3-a96f-95f4835f399f",
      "name": "Create a record",
      "type": "n8n-nodes-base.airtable",
      "position": [
        2272,
        -80
      ]
    },
    {
      "id": "964083b7-e40b-4255-af7f-3c0474a34d44",
      "name": "Get a file",
      "type": "n8n-nodes-base.telegram",
      "position": [
        896,
        -80
      ]
    },
    {
      "id": "12d12ac3-5d1c-4123-b677-a8b6dd55ec6b",
      "name": "Watchlist",
      "type": "n8n-nodes-base.airtable",
      "position": [
        240,
        -80
      ]
    },
    {
      "id": "54b17913-0126-48cb-9667-43fce3b35fb1",
      "name": "Preferences",
      "type": "n8n-nodes-base.airtable",
      "position": [
        448,
        -80
      ]
    },
    {
      "id": "3d8804b2-8fb4-4306-a556-5c2304f6b1ed",
      "name": "Telegram Trigger",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -16,
        -80
      ]
    },
    {
      "id": "5354c9c0-b24b-4b63-8d59-7fa0f23ad727",
      "name": "Done!",
      "type": "n8n-nodes-base.noOp",
      "position": [
        2496,
        -80
      ]
    },
    {
      "id": "d4c3a9f7-190a-4517-ae8c-9f552768662b",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        1544,
        144
      ]
    },
    {
      "id": "6f47bacb-c8bc-4d40-8316-24072891976c",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -896,
        -464
      ],
      "parameters": {
        "width": 720,
        "height": 848,
        "content": "# 🛡️ Personal Ingredient Bodyguard\n**Turn Telegram into a smart food safety scanner!**\n\nThis workflow takes a photo from Telegram, reads the text using Local OCR, and uses Gemini to cross-reference it"
      }
    },
    {
      "id": "2e13f201-9837-4b12-8355-4232bc6aeaf4",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -144,
        -608
      ],
      "parameters": {
        "width": 336,
        "height": 1184,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n# 🤖 Telegram nodes: Input & Output\n**Connect your Telegram Bot**\n\n1. Talk to **@BotFather** on Telegram to create a new bot.\n2. Copy the **API Token"
      }
    },
    {
      "id": "1efcac35-a3d8-4a78-a9a0-5eebb9fbe7f9",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1088,
        -512
      ],
      "parameters": {
        "width": 640,
        "height": 992,
        "content": "# 👁️ Vision & Logic\n**Hybrid AI Architecture**\n\nThis section splits the work to save costs and increase privacy.\n\n**1. The Eyes (OCR)** 👁️\n* **Node:** `AI OCR Agent` + `OpenAI Chat Model`\n* **Config:*"
      }
    },
    {
      "id": "a73a681e-a824-4c00-a3ac-28d329d19996",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        224,
        -608
      ],
      "parameters": {
        "width": 1776,
        "height": 1184,
        "content": "# ⚙️ Data Processing\n\n* **Data Aggregation:** Pulls your `Active` watchlist and `Preferences` from Airtable and formats them into a prompt for the AI.\n* **JSON Parse:** Cleans the AI's output to ensur"
      }
    },
    {
      "id": "fbf54b05-040a-4166-a8d3-2fb7c7aca150",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2384,
        -608
      ],
      "parameters": {
        "width": 352,
        "height": 1184,
        "content": "# ✅ Workflow Complete!\n**Cycle Finished Successfully**\n\nIf the execution reaches this node:\n1. 📸 Image was processed.\n2. 🧪 Ingredients were analyzed.\n3. 📲 User received the Telegram reply.\n4. 📝 Result"
      }
    }
  ],
  "connections": {
    "AI Agent": {
      "main": [
        [
          {
            "node": "JSON Parse & Routing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Watchlist": {
      "main": [
        [
          {
            "node": "Preferences",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get a file": {
      "main": [
        [
          {
            "node": "AI OCR Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Preferences": {
      "main": [
        [
          {
            "node": "Data Aggregation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI OCR Agent": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create a record": {
      "main": [
        [
          {
            "node": "Done!",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Data Aggregation": {
      "main": [
        [
          {
            "node": "Get a file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "Watchlist",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI OCR Agent",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "AI OCR Agent",
            "type": "ai_languageModel",
            "index": 1
          }
        ]
      ]
    },
    "Send a text message": {
      "main": [
        [
          {
            "node": "Create a record",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "JSON Parse & Routing": {
      "main": [
        [
          {
            "node": "Send a text message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  }
}