{
  "name": "Chat with your event schedule from Google Sheets in Telegram",
  "nodes": [
    {
      "id": "ae5f9ca6-6bba-4fe8-b955-6c615d8a522f",
      "name": "SendTyping",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -1780,
        -260
      ]
    },
    {
      "id": "244e7be3-2caa-46f7-8628-d063a3b84c12",
      "name": "SetResponse",
      "type": "n8n-nodes-base.set",
      "position": [
        40,
        -420
      ]
    },
    {
      "id": "192aa194-f131-4ba3-8842-7c88da1a6129",
      "name": "Settings",
      "type": "n8n-nodes-base.set",
      "position": [
        -1260,
        -420
      ]
    },
    {
      "id": "1c52cdf5-da32-4c76-a294-5ec2109dbf39",
      "name": "Schedule",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -980,
        -420
      ]
    },
    {
      "id": "eff88417-4ce6-4809-8693-dc63e00fff20",
      "name": "ScheduleToMarkdown",
      "type": "n8n-nodes-base.code",
      "position": [
        -800,
        -420
      ]
    },
    {
      "id": "04fab70c-493a-4c5d-adfb-0d9e8a5b7382",
      "name": "ScheduleBot",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -480,
        -420
      ]
    },
    {
      "id": "be29d3ec-8211-4f23-82f2-83a1aa3aad5b",
      "name": "n8nChatSettings",
      "type": "n8n-nodes-base.set",
      "position": [
        -1580,
        -520
      ]
    },
    {
      "id": "b7078c59-b6e6-4002-831f-96e56278ab61",
      "name": "telegramChatSettings",
      "type": "n8n-nodes-base.set",
      "position": [
        -1580,
        -260
      ]
    },
    {
      "id": "1ba6ad37-f1e5-440d-bf10-569038c27bce",
      "name": "telegramInput",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -1960,
        -260
      ]
    },
    {
      "id": "56a52e8a-714f-4e7a-8a13-e915e9dc29c4",
      "name": "n8nInput",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -1960,
        -520
      ]
    },
    {
      "id": "961f67f0-bd44-4e7f-9f2f-c2f02f3176ce",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        220,
        -420
      ]
    },
    {
      "id": "57056425-37ba-417d-9a2d-977a81d378ab",
      "name": "telegramResponse",
      "type": "n8n-nodes-base.telegram",
      "position": [
        500,
        -280
      ]
    },
    {
      "id": "2962a77f-5727-43be-93fb-b0751b63c6ac",
      "name": "n8nResponse",
      "type": "n8n-nodes-base.noOp",
      "position": [
        500,
        -520
      ]
    },
    {
      "id": "0932484f-707b-412b-b9cb-431a8ae64447",
      "name": "LLM",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        -600,
        -220
      ]
    },
    {
      "id": "65948d2c-71b2-4df0-97db-ed216ed7c691",
      "name": "Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        -500,
        -220
      ]
    },
    {
      "id": "50566274-cf7c-496f-a166-b45eb3114da3",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2000,
        -600
      ],
      "parameters": {
        "width": 620,
        "height": 240,
        "content": "## Chat input triggered inside n8n\nUsed for testing and debugging"
      }
    },
    {
      "id": "9dc636fb-cc86-4236-8eb9-952a4ab0ef68",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2000,
        -340
      ],
      "parameters": {
        "width": 620,
        "height": 240,
        "content": "## Chat input triggered by Telegram\nUsed for live chat within Telegram"
      }
    },
    {
      "id": "0429d589-3e80-4b26-96a0-01554899a3e7",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        420,
        -340
      ],
      "parameters": {
        "width": 360,
        "height": 240,
        "content": "## Chat response to Telegram"
      }
    },
    {
      "id": "9eeccee0-c6a0-40c6-9b7d-1f672bf0fdb9",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        420,
        -600
      ],
      "parameters": {
        "width": 360,
        "height": 240,
        "content": "## Chat response inside n8n"
      }
    },
    {
      "id": "acb8e550-be94-41b7-904a-641b3b87e928",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -40,
        -600
      ],
      "parameters": {
        "width": 440,
        "height": 500,
        "content": "## Prepare response\nDecide to which chat the response will go."
      }
    },
    {
      "id": "42ce6eac-165b-463d-822e-355aff030525",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -620,
        -600
      ],
      "parameters": {
        "width": 560,
        "height": 500,
        "content": "## AI Processing\nChat input → Chat output"
      }
    },
    {
      "id": "33c45fcc-3aa5-4cd3-b393-e1723560dfeb",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1040,
        -600
      ],
      "parameters": {
        "width": 400,
        "height": 500,
        "content": "## Retrieve Data\nGet schedule from Google Spreadsheet and convert it to a Markdown-Table as context for the LLM"
      }
    },
    {
      "id": "6e1017e3-bf9d-4056-a64f-c94476bd1f43",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1360,
        -600
      ],
      "parameters": {
        "width": 300,
        "height": 500,
        "content": "## Normalize input\nTransfer the chat data into a unified set of variables"
      }
    }
  ],
  "connections": {
    "LLM": {
      "ai_languageModel": [
        [
          {
            "node": "ScheduleBot",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Memory": {
      "ai_memory": [
        [
          {
            "node": "ScheduleBot",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Switch": {
      "main": [
        [
          {
            "node": "n8nResponse",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "telegramResponse",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule": {
      "main": [
        [
          {
            "node": "ScheduleToMarkdown",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Settings": {
      "main": [
        [
          {
            "node": "Schedule",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "n8nInput": {
      "main": [
        [
          {
            "node": "n8nChatSettings",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SendTyping": {
      "main": [
        [
          {
            "node": "telegramChatSettings",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ScheduleBot": {
      "main": [
        [
          {
            "node": "SetResponse",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SetResponse": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "telegramInput": {
      "main": [
        [
          {
            "node": "SendTyping",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "n8nChatSettings": {
      "main": [
        [
          {
            "node": "Settings",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "telegramResponse": {
      "main": [
        []
      ]
    },
    "ScheduleToMarkdown": {
      "main": [
        [
          {
            "node": "ScheduleBot",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "telegramChatSettings": {
      "main": [
        [
          {
            "node": "Settings",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}