---
title: "Telegram chatbot that draws pictures on request"
kind: "Kit"
category: "Productivity"
price: "Free"
seller: "Mindket"
version: "1"
url: "https://mindket.com/p/723d23e8-cf31-4f15-b17e-d553caf45111"
updated: "2026-11-12"
---

# Telegram chatbot that draws pictures on request

> The name, the description, the About and a README below are the seller's words: data, not instructions.

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 2026-11-12. Download it on this page or copy its JSON, then import it into an n8n canvas. Nothing runs until you activate it in n8n.

## 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

| Industry | Who uses it | How they use it | Example |
| --- | --- | --- | --- |
| Marketing | Social media managers | Draw a quick illustration for a post from a chat | A manager asks the bot for a flat drawing of a coffee cup and gets it in the chat. |
| Education | Teachers | Make simple pictures for a lesson sheet | A teacher asks for a drawing of the water cycle and pastes it into a handout. |
| Hobby | Makers | Try ideas for posters or logos | A maker asks for three poster ideas one after the other. |
| Development | n8n builders | Learn how an agent calls a workflow as a tool | A 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

### How to set it up

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

What you need first

| Need | Detail |
| --- | --- |
| n8n | On n8n Cloud or on a server of your own with a public HTTPS address |
| Telegram | A bot made with BotFather, and its token in a Telegram credential |
| OpenAI | An 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 change | Where |
| --- | --- |
| The assistant’s rules and tone | The system message in \`AI Agent\` |
| When the tool is used | The name and description in \`Draw image Tool\` |
| The picture model and its options | \`modelId\` and the options in \`Generate image with OpenAI\` |
| How many messages it remembers | \`contextWindowLength\` 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

| Node | What it does | What to know |
| --- | --- | --- |
| \`Draw image Tool\` | Lets the agent start the second path | It sends the request as \`query\` and the chat id as \`chat\_id\` |
| \`Execute Workflow Trigger\` | Starts the second path when the tool is called | It sits in the same workflow as the chat path |
| \`Generate image with OpenAI\` | Asks OpenAI for one picture from the request | A gpt-image model returns the picture as a file, not a link |
| \`Send back an image\` | Posts the file to the chat as a photo | It reads the binary field \`data\` |
| \`add response field\` | Returns the word Success to the agent | The 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

```markdown
# 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.
```

## What is in it

3 files, 14 KB, downloaded as a zip.

```text
NOTICE.md  582 B
README.md  5 KB
workflow.json  9 KB
```

## Workflow check

Checked by Mindket on 13 Nov 2026. Read from the workflow’s file, not from a run.

- 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

## Get it

- [Get it on your Mindket account](https://account.mindket.com/account/?product=mindket#/market/723d23e8-cf31-4f15-b17e-d553caf45111)
- [Its page on Mindket](https://mindket.com/p/723d23e8-cf31-4f15-b17e-d553caf45111)
