Skip to main content

Telegram AI chatbot agent with InfraNodus GraphRAG knowledge base

Workflow preview

Workflow preview
100%
Telegram AI chatbot agent with InfraNodus GraphRAG knowledge base preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Using the knowledge graphs instead of RAG vector stores This workflow creates a Telegram chatbot agent that has access to several knowledge bases at the same time (used as "experts"). These knowled...

Best for

  • Support Chatbot automation workflows
  • AI RAG automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.stickynote, @n8n/n8n-nodes-langchain.lmchatopenai, @n8n/n8n-nodes-langchain.memorybufferwindow, n8n-nodes-base.telegramtrigger, n8n-nodes-base.telegram, @n8n/n8n-nodes-langchain.agent, n8n-nodes-base.httprequesttool, n8n-nodes-infranodus.infranodustool

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by InfraNodus.

Original n8n.io source

1.1 Workflow description

Title
Telegram AI chatbot agent with InfraNodus GraphRAG knowledge base
Workflow name
Telegram AI chatbot agent with InfraNodus GraphRAG knowledge base

Using the knowledge graphs instead of RAG vector stores

This workflow creates a Telegram chatbot agent that has access to several knowledge bases at the same time (used as "experts").

These knowledge bases are provided using the InfraNodus GraphRAG using the knowledge graphs and providing high-quality responses without the need to set up complex RAG vector store workflows.

The advantages of using GraphRAG instead of the standard vector stores for knowledge are:

  • Easy and quick to set up and update (no complex data import workflows or vector stores needed)
  • A knowledge graph has a holistic view of your knowledge base and knows what it's about
  • Better retrieval of relations between the document chunks = higher quality responses

How it works

This template uses the n8n AI agent node as an orchestrating agent that decides which tool (knowledge graph) to use based on the user's prompt.

Here's a description step by step:

  • The user submits a question using the Telegram bot, which is then received in the n8n workflow via the Telegram trigger node.
  • The AI agent node checks a list of tools it has access to. Each tool has a description of the knowledge it has auto-generated by InfraNodus.
  • The AI agent decides which tool should be used to generate a response. It may reformulate user's query to be more suitable for the expert.
  • The query is then sent to the official InfraNodus Graph RAG Node or directly to the InfraNodus API via the HTTP node endpoint, which will query the graph that corresponds to that expert.
  • Each InfraNodus GraphRAG expert provides a rich response that takes the whole context into account and provides a response from each expert (graph) along with a list of relevant statements retrieved using a combination or RAG and GraphRAG.
  • The n8n AI Agent node integrates the responses received from the experts to produce the final answer.
  • The final answer is sent back to the Telegram bot who delivers it back to the private chat or a Telegram group.

How to use

You need an InfraNodus GraphRAG API account and key to use this workflow.

  • Create an InfraNodus account
  • Get the API key at https://infranodus.com/api-access and create a Bearer authorization key for the InfraNodus HTTP nodes.
  • Create a separate knowledge graph for each expert (using PDF / content import options) in InfraNodus
  • For each graph, go to the workflow, paste the name of the graph into the body name field.
  • Keep other settings intact or learn more about them at the InfraNodus access points page.
  • Once you add one or more graphs as experts to your flow, add the LLM key to the OpenAI node
  • Create a Telegram bot (the instructions are in the workflow Post note) — it takes 30 seconds. Get its API key and create the Telegram credentials to use in the Telegram nodes in this workflow.

Requirements

  • An InfraNodus account and API key
  • An OpenAI (or any other LLM) API key
  • A Telegram account

Customizing this workflow

You can use this same workflow with a standard AI chatbot via a URL that can also be embedded to any website. You can also use it with ElevenLabs AI voice agent. There are many more customizations available.

Check out the complete guide at https://support.noduslabs.com/hc/en-us/articles/20174217658396-Using-InfraNodus-Knowledge-Graphs-as-Experts-for-AI-Chatbot-Agents-in-n8n

Also check out the video tutorial with a demo:

Support

If you have any questions, contact us via the support portal at https://support.noduslabs.com or via our Discord channel.

More n8n workflows are available on our support portal: n8n x InfraNodus AI automation workflows.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 2 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 3 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 4 - Sticky Note6

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 5 - OpenAI Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1

Block 6 - Simple Memory

Type / Role
@n8n/n8n-nodes-langchain.memoryBufferWindow - memoryBufferWindow
Config choices
Version 1.3

Block 7 - Sticky Note7

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 8 - Receive a Message on Telegram

Type / Role
n8n-nodes-base.telegramTrigger - telegramTrigger
Config choices
Version 1.2

Block 9 - Send "Typing..." message to User

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 10 - Sticky Note8

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 11 - Send Telegram Message to User

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 12 - AI Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.9

Block 13 - The Flow and the Notion Book

Type / Role
n8n-nodes-base.httpRequestTool - httpRequestTool
Config choices
Version 4.2

Block 14 - The Polysingularity Letters Book

Type / Role
n8n-nodes-base.httpRequestTool - httpRequestTool
Config choices
Version 4.2

Block 15 - Sticky Note10

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 16 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 17 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 18 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 19 - Sticky Note9

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 20 - Sticky Note11

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 21 - Sticky Note12

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 22 - Special Agent's Manual Book Expert HTTP Node

Type / Role
n8n-nodes-base.httpRequestTool - httpRequestTool
Config choices
Version 4.2

Block 23 - Special Agent's Manual Book Expert

Type / Role
n8n-nodes-infranodus.infranodusTool - infranodusTool
Config choices
Version 1

Block 24 - Waves Into Patterns Book Expert

Type / Role
n8n-nodes-infranodus.infranodusTool - infranodusTool
Config choices
Version 1

Showing the first 24 of 25 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Telegram AI chatbot agent with InfraNodus GraphRAG knowledge base
Complexity advanced
Nodes 25
Categories Support Chatbot, AI RAG
Author InfraNodus
Published 29 May 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/4485/4485.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Telegram AI chatbot agent with InfraNodus GraphRAG knowledge base do?

Using the knowledge graphs instead of RAG vector stores This workflow creates a Telegram chatbot agent that has access to several knowledge bases at the same time (used as "experts"). These knowled...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Support Chatbot, AI RAG use case.