🤖 Telegram AI Bot with LangChain Nodes

Table of Contents

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). The 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 the Dall-E 3 model with the user Telegram ID and a prompt for a new image. Once the 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.

Table of Contents

About GlobiFYE

GlobiFYE

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

More From Us

  • All
  • All
  • Budgeting
  • Growth
  • Technology


Automating Business Processes: A Guide for Cost-Conscious Companies
In today’s fast-paced digital economy, the ability to streamline operations while cutting costs isn’t just a competitive advantage—it’s essential for survival.