Send a topic to your Telegram chat and get back a drafted social post for the platform you choose, with a picture to go with it.

UsesImgBBOpenAIStability AITelegram

Message a topic, get post copy and a picture back

Whenever you send a topic to your Telegram chat, a finished post for the platform you chose comes back, with a picture drawn to go with it. The picture arrives first, then the copy as its own message, so you can copy it straight out. Nothing is published anywhere by the workflow.

The copy is held to what you gave it: everything the post claims about the business has to come from your one-line description or the topic you sent, and the AI is forbidden from inventing a statistic, a price, a discount, a rating, an award or a named partner, or from promising a result or a guarantee. The picture is drawn from a description the copy itself ends with, with real people, logos and readable text ruled out. If drawing or hosting it fails, the copy is still sent with a note that no picture could be made.

You need a Telegram bot in your chat, your brand name, one line about what you sell, and the platform and picture style you want.

TelegramTelegramWhen a new message is received. Save it as incomingMessage.When a new message is received. Save it as incomingMessage.
Set brandName to blank.Set brandName to blank.
Set whatYouDo to blank.Set whatYouDo to blank.
Set postPlatform to “LinkedIn”.Set postPlatform to “LinkedIn”.
Set pictureStyle to “photographic”.Set pictureStyle to “photographic”.
Trim postPlatform and save it as platformChoice.Trim postPlatform and save it as platformChoice.
Set knownPlatforms to:Set knownPlatforms to:linkedin x instagram facebook threads
If knownPlatforms doesn't contain platformChoice in lowercaseIf knownPlatforms doesn't contain platformChoice in lowercase
Yes
Stop and report a problem: The 'postPlatform' step is not one this template writes for. Use one of: LinkedIn, X, Instagram, Facebook or Threads.Stop and report a problem: The 'postPlatform' step is not one this template writes for. Use one of: LinkedIn, X, Instagram, Facebook or Threads.
No
No steps
TextMake pictureStyle lowercase and save it as styleChoice.Make pictureStyle lowercase and save it as styleChoice.
Set knownStyles to:Set knownStyles to:3d-model analog-film anime cinematic comic-book digital-art enhance fantasy-art isometric line-art low-poly modeling-compound neon-punk origami photographic pixel-art ...
If knownStyles doesn't contain styleChoiceIf knownStyles doesn't contain styleChoice
Yes
Stop and report a problem: The 'pictureStyle' step is not a style the image generator knows. Use one of: 3d-model, analog-film, anime, cinematic, comic-book, digital-art, enhance, fantasy-art, isometric, line-art, low-poly, modeling-compound, neon-punk, origami, photographic, pixel-art or tile-texture.Stop and report a problem: The 'pictureStyle' step is not a style the image generator knows. Use one of: 3d-model, analog-film, anime, cinematic, comic-book, digital-art, enhance, fantasy-art, isometric, line-art, low-poly, modeling-compound, neon-punk, origami, photographic, pixel-art or tile-texture.
No
No steps
Set chatId to incomingMessage.chat_id.Set chatId to incomingMessage.chat_id.
If chatId is emptyIf chatId is empty
Yes
Stop and report a problem: That message did not say which chat it came from, so there was nowhere to send the draft back to.Stop and report a problem: That message did not say which chat it came from, so there was nowhere to send the draft back to.
No
No steps
Set topicText to blank.Set topicText to blank.
If a step below fails, save the error as messageErrorIf a step below fails, save the error as messageError
Try
Trim incomingMessage.text and save it as topicText.Trim incomingMessage.text and save it as topicText.
On error
Finish the run: That message had no text in it, so there was no topic to write about.Finish the run: That message had no text in it, so there was no topic to write about.
Set isOwnReply to topicText starts with “Here is your draft” or topicText starts with “Picture for your” or topicText starts with “I could not write that post” or topicText starts with “Tell me what the post is about”.Set isOwnReply to topicText starts with “Here is your draft” or topicText starts with “Picture for your” or topicText starts with “I could not write that post” or topicText starts with “Tell me what the post is about”.
If isOwnReply is yesIf isOwnReply is yes
Yes
Finish the run: That message was one this workflow sent, so it was left alone.Finish the run: That message was one this workflow sent, so it was left alone.
No
No steps
If the length of topicText is less than 3If the length of topicText is less than 3
Yes
TelegramTelegramSend a message to chat chatId.Send a message to chat chatId.Tell me what the post is about - 'we now ship on Saturdays', 'our new opening hours', anything you want written up.
Finish the run: The message did not name a topic, so no post was written.Finish the run: The message did not name a topic, so no post was written.
No
No steps
Shorten topicText to 300 characters (keeping words whole) and save it as cappedTopic.Shorten topicText to 300 characters (keeping words whole) and save it as cappedTopic.
Set brandLine to “@brandName - whatYouDo”.Set brandLine to “@brandName - whatYouDo”.
Set factRules to Everything the post claims about the business must come from the line above or from the topic below. Invent nothing else.Set factRules to Everything the post claims about the business must come from the line above or from the topic below. Invent nothing else. Never write a statistic, a percentage, a price, a discount, a customer count, a rating, an award, a date or a named partner that you were not given. Never promise a result, a saving, a delivery time or a guarantee. If the post would need a number you were not given, write it without the number. Do not name, quote or imply an endorsement from any real person, customer or company. No medical, legal or financial advice.
Set styleRules to Write in plain language. Short sentences. No hype words, no exclamation marks, no emoji unless the platform is Instagram or Threads, and no more than three hashtags.Set styleRules to Write in plain language. Short sentences. No hype words, no exclamation marks, no emoji unless the platform is Instagram or Threads, and no more than three hashtags. Open with the point rather than a question. End with one clear thing the reader can do.
Set formatRules to Reply with the post itself and nothing else - no heading, no explanation, no quotation marks around it.Set formatRules to Reply with the post itself and nothing else - no heading, no explanation, no quotation marks around it. Then, on the very last line, write IMAGE: followed by one sentence describing a picture to run alongside the post. Describe a scene, an object or a setting. Do not describe any real, named or identifiable person, and do not ask for a logo, a brand mark, a chart or any readable text in the picture.
Set postPrompt to Write one social media post for platformChoice.Set postPrompt to Write one social media post for platformChoice. The business: brandLine factRules@styleRules@formatRulesThe topic: cappedTopic .
Set modelResult to nothing.Set modelResult to nothing.
If a step below fails, save the error as modelCallErrorIf a step below fails, save the error as modelCallError
Try
OpenAIOpenAIAsk OpenAI: postPrompt. Save it as modelResult.Ask OpenAI: postPrompt. Save it as modelResult.
On error
Change modelResult to nothing.Change modelResult to nothing.
Set copyRaw to blank.Set copyRaw to blank.
If a step below fails, save the error as copyErrorIf a step below fails, save the error as copyError
Try
Trim modelResult.response_text and save it as copyRaw.Trim modelResult.response_text and save it as copyRaw.
On error
Change copyRaw to blank.Change copyRaw to blank.
If copyRaw is emptyIf copyRaw is empty
Yes
TelegramTelegramSend a message to chat chatId.Send a message to chat chatId.I could not write that post just now. Send the topic again and I will try once more.
Finish the run: The model returned nothing, so no post was sent.Finish the run: The model returned nothing, so no post was sent.
No
No steps
Set postText to copyRaw.Set postText to copyRaw.
Set imageBrief to cappedTopic.Set imageBrief to cappedTopic.
If copyRaw contains “ IMAGE:”If copyRaw contains “ IMAGE:”
Yes
Split copyRaw by "Split copyRaw by “ IMAGE:” and save it as copyParts.
Trim the first item of copyParts and save it as postText.Trim the first item of copyParts and save it as postText.
Trim the last item of copyParts and save it as briefPart.Trim the last item of copyParts and save it as briefPart.
If briefPart isn't emptyIf briefPart isn't empty
Yes
Change imageBrief to briefPart.Change imageBrief to briefPart.
No
No steps
No
No steps
If postText is emptyIf postText is empty
Yes
Change postText to copyRaw.Change postText to copyRaw.
No
No steps
Set illustrationPrompt to “A picture to run alongside a social media post, with no text or lettering anywhere in it and no real, named person in it. The picture: imageBrief truncated to 500 characters using “...” as the ellipsis (keeping words whole)”.Set illustrationPrompt to “A picture to run alongside a social media post, with no text or lettering anywhere in it and no real, named person in it. The picture: imageBrief truncated to 500 characters using “...” as the ellipsis (keeping words whole)”.
Set pictureRef to blank.Set pictureRef to blank.
If a step below fails, save the error as drawingErrorIf a step below fails, save the error as drawingError
Try
Stability AIStability AIGenerate an image of illustrationPrompt. Save it as generated.Generate an image of illustrationPrompt. Save it as generated.text, letters, words, captions, watermark, signature, logo, brand mark, real person, celebrity, chart, infographic
Trim generated.document_ref and save it as pictureRef.Trim generated.document_ref and save it as pictureRef.
On error
Change pictureRef to blank.Change pictureRef to blank.
Set pictureUrl to blank.Set pictureUrl to blank.
If pictureRef isn't emptyIf pictureRef isn't empty
Yes
If a step below fails, save the error as hostingErrorIf a step below fails, save the error as hostingError
Try
ImgBBImgBBUpload an image. Save it as hosted.Upload an image. Save it as hosted.
Trim hosted.url and save it as pictureUrl.Trim hosted.url and save it as pictureUrl.
On error
Change pictureUrl to blank.Change pictureUrl to blank.
No
No steps
If pictureUrl doesn't start with “https://”If pictureUrl doesn't start with “https://”
Yes
Change pictureUrl to blank.Change pictureUrl to blank.
No
No steps
Set headerNote to:Set headerNote to::
If pictureUrl isn't emptyIf pictureUrl isn't empty
Yes
TelegramTelegramSend a photo to chat chatId.Send a photo to chat chatId. Photo URL: pictureUrlPicture for your platformChoice post: cappedTopic truncated to 900 characters using "..." as the ellipsis (keeping words whole)
No
Change headerNote to:Change headerNote to:. No picture could be made for this one.
Set postHeader to “Here is your draft platformChoice post for brandName@headerNote”.Set postHeader to “Here is your draft platformChoice post for brandName@headerNote”.
Shorten postHeader plus postText to 3800 characters (keeping words whole) and save it as postMessage.Shorten postHeader plus postText to 3800 characters (keeping words whole) and save it as postMessage.
TelegramTelegramSend a message to chat chatId.Send a message to chat chatId.postMessage
If pictureUrl isn't emptyIf pictureUrl isn't empty
Yes
Finish the run: The post copy and its picture were sent back to the chat they were asked for in.Finish the run: The post copy and its picture were sent back to the chat they were asked for in.
No
Finish the run: The post copy was sent, but no picture could be made for it.Finish the run: The post copy was sent, but no picture could be made for it.