tr Skip to content

Connect OpenAI (ChatGPT) and Telegram

Put ChatGPT behind your Telegram bot. FlowMattic receives each update the bot gets, passes the text, photo or voice note to OpenAI and sends the answer back to the chat. Communities, support teams and creators get an AI bot that runs from their own WordPress site, without hosting a separate bot server.

1 trigger 21 actions 7 example workflows 2 ready-made templates Unlimited runs

Try a pairing

When this happens in Telegram1 trigger

Do this in OpenAI (ChatGPT)10 actions

1. TriggerSet Webhook / Watch Updates
2. ActionGenerate Content

When Telegram fires Set Webhook / Watch Updates, FlowMattic runs Generate Content in OpenAI (ChatGPT) with the data from that event.

You build this in the FlowMattic workflow builder on your own site. See the setup steps

OpenAI (ChatGPT) and Telegram workflows you can build

Each one uses only triggers and actions the two integrations ship today, plus FlowMattic's own tools. Where the library has a ready-made template, import it instead of building from scratch.

OpenAI (ChatGPT) app icon Telegram app icon

Answer questions sent to your bot with ChatGPT

Each message to the bot goes to Ask Chat GPT with your instructions, and the reply is sent back to the same chat, which suits FAQ and support bots.

Set Webhook / Watch UpdatesAsk Chat GPTSend a Text Message

OpenAI (ChatGPT) app icon Telegram app icon

Draw an image when someone sends /image

A Filter catches messages that start with /image, Generate Image creates a picture from the rest of the text and Send Photo returns it to the chat.

Set Webhook / Watch UpdatesFilterGenerate ImageSend Photo

OpenAI (ChatGPT) app icon Telegram app icon

Turn voice notes into text replies

An API request fetches the voice file from Telegram, Create Transcription turns it into text and the bot replies with the transcript, handy for members who cannot play audio.

Set Webhook / Watch UpdatesAPI requestCreate TranscriptionSend a Text Message

OpenAI (ChatGPT) app icon Telegram app icon

Describe or read a photo sent to the bot

Analyze Image looks at a photo of a receipt, a label or an error screen and the bot replies with what it found, so people get help without typing it out.

Set Webhook / Watch UpdatesAnalyze ImageSend a Text Message

OpenAI (ChatGPT) app icon Telegram app icon

Ban users who post abusive messages in a group

Create Moderation scores each group message. A Branch sends a warning for borderline posts and runs Ban User when the message is flagged.

Set Webhook / Watch UpdatesCreate ModerationBranchBan User

OpenAI (ChatGPT) app icon Telegram app icon

Reply with a spoken answer as an audio file

ChatGPT writes the answer, Generate Text to Speech reads it aloud and Send an Audio File returns it, which works well for language practice bots.

Set Webhook / Watch UpdatesAsk Chat GPTGenerate Text to SpeechSend an Audio File

OpenAI (ChatGPT) app icon Telegram app icon

Post a daily AI-written tip to your channel

A Schedule runs each morning, Generate Content writes a short tip on your topic and Send a Text Message posts it to the channel, so it never sits empty.

ScheduleGenerate ContentSend a Text Message

Set up: a ChatGPT answer bot

At the end, anyone who messages your bot gets a reply written by ChatGPT.

  1. Create the bot

    Create a bot with BotFather in Telegram and copy the bot token it gives you.

  2. Connect both apps

    Under Connects in FlowMattic, add Telegram with the bot token and OpenAI (ChatGPT) with an API key from your OpenAI account.

  3. Watch the bot's updates

    Create a workflow with Telegram and Set Webhook / Watch Updates, then message the bot so FlowMattic captures the chat ID and text.

  4. Ask ChatGPT

    Add OpenAI Ask Chat GPT, write the instructions the bot should follow and map the message text as the question.

  5. Send the reply

    Add Telegram Send a Text Message, map the chat ID from the trigger and ChatGPT's answer as the text, test and switch the workflow on.

Answer questions sent to your bot with ChatGPT
  1. Telegram app icon 1. Trigger in Telegram Set Webhook / Watch Updates
  2. OpenAI (ChatGPT) app icon 2. Action in OpenAI (ChatGPT) Ask Chat GPT
  3. Telegram app icon 3. Action in Telegram Send a Text Message

    Fields mapped from the earlier steps (a typical setup)

    From TelegramTo Telegram
    Message textAsk Chat GPT question
    Chat IDSend a Text Message chat
    Message IDReply to message
    ChatGPT answerMessage text
Built on the FlowMattic canvas. Test each step with real data, then switch the workflow on.

Triggers and actions in this pair

A trigger starts a workflow. An action is something FlowMattic does in the app as a step.

Good to know

  • The bot's trigger receives every update, including joins, edits and its own messages in groups. Use a Filter or Router so the workflow only answers the updates you mean it to.
  • In groups, Telegram bots only see all messages when privacy mode is off in BotFather, and Ban User needs the bot to be a group admin.
  • Each OpenAI step is a call billed to your OpenAI account. Keep instructions short and add a Filter for very long messages if cost matters.
OpenAI (ChatGPT) app icon

OpenAI (ChatGPT)

Integration page

Actions (10)

  • Generate ContentGenerate content based on the prompt provided
  • Generate ImageGenerate image based on the prompt provided
  • Ask Chat GPTAsk anything to Chat GPT ;)
  • Generate Text to SpeechGenerates audio from the input text
  • Create TranscriptionTranscribes audio into the input language
  • Create TranslationTranslate the given audio to english
  • Create ModerationClassifies if text violates OpenAI's Content Policy
  • Analyze ImageAsks a vision model a question about an image given by URL
  • Create Voice ConsentRecords permission to clone a voice from a consent recording, the first step of a custom voice
  • Create VoiceCreates a custom voice from an audio sample and a consent id, usable in Generate Text to Speech

Triggers (1)

  • Set Webhook / Watch UpdatesTriggers when there's an update available for the bot

Actions (11)

  • Send a Text MessageSends a text message with support to markup
  • Send PhotoSend a photo/image to your chat
  • Send an Audio FileSend any audio file with URL to your chat
  • Send a DocumentSend document file to your chat
  • Send a VideoSend video file with URL to your chat
  • Send ContactSend contact to your chat
  • Send PollSend a new poll to your chat
  • Create Invite LinkCreate an invite link for a group chat
  • Revoke Invite LinkRevoke an invite link for a group chat
  • Ban UserBan a user from a group chat
  • Unban UserUnban a user from a group chat

Why run this pair with FlowMattic

OpenAI (ChatGPT) and Telegram connect through FlowMattic on your own site, with no separate automation account in the middle and no charge per run.

No separate bot server

The bot's webhook lands on your own WordPress site, so there is no extra hosting to run for it.

Busy groups cost the same

FlowMattic runs are unlimited, so a bot that answers thousands of messages pays only for the OpenAI calls it makes.

Text, images and voice together

One bot can chat, draw, read photos, transcribe voice notes and speak back, each as a path in the same workflow.

Common questions

Can I connect ChatGPT to a Telegram bot without code?

Yes. Start a FlowMattic workflow with Telegram's Set Webhook / Watch Updates trigger, add Ask Chat GPT with the message as the question, and send the answer back with Send a Text Message to the same chat ID.

Will the bot remember earlier messages?

Each run sees only the update that started it. To give it memory, save each exchange with WP Tables and pass the last few messages into the ChatGPT instructions.

Can the bot handle commands like /image or /help?

Yes. A Router reads the start of the message and sends /image to Generate Image and Send Photo, /help to a fixed reply, and other text to Ask Chat GPT.

Can it work in a Telegram group as well as private chats?

Yes. Add the bot to the group, turn off privacy mode in BotFather if it should read every message, and make it an admin if it should ban users.

Which OpenAI model does it use?

You choose it in the OpenAI step when you build the workflow. Pick a smaller model for quick replies and a larger one where answer quality matters more.

Did not find your answer? You can browse the help center or ask us directly.

Start automating OpenAI (ChatGPT) and Telegram

Install FlowMattic, connect both accounts and import a template. Every run stays on your own server.

30-day money-back guarantee Unlimited workflows and runs Self-hosted

Reviewed 27 Oct 2026. The example workflows are written with AI from the real triggers and actions of both integrations and checked against them. OpenAI (ChatGPT) integration 2.3.0, Telegram integration 2.0.