Mindket

Chat with an OpenAI model through a Telegram bot

Newversion 1 · updated

Overview

An n8n workflow that turns a Telegram bot into a chat assistant. Each message goes to an OpenAI model through an AI agent that is told to answer helpfully with emojis, and the answer comes back to the same chat.

Chat with an OpenAI model through a Telegram bot is an n8n workflow in the Productivity category, listed by Mindket. It is free. This is version 1, last updated on . Download it on this page or copy its JSON, then import it into an n8n canvas. Nothing runs until you activate it in n8n.

At a glance

Runs in
  • n8n Cloud: import the file, publish it and message your bot
  • Your own n8n server: the same steps, with the server open to Telegram over HTTPS
  • Another model: replace OpenAI Chat Model with another chat model node, such as Gemini or Claude
  • A fuller bot: add tools or a memory node to AI Agent

Platform

Connects 2 apps

How it works

Trigger

Telegram message

It starts when someone sends your bot a message, and reads:

  • The text of the message
  • The chat it came from

Actions

  1. The agent gets the message text with an instruction to answer helpfully and with emojis
  2. An OpenAI model writes the answer
  3. Telegram sends the answer to the chat the message came from

Result

A Telegram reply from an OpenAI model, with a few emojis

Integrations

What you need before you start.

Telegram

Chat

Receives each message and sends the answer back.

NeedsTelegram bot token

OpenAI

Language model

Writes the answer to each message.

NeedsOpenAI API key

Workflow check

Checked by Mindket on 13 Nov 2026

Steps
3 steps, starting on a Telegram event
AI
1 step calls an AI model: AI Agent
Sign-ins
Signs in to: Telegram and OpenAI
API keys
No API key is left in the file
Step types
Mindket’s checker reads all 3 of its step types

Read from the workflow’s file, not from a run.

About

What it is

This n8n workflow connects a Telegram bot to an OpenAI model. Someone sends the bot a message, and the text goes to an AI agent that is asked to answer helpfully with emojis. The agent’s reply goes back to the same chat. Four nodes do the work. It is a small base that you can grow into a fuller chatbot.

Who it suits

Beginners who want a first Telegram bot that answers questions, and builders who want a base to extend with tools or memory. Skip it if you need the bot to remember a conversation, since each message is answered on its own.

Who uses it, and how
IndustryWho uses itHow they use itExample
EducationTeachersGive a class a bot that explains topicsA teacher shares the bot and students ask it to explain fractions.
PersonalHobbyistsChat with a model from a phone without a new appA user asks for a recipe idea and gets it with a few emojis.
SoftwareBuildersStart a bot project and add tools laterA builder adds a calendar tool to the agent.
WritingWritersBrainstorm names and titles in a chatA writer asks for ten titles for a post.

You need a little n8n: import a file, add two credentials and make a Telegram bot.

Where to use it

Any n8n that Telegram can reach over HTTPS and that can reach OpenAI will run it. The bot answers in the chat the message came from.

  • n8n Cloud: import the file, publish it and message your bot
  • Your own n8n server: the same steps, with the server open to Telegram over HTTPS
  • Another model: replace OpenAI Chat Model with another chat model node, such as Gemini or Claude
  • A fuller bot: add tools or a memory node to AI Agent

Setup

Download saves a zip with workflow.json and Mindket’s setup notes in your downloads folder. Setup is a Telegram bot, an OpenAI key and a model choice.

What you need first
NeedDetail
n8nOn n8n Cloud or on a server of your own, open to Telegram over HTTPS
TelegramA bot and its token from BotFather
OpenAIAn API key
  1. In n8n, create a workflow, open its menu, choose Import from File and pick workflow.json.
  2. Add a Telegram credential with your bot’s token and select it in Telegram Trigger and Telegram.
  3. Add an OpenAI credential with your key and select it in OpenAI Chat Model.
  4. In OpenAI Chat Model, pick a model. The file sets none, so the node falls back to gpt-5-mini, which OpenAI lists for shutdown on 11 December 2026.
  5. Press Execute workflow, send your bot a message in Telegram and check the reply.
  6. Publish the workflow so the bot answers all day.

How to use it

Open the chat with your bot in Telegram and write a message. The bot answers in a few seconds. The instruction in front of your text asks for a helpful answer with emojis, so replies come with a few.

What to change for a different result
To changeWhere
The bot’s styleThe prompt in AI Agent
The modelOpenAI Chat Model
Whether it remembersAdd a memory node to AI Agent
What gets sent backTelegram

Example

A user writes, Give me three names for a bakery.

The bot replies in the chat with three name ideas and a few emojis. Check facts in a reply before you rely on them, since a model wrote it.

For newcomers and experts

If you are new. n8n draws a workflow as boxes joined by lines, and each box, a node, does one job. A Telegram bot is an account that a program controls. Telegram hands each message sent to it over to n8n, and n8n answers through the bot. An AI agent is a model with instructions that can also use tools. Here it uses none, so it works as a plain chat assistant.

For experts. Telegram Trigger listens for message updates only. AI Agent builds its prompt from the message text with an instruction in front. It has no system message, no memory and no tools. Telegram reads the answer from the agent’s output field and the chat id from the trigger, and it turns off n8n’s attribution line.

Where to look closer
NodeWhat it doesWhat to know
Telegram TriggerTakes each new messageEdited messages and channel posts are ignored
OpenAI Chat ModelSupplies the modelThe file sets none, so the node falls back to its default
AI AgentAnswers the messageThe prompt asks for a helpful answer with emojis
TelegramSends the answer to the chat the message came fromn8n’s attribution line is off

Good to know

The bot answers anyone who finds it, has no memory and runs on a model that is close to retirement.

  • Model: n8n’s source gives OpenAI Chat Model the default gpt-5-mini, and the file sets none. OpenAI’s deprecations page, read on 12 November 2026, lists gpt-5-mini for shutdown on 11 December 2026 with gpt-5.6-terra as the replacement. Pick a model in the node before you publish
  • Open bot: nothing checks who writes to the bot, so anyone who finds its username can use it and spend your OpenAI credit. Telegram Trigger version 1.2 and later offers Restrict to User IDs under Additional Fields, and the file’s trigger is version 1.1. To limit it, swap in a current Telegram Trigger and fill that field in
  • No memory: each message is answered on its own, so the bot forgets what you said before
  • Markdown: Telegram sends in Telegram’s Markdown mode, where an unmatched _ or * makes Telegram refuse the message, and the user gets no reply. Telegram also refuses text over 4,096 characters
  • Other messages: a photo or a sticker carries no text, so there is nothing for the model to answer
  • Your data: every message goes to OpenAI
  • Not run: nothing here was run against Telegram or OpenAI. The notes come from n8n’s source and the vendors’ pages
  • Credentials: the JSON holds none

README and files

README

Chat with an OpenAI model through a Telegram bot

An n8n workflow that turns a Telegram bot into a chat assistant. Someone sends the bot a message, an AI agent asks an OpenAI
model for a helpful answer with emojis, and the answer comes back to the same chat.

What is inside

  • workflow.json: the workflow as n8n exports it, 4 nodes, no sticky notes. It holds no credential.
  • README.md: these notes.

What we changed from the original copy

  • The Telegram nodes and the OpenAI node were linked to credentials in their author's n8n. The links are gone, so select your
    own.
  • The Telegram Trigger's webhook id is gone, and n8n makes a new one when you import the file.
  • The export's instance id is gone.
  • Nothing else. The file holds no key, id or address of its author's, so no node needed a placeholder.

Before you start

  • An n8n instance that Telegram can reach over HTTPS, on n8n Cloud or on your own server.
  • A Telegram bot and its token, made by messaging BotFather in Telegram.
  • An OpenAI API key.

Set it up

  1. In n8n, create a workflow, open its menu and choose Import from File. Pick workflow.json.
  2. Add a Telegram credential with your bot's token. Select it in Telegram Trigger and Telegram.
  3. Add an OpenAI credential with your key and select it in OpenAI Chat Model.
  4. In OpenAI Chat Model, pick a model. The file sets none, so the node falls back to gpt-5-mini, which OpenAI lists for
    shutdown on 11 December 2026.
  5. Press Execute workflow, send your bot a message in Telegram and check the reply.
  6. Publish the workflow so the bot answers all day.

How a run goes

  1. Telegram Trigger takes a new message. It listens for message updates only.
  2. AI Agent builds its prompt from the message text, with an instruction in front that asks for a helpful answer with emojis.
    It sends the prompt to OpenAI Chat Model.
  3. Telegram sends the agent's answer to the chat the message came from, with n8n's attribution line turned off.

Change the look

  • The bot's style: the prompt in AI Agent.
  • The model: OpenAI Chat Model. To use Gemini or Claude, put that provider's chat model node in its place.
  • Memory: the agent has none. To give it some, add a memory node, such as Simple Memory, to the agent's memory input.
  • What gets sent back: Telegram.

Good to know

  • Model: n8n's source gives OpenAI Chat Model the default gpt-5-mini, and the file sets none. OpenAI's deprecations page, read
    on 12 November 2026, lists gpt-5-mini for shutdown on 11 December 2026 with gpt-5.6-terra as the replacement. Pick a model
    in the node before you publish.
  • Nothing checks who writes to the bot, so anyone who finds its username can use it and spend your OpenAI credit. Telegram Trigger
    version 1.2 and later offers Restrict to User IDs under Additional Fields, and the file's trigger is version 1.1. To limit it,
    swap in a current Telegram Trigger and fill that field in.
  • Each message is answered on its own, so the bot forgets what you said before.
  • Telegram sends in Telegram's Markdown mode. Telegram's Bot API page says _, *, a backtick and [ outside an entity need a
    backslash in that mode, and an unmatched one makes Telegram refuse the message, so the user gets no reply. Telegram also
    refuses text over 4,096 characters.
  • A photo or a sticker carries no text, so there is nothing for the model to answer.
  • Your data: every message goes to OpenAI.
  • Not run: nothing here was run against Telegram or OpenAI. These notes come from n8n's source and the vendors' pages, read on 12
    November 2026.
Files
NOTICE.md  621 B
README.md  4 KB
workflow.json  2 KB

3 files, 6 KB, downloaded as a zip.

What’s new

  • Version 1 · 2026-11-12

Reviews

No ratings yet

Write a review

No reviews yet.

More from Mindket

See all from Mindket

anaksor-ocr

Sokheng · Kit

Reads Khmer and English text from documents, receipts and photos of signs, using a detector for text lines and a recogniser for each line. Suits developers who…

New

Qwen2.5-7B-Instruct as GGUF files in eight quantization sizes, to chat with locally through llama.cpp. For people who want a capable 7.6B model on their own co…

New

ACE-Step 1.5 XL SFT

ACE-Step · Kit

Generates music from text with a 4B diffusion decoder, 50 steps and guidance control, aiming for higher audio quality than the base. For creators with a GPU of…

New

Similar in Productivity

See all in Productivity

Guizang PPT Skill

op7418 · Skill

Skill that makes single-file HTML slide decks, slide illustrations and platform covers in two visual styles, with a presenter mode for rehearsal. For speakers…

New29.8k

Frontend Slides

zarazhangrui · Skill

Builds HTML presentations from scratch or from a PowerPoint file and shows visual style previews to pick from, for people who want web slides with no CSS or Ja…

New32.3k

IPTV

iptv-org · Kit

Collects publicly available live TV channels from many countries into playlists that any video player with live streaming can open. Made for viewers and for de…

New144k