Flow Preview
AI Image MenuAI Image Generation
Overview
Let users choose a material, describe the image they want, generate an AI image, and send the result back in chat.
Who It's For
The user wants a Telegram bot that generates images from prompts, product materials, or visual style choices.
Setup Requirements
- Should users upload reference images, or is text-only generation enough?
- Should the bot generate one image or several variants?
- Which material/style choices should appear in the menu?
Node Breakdown
- Start or main menu
- Explain the image generation offer
- Let the user choose a material or visual style with buttons
- Capture the user's free-text brief
- Run the installed AI Image Generation module action
- Map success and error outputs into contact variables, and use the image_url action output directly for generated media
- Branch by success using a CONDITION block with firstOperand/operator/value rules
- Send the generated IMAGE_URL media and offer another generation
- If generation fails, show the error and offer retry
Details
Good to know
- Use the installed ai-image-generation module action through moduleActionRef when it is installed.
- Call get_module_details for ai-image-generation before drafting exact inputFields and outputFields.
- Do not include provider or model in generated inputFields. They are async setup fields and must be configured in the embedded module setup form after the flow is created.
- Use plain default values for size, quality, count, and background unless the user explicitly asks to make them configurable.
- For generated image delivery, create IMAGE_URL media with url set to the image_url action output field reference, then attach that media to a MESSAGE block.
- If the AI Image Generation module is not installed, propose installing it instead of inventing HTTP or custom code.
Keep in mind
- Do not paste base64 images into prompts or messages.
- Do not create fake HTTP image generation calls when the installed module exists.
- Do not send a generated URL only as plain text when IMAGE_URL media can display the image directly.
- Do not use rule.left or rule.right in condition blocks; use firstOperand and value.
