{
  "name": "Telegram AI chatbot agent with InfraNodus GraphRAG knowledge base",
  "nodes": [
    {
      "id": "736e717e-bad8-4943-9ae2-955cf588112d",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -256,
        -800
      ],
      "parameters": {
        "width": 540,
        "height": 760,
        "content": "# AI Telegram Chatbot Agent with Experts\n\n### Uses the InfraNodus knowledge graphs and its Graph RAG to retrieve relevant information.\n\nUse your [InfraNodus graph](https://infranodus.com) as the knowl"
      }
    },
    {
      "id": "e966551c-01db-4b3e-a233-632ce1c24d2f",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        624,
        272
      ],
      "parameters": {
        "width": 200,
        "height": 540,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## Chat Memory\n\nWe use the Simple Memory node to track the conversation's context so that the user can refer to previous messages as they converse with the model."
      }
    },
    {
      "id": "d1507b1d-238f-4ff1-a181-e8120c838714",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        432,
        -256
      ],
      "parameters": {
        "width": 460,
        "height": 400,
        "content": "## 3. AI Agent Workflow\n\n### Chooses which tool (expert) to use, depending on the user's message. Then receives the responses and synthesizes the final answer.\n\nMake sure you describe the tools availa"
      }
    },
    {
      "id": "9cd0245e-a848-487a-bca7-22f8cf1ec95f",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -256,
        32
      ],
      "parameters": {
        "width": null,
        "height": 500,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## 1. Telegram Trigger\n\nThe conversation will be triggered when you send a message to your Telegram bot. To set up a bot, simply message `/newbot` to `@botfather` in Telegram. It take"
      }
    },
    {
      "id": "dc80cc79-24e7-4a43-8869-ba1ef48e2026",
      "name": "OpenAI Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        416,
        288
      ]
    },
    {
      "id": "a9000f01-714b-4f85-86f4-29592178eb44",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        688,
        304
      ]
    },
    {
      "id": "3ec5c404-69f4-468f-a5cc-9500e207e2ed",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        32,
        32
      ],
      "parameters": {
        "width": 260,
        "height": 500,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## 2. Give Feedback to User\n\nThis node gives feedback to the user that the Agent is working."
      }
    },
    {
      "id": "c4edb9b5-7293-490d-a718-ebaf0bb3aeb0",
      "name": "Receive a Message on Telegram",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -208,
        48
      ]
    },
    {
      "id": "3023c0bc-f219-4b24-b889-726112808b70",
      "name": "Send \"Typing...\" message to User",
      "type": "n8n-nodes-base.telegram",
      "position": [
        112,
        48
      ]
    },
    {
      "id": "a698860d-e2dd-4679-be0a-d8c36d12f9ba",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1088,
        -256
      ],
      "parameters": {
        "width": 260,
        "height": 380,
        "content": "## 4. Respond to the User\n\nOnce the response is generated, send it back to the user's chat in Telegram."
      }
    },
    {
      "id": "879d4e7a-c2c7-47eb-aaca-4847e61d6886",
      "name": "Send Telegram Message to User",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1168,
        -48
      ]
    },
    {
      "id": "1bc915c9-8494-4c74-b508-80484e9bc290",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        544,
        0
      ]
    },
    {
      "id": "c1a5628c-aa40-451b-b9ac-0cd9ba98dce1",
      "name": "The Flow and the Notion Book",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        1424,
        320
      ]
    },
    {
      "id": "e7cc5883-e814-4ed8-95fb-8c7294466e31",
      "name": "The Polysingularity Letters Book",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        1696,
        320
      ]
    },
    {
      "id": "e9b348cc-d6ea-4a46-99cf-cf395a50ab6e",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -256,
        560
      ],
      "parameters": {
        "width": 540,
        "height": 820,
        "content": "## Setting up a Telegram bot \n\n### It takes only 30 seconds to set up a Telegram bot. Once set up, create a Telegram credential with its access token and use it in all the Telegram nodes above. \n\n1. C"
      }
    },
    {
      "id": "75e639fa-33dc-4fbc-a34d-dee9e5550969",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        848,
        272
      ],
      "parameters": {
        "width": 200,
        "height": 804,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## Expert #1\n\n1. Add your InfraNodus graph name here via the InfraNodus GraphRAG Node `name` field.\n\n2. Describe what the expert does in the Description of the tool. You can use auto-"
      }
    },
    {
      "id": "8bb5f9fd-3a31-4c67-8684-b7190a342b2a",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1104,
        272
      ],
      "parameters": {
        "width": 200,
        "height": 804,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## Expert #2\n\n1. Add your InfraNodus graph name here via the InfraNodus GraphRAG Node `name` field.\n\n2. Describe what the expert does in the Description of the tool. You can use auto-"
      }
    },
    {
      "id": "e2e4dd57-fdb2-4ed3-940f-085e4b1a0934",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1360,
        272
      ],
      "parameters": {
        "width": 200,
        "height": 640,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## Expert #3\n\nYou can add more experts here. Just make to give them descriptive names, so the agent knows which one to connect to when it has a question. \n\n![flow and notion image](ht"
      }
    },
    {
      "id": "af7c969d-e48d-4d36-8e71-a7c70b79763d",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1632,
        272
      ],
      "parameters": {
        "width": 200,
        "height": 640,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## Expert #4\n\nYou can add more experts here. Just make to give them descriptive names, so the agent knows which one to connect to when it has a question. \n\n![infranodus graph](https:/"
      }
    },
    {
      "id": "bcc6a102-7dfd-461a-a3d1-64e8e27e3351",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        848,
        1136
      ],
      "parameters": {
        "width": 176,
        "height": 528,
        "content": "## Expert #1 \n\n### Direct InfraNodus API Alternative\n\nUses the HTTP node directly with InfraNodus API. Here you put the name of the graph in the `body.name` field. Also add custom API authorization wi"
      }
    },
    {
      "id": "6e19d344-9448-4ff1-9256-da5e5bc5bb6a",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1104,
        1136
      ],
      "parameters": {
        "width": 176,
        "height": 528,
        "content": "## Expert #2 \n\n### Direct InfraNodus API Alternative\n\nUses the HTTP node directly with InfraNodus API. Here you put the name of the graph in the `body.name` field. Also add custom API authorization wi"
      }
    },
    {
      "id": "791b109a-f7f4-4391-86ce-4db6315fcd95",
      "name": "Special Agent's Manual Book Expert HTTP Node",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        896,
        1472
      ]
    },
    {
      "id": "d463fa13-c987-4856-9165-52335d482353",
      "name": "Special Agent's Manual Book Expert",
      "type": "n8n-nodes-infranodus.infranodusTool",
      "position": [
        912,
        304
      ]
    },
    {
      "id": "d815b21c-e00f-46d7-a928-69dbae7aafae",
      "name": "Waves Into Patterns Book Expert",
      "type": "n8n-nodes-infranodus.infranodusTool",
      "position": [
        1168,
        304
      ]
    },
    {
      "id": "75db20b3-7a82-49db-a574-66b0ce0a9560",
      "name": "Waves into Patterns Book Expert HTTP Node",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        1152,
        1472
      ]
    }
  ],
  "connections": {
    "AI Agent": {
      "main": [
        [
          {
            "node": "Send Telegram Message to User",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "The Flow and the Notion Book": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Receive a Message on Telegram": {
      "main": [
        [
          {
            "node": "Send \"Typing...\" message to User",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Waves Into Patterns Book Expert": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Send \"Typing...\" message to User": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "The Polysingularity Letters Book": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Special Agent's Manual Book Expert": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Waves into Patterns Book Expert HTTP Node": {
      "ai_tool": [
        []
      ]
    },
    "Special Agent's Manual Book Expert HTTP Node": {
      "ai_tool": [
        []
      ]
    }
  }
}