{
  "name": "Gmail AI search assistant on Telegram (Gemini-powered)",
  "nodes": [
    {
      "id": "78a9a2ba-dfbd-4b29-abb0-0d8e50fca199",
      "name": "Basic LLM Chain",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        60,
        260
      ]
    },
    {
      "id": "967d4a5f-f911-4c1d-b9ee-36f7edddac96",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        160,
        600
      ]
    },
    {
      "id": "e5b584a1-c153-46bc-adb3-00a6e355ba99",
      "name": "Google Gemini Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        980,
        480
      ]
    },
    {
      "id": "7cd5d1d5-a75f-43d6-9e68-2212396394df",
      "name": "Basic LLM Chain1",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        1020,
        260
      ]
    },
    {
      "id": "30113c5d-07b9-4015-ab26-9a69fc874038",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -500,
        260
      ]
    },
    {
      "id": "ed601ecc-c4c0-4de1-9e3a-cb398ffe35c8",
      "name": "Google Gemini Chat Model2",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -460,
        600
      ]
    },
    {
      "id": "5c577624-52e0-4a17-8604-80e2cd4b77de",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -200,
        600
      ]
    },
    {
      "id": "371362b5-44c3-490a-bea9-a5e1d0246fd9",
      "name": "Structured Output Parser1",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        420,
        600
      ]
    },
    {
      "id": "2e2dc24c-f458-4339-86bf-6501e84c4ea3",
      "name": "Structured Output Parser2",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1220,
        500
      ]
    },
    {
      "id": "c2aa8043-0df7-48fe-87eb-f6bcdc09a6f9",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -960,
        -20
      ],
      "parameters": {
        "width": 360,
        "height": 480,
        "content": "## 1. Telegram Bot (API)\n1. Create a bot using Bot_Father on telegram by sending a message to @BotFather.\n\n2. Send a command /newbot in the message.\n\n3. Choose username and then copy the api.\n\n4. Crea"
      }
    },
    {
      "id": "eb75fe77-953b-4c81-8d42-79b70171b947",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -580,
        500
      ],
      "parameters": {
        "width": 340,
        "height": 260,
        "content": "Replace the API with your own API of Gemini or choose an OpenAi node if you want to use openai model. (depends on your choice)."
      }
    },
    {
      "id": "faca346a-8a08-49d2-902d-a29cfb366228",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        40,
        500
      ],
      "parameters": {
        "width": 340,
        "height": 260,
        "content": "Replace the API with your own API of Gemini or choose an OpenAi node if you want to use openai model. (depends on your choice)."
      }
    },
    {
      "id": "4067630a-3888-42f9-ad7e-e01f87d6430e",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        440,
        -80
      ],
      "parameters": {
        "width": 320,
        "height": 520,
        "content": "## 2. Connecting Your Gmail Account.\n\n1. Connect your Gmail account – Choose the account you want to retrieve emails from.\n\n2. Set the email limit – Enter the number of emails you want to fetch, or ch"
      }
    },
    {
      "id": "be41decd-60dc-4055-acc7-9ffc8201c7a3",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1400,
        20
      ],
      "parameters": {
        "width": 340,
        "height": 420,
        "content": "## 3. Chat ID.\n\n1. Get the Chat ID – Copy the output from the first Telegram trigger node, then pass it to an AI model to extract the Chat ID.\n\n2. Use the Chat ID – Once identified, simply drag and dr"
      }
    },
    {
      "id": "d3371952-c3aa-4cd9-ab08-594b4760ad48",
      "name": "User Request - Telegram Trigger",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -800,
        260
      ]
    },
    {
      "id": "683f78bd-1ac4-4b51-90ed-17f0675bc1cb",
      "name": "Set Parameters From User Request (for fetching emails)",
      "type": "n8n-nodes-base.set",
      "position": [
        -140,
        260
      ]
    },
    {
      "id": "fb2cb2c8-59e9-40e6-abe0-447335e499fb",
      "name": "Gets Requested Email(s)",
      "type": "n8n-nodes-base.gmail",
      "position": [
        540,
        260
      ]
    },
    {
      "id": "4b229ce7-c941-4d6c-a999-26054468490c",
      "name": "Sets Parameters For Response",
      "type": "n8n-nodes-base.set",
      "position": [
        840,
        260
      ]
    },
    {
      "id": "e7501362-37d8-4a05-919a-72ad419ee59a",
      "name": "Sends (requested emails) via Telegram back",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1500,
        260
      ]
    }
  ],
  "connections": {
    "AI Agent": {
      "main": [
        [
          {
            "node": "Set Parameters From User Request (for fetching emails)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Basic LLM Chain": {
      "main": [
        [
          {
            "node": "Gets Requested Email(s)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Basic LLM Chain1": {
      "main": [
        [
          {
            "node": "Sends (requested emails) via Telegram back",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gets Requested Email(s)": {
      "main": [
        [
          {
            "node": "Sets Parameters For Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Basic LLM Chain",
            "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": "Basic LLM Chain1",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser1": {
      "ai_outputParser": [
        [
          {
            "node": "Basic LLM Chain",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser2": {
      "ai_outputParser": [
        [
          {
            "node": "Basic LLM Chain1",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Sets Parameters For Response": {
      "main": [
        [
          {
            "node": "Basic LLM Chain1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "User Request - Telegram Trigger": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Parameters From User Request (for fetching emails)": {
      "main": [
        [
          {
            "node": "Basic LLM Chain",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}