Mindket

Telegram chatbot that draws pictures on request

Newversion 1 · updated

Overview

An n8n workflow that chats in Telegram with an AI agent on OpenAI’s gpt-5.6-terra. When someone asks for a drawing, the agent calls a second path of the same workflow, which makes the picture and sends it to the chat.

Telegram chatbot that draws pictures on request 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 into a new workflow there
  • Your own n8n server: the same file and steps, behind a public HTTPS address
  • Telegram: chat with the bot in a private chat
  • Another tool: copy the tool and its second path to give the agent a different job

Platform

Connects 2 apps

How it works

Trigger

A Telegram message

It starts when someone sends your bot a message:

  • A text message, which may ask for a drawing

Actions

  1. An AI agent on gpt-5.6-terra reads the message, with the last ten messages of the chat as memory
  2. When the message asks for a picture, the agent calls a tool that starts a second path of the workflow
  3. OpenAI’s gpt-image-2.6-flare draws the picture from the request
  4. The picture is sent to the chat as a photo
  5. The agent’s own answer is sent in Telegram’s HTML format, and escaped text is sent if Telegram rejects the HTML

Result

A reply in the Telegram chat, and a photo when the user asked for a drawing

Integrations

What you need before you start.

Telegram

Chat

Takes each message and sends the answers and the photo.

NeedsA bot token from BotFather, in a Telegram credential

OpenAI

Chat model and picture model

Runs the agent with gpt-5.6-terra and draws pictures with gpt-image-2.6-flare.

NeedsAn OpenAI API key, in an OpenAI credential

Workflow check

Checked by Mindket on 13 Nov 2026

Steps
8 steps, starting when another workflow calls it or on a Telegram event
AI
2 steps call an AI model: Generate image with OpenAI and 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 6 of its step types

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

About

What it is

This n8n workflow is a Telegram chatbot that can also draw. An AI agent answers each message, keeps ten messages of memory for each chat and calls the user by first name now and then. When the user asks for a picture, the agent calls a tool. The tool runs a second path of the same workflow. That path asks OpenAI’s gpt-image-2.6-flare for the image and sends it back as a photo. Eleven nodes do the work, beside one sticky note.

Who it suits

People who want to try an agent that calls a tool in n8n, and small teams who want a chat bot that makes an illustration when asked. Skip it if you need a bot that edits photos you send, because it only draws from words.

Who uses it, and how
IndustryWho uses itHow they use itExample
MarketingSocial media managersDraw a quick illustration for a post from a chatA manager asks the bot for a flat drawing of a coffee cup and gets it in the chat.
EducationTeachersMake simple pictures for a lesson sheetA teacher asks for a drawing of the water cycle and pastes it into a handout.
HobbyMakersTry ideas for posters or logosA maker asks for three poster ideas one after the other.
Developmentn8n buildersLearn how an agent calls a workflow as a toolA builder copies the tool pattern into a bot of their own.

You need some n8n and two accounts: Telegram and OpenAI. The tool calls this workflow by its own id, so save the workflow before you test it.

Where to use it

Any n8n that Telegram can reach over HTTPS and that can reach OpenAI will run it.

  • n8n Cloud: import the file into a new workflow there
  • Your own n8n server: the same file and steps, behind a public HTTPS address
  • Telegram: chat with the bot in a private chat
  • Another tool: copy the tool and its second path to give the agent a different job

Setup

Download saves a zip with workflow.json and Mindket’s setup notes in your downloads folder. Two accounts are involved.

What you need first
NeedDetail
n8nOn n8n Cloud or on a server of your own with a public HTTPS address
TelegramA bot made with BotFather, and its token in a Telegram credential
OpenAIAn API key in an OpenAI credential, used by the chat model and by the picture node
  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 token and select it in Listen for incoming events, Telegram, Correct errors and Send back an image.
  3. Add an OpenAI credential and select it in OpenAI Chat Model and Generate image with OpenAI.
  4. Check the models. The chat model is gpt-5.6-terra and the picture model is gpt-image-2.6-flare.
  5. Save and activate the workflow, then ask your bot to draw something.

How to use it

Chat with the bot. Ask for a drawing in plain words, such as a lighthouse at dusk. The agent decides to call the tool, and the photo arrives as a separate message.

What to change for a different result
To changeWhere
The assistant’s rules and toneThe system message in AI Agent
When the tool is usedThe name and description in Draw image Tool
The picture model and its optionsmodelId and the options in Generate image with OpenAI
How many messages it rememberscontextWindowLength in Window Buffer Memory

Example

A user writes "Draw a lighthouse at dusk."

The agent calls Draw_image with that request, OpenAI returns the picture, and Send back an image posts it to the chat. The agent then answers with a short message of its own.

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 tool is something an agent may use when a request needs it. Here the tool is another path of the same workflow.

For experts. The tool is a Tool Workflow node, version 1, that calls this workflow by $workflow.id. It passes the request as query and adds the chat id. Execute Workflow Trigger receives both.

Where to look closer
NodeWhat it doesWhat to know
Draw image ToolLets the agent start the second pathIt sends the request as query and the chat id as chat_id
Execute Workflow TriggerStarts the second path when the tool is calledIt sits in the same workflow as the chat path
Generate image with OpenAIAsks OpenAI for one picture from the requestA gpt-image model returns the picture as a file, not a link
Send back an imagePosts the file to the chat as a photoIt reads the binary field data
add response fieldReturns the word Success to the agentThe agent uses it to know the tool finished

Good to know

Two models were replaced because OpenAI retired them, and Mindket did not run the new picture step.

  • Chat model: the file used gpt-4-1106-preview. OpenAI’s deprecations page, read on 12 November 2026, shuts it down on 23 October 2026 and names gpt-5.6-sol as the replacement. Mindket’s copy uses the cheaper gpt-5.6-terra, which OpenAI lists with function calling. Switch back to gpt-5.6-sol if you want the named one
  • Picture model: the file used DALL-E 3, which the same page lists as shut down on 12 May 2026. Mindket’s copy uses n8n’s OpenAI node with gpt-image-2.6-flare. That model returns the picture as a file, so Send back an image now uploads a file
  • Settings: the temperature and frequency penalty were dropped, because the model page lists no temperature setting
  • Photo size: Telegram accepts photos up to 10 MB (Telegram’s Bot API page)
  • Your data: your messages go to OpenAI, and so do the picture requests. The file holds no credential

README and files

README

Telegram chatbot that draws pictures on request

An n8n workflow that chats in Telegram with an AI agent on OpenAI's gpt-5.6-terra. When someone asks for a drawing, the agent calls a second path of the same workflow, which makes the picture and sends it to the chat.

What is inside

  • workflow.json: the workflow as n8n exports it, twelve nodes. Eleven do the work and one is a sticky note that labels the picture path. It holds no credential.
  • README.md: these notes.

What we changed from the original copy

  • The chat model was gpt-4-1106-preview. OpenAI's deprecations page, read on 12 November 2026, lists it as shut down on 23 October 2026, with gpt-5.6-sol as the replacement. Mindket's copy uses gpt-5.6-terra, which OpenAI's model page lists with function calling. A chat bot needs less than the named model, and you can switch model to gpt-5.6-sol if you prefer it.
  • The temperature of 0.7 and the frequency penalty of 0.2 were dropped. The model page lists no temperature setting.
  • The picture was made by an HTTP Request node that called OpenAI's image address with dall-e-3. The same page lists DALL-E 3 as shut down on 12 May 2026. Mindket's copy uses n8n's OpenAI node with gpt-image-2.6-flare, a model OpenAI's page lists for image generation.
  • A gpt-image model returns the picture as a file, not as a link. Send back an image used to send a link. It now sends the file that Generate image with OpenAI produces.
  • The tool and the nodes were renamed from Dall-E 3 names to Draw image Tool, Draw_image and Generate image with OpenAI, and the sticky note was reworded. The tool's description no longer names a model.
  • Several nodes were linked to credentials in the author's n8n. The links are gone, so select your own.
  • Nothing else. The system message, the memory and the error fallback are the file's own.

Before you start

  • An n8n instance with a public HTTPS address, on n8n Cloud or your own server. Telegram sends every message to that address.
  • A Telegram bot made with BotFather, and its token.
  • 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 token. Select it in Listen for incoming events, Telegram, Correct errors and Send back an image.
  3. Add an OpenAI credential and select it in OpenAI Chat Model and Generate image with OpenAI.
  4. Check the models. The chat model is gpt-5.6-terra and the picture model is gpt-image-2.6-flare.
  5. Save and activate the workflow, then ask your bot to draw something. The tool calls the workflow by its own id, so it must be saved first.

How a run goes

  1. Listen for incoming events starts the run for each text message and passes it to AI Agent.
  2. AI Agent answers with OpenAI Chat Model. Window Buffer Memory keeps the last ten messages of the chat. The system message asks for Telegram's HTML format and for the user's first name now and then.
  3. When the message asks for a picture, the agent calls Draw image Tool. The tool starts this same workflow and passes the request as query and the chat id as chat_id.
  4. Execute Workflow Trigger receives them. Generate image with OpenAI draws one picture from query, and Send back an image posts it to the chat as a photo.
  5. add response field returns the word Success to the agent, which then writes its own answer.
  6. Telegram sends that answer in HTML mode. If Telegram rejects the HTML, Correct errors sends the text with its special characters escaped.

Change the result

  • Rules and tone: the system message in AI Agent.
  • When the tool is used: the name and description in Draw image Tool.
  • Picture model and options: modelId and the options in Generate image with OpenAI.
  • Memory: contextWindowLength in Window Buffer Memory.

Good to know

  • Mindket did not run this workflow. Telegram and OpenAI were not called, and nobody asked the bot for a real picture. The models, fields and limits come from OpenAI's and Telegram's docs and from n8n's source, read on 12 November 2026.
  • Tool Workflow nodes of version 1 pass their input to the sub-workflow as query (n8n's source). The picture node reads that field.
  • Telegram accepts photos up to 10 MB (Telegram's Bot API page).
  • Telegram rejects a message longer than 4096 characters.
  • The agent node is version 1.1, which n8n sets to the conversational type by default. Its prompt asks the model for a JSON action.
  • Your messages and picture requests go to OpenAI.
  • The file holds no credential and no key.
Files
NOTICE.md  582 B
README.md  5 KB
workflow.json  9 KB

3 files, 14 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