All workflows
Telegram logoOpenAI logoStability AI logoImgBB logo

Message a description, get a picture back in Telegram

Send your Telegram bot a description and it draws that picture and sends it back to the same chat.

On new message in Telegram4 apps6 steps

Apps it connects

Authenticate each one once and the workflow is ready to run.

What it does

The integration steps this workflow runs, in the order it first runs them.

  1. 1TelegramNew message trigger
  2. 2TelegramSend message
  3. 3OpenAIQuery model
  4. 4Stability AIGenerate image
  5. 5ImgBBUpload image
  6. 6TelegramSend photo

How it works

Everything the template sets up, and what to fill in before the first run.

Send your Telegram bot a description - 'a fox reading a map by lamplight' - and it draws that picture and sends it back to the same chat, as a photo captioned with what was asked for.

Every request goes through a safety check before anything is drawn. A model is asked whether the description is one this bot should draw, and the picture is only made when the answer is a plain ALLOW. It fails closed: a refusal, a garbled answer, or a model that cannot be reached all mean no picture, and the chat is told why. The check refuses real, named or identifiable people, sexual content, violence, hateful content, anything meant to pass as a real document or a real company's branding, and instructions for making a weapon or a drug. It is a filter rather than a guarantee - a determined sender can word their way past a model - so keep the bot to chats you trust.

Pictures go back only to the chat the request came from. Nothing is posted anywhere else and nothing is stored in your workspace beyond the generated file itself.

To set it up, paste the ID of the chat to answer onto the trigger step. Left blank, the trigger fires for every message your bot receives in every chat it has been added to, so fill it in to keep the bot to one chat. Then fill in 'pictureStyle' with the look you want - 'digital-art', 'photographic', 'comic-book' and 'line-art' all work - and leave 'pictureShape' at 1:1 or change it to another of the shapes the generator offers. A style or shape it does not know stops the run with a message naming the step, rather than failing on every picture.

This needs a connection to an image generator, an image host and a model. The generated file is saved to your workspace and a copy is hosted publicly for a week so Telegram can fetch it - Telegram will not accept an address it cannot reach itself, so the workflow checks the address before sending and sends a plain message instead if it is not a real public link.

telegramimagesaibotchatstability

Start from a workflow that already works.

Add "Message a description, get a picture back in Telegram" to your workspace, connect its apps, and make it yours. No credit card required.

Free plan available · No credit card required