FM
FlowMarket
AI Agents Intermediate ⚡ 12 n8n Nodes

Telegram AI bot with LangChain nodes

This workflow connects Telegram bots with LangChain nodes in n8n. The main AI Agent Node is configured as a Conversation Agent. It has a custom System Prompt...

🔌 Nodes & Integrations Used (8)

Lm Chat Open Ai Memory Buffer Window Telegram Execute Workflow Trigger Telegram Trigger Tool Workflow HTTP Request Agent

📖 Implementation & Setup Guide

This workflow connects Telegram bots with LangChain nodes in n8n. The main AI Agent Node is configured as a Conversation Agent. It has a custom System Prompt which explains the reply formatting and provides some additional instructions. The AI Agent has several connections: - OpenAI GPT-4 model is called to generate the replies - Window Buffer Memory stores the history of conversation with each user separately - There is an additional Custom n8n Workflow tool (Dall-E 3 Tool). AI Agent uses this tool when the user requests an image generation. In the lower part of the workflow, there is a series of nodes that call Dall-E 3 model with the user Telegram ID and a prompt for a new image. Once image is ready, it is sent back to the user. Finally, there is an extra Telegram node that masks HTML syntax for improved stability in case the AI Agent replies using the unsupported format.

⚡ How to import this workflow into n8n:

  1. Click the Direct Download JSON button above to save Telegram AI bot with LangChain nodes.json.
  2. Log in to your n8n Cloud or self-hosted n8n instance.
  3. In your workflow canvas, click the menu in top-right and select Import from File (or paste the JSON directly).
  4. Configure your credentials (e.g. API keys, database URLs) in the corresponding node settings.
  5. Click Execute Workflow to test and switch to Active!

Related AI Agents Workflows

View All in AI Agents →