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

TelegramTelegramWhen a new message is received. Save it as incomingMessage.When a new message is received. Save it as incomingMessage.
ValuesSet brandName to blank.Set brandName to blank.
ValuesSet whatYouDo to blank.Set whatYouDo to blank.
ValuesSet postPlatform to LinkedIn.Set postPlatform to LinkedIn.
ValuesSet pictureStyle to photographic.Set pictureStyle to photographic.
TextTrim postPlatform and save it as platformChoice.Trim postPlatform and save it as platformChoice.
ValuesSet knownPlatforms to:Set knownPlatforms to:linkedin x instagram facebook threads
Decisions & LoopsIf knownPlatforms doesn't contain platformChoice in lowercaseIf knownPlatforms doesn't contain platformChoice in lowercase
Yes
Decisions & LoopsStop 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.
ValuesSet 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 ...
Decisions & LoopsIf knownStyles doesn't contain styleChoiceIf knownStyles doesn't contain styleChoice
Yes
Decisions & LoopsStop 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
ValuesSet chatId to incomingMessage.chat_id.Set chatId to incomingMessage.chat_id.
Decisions & LoopsIf chatId is emptyIf chatId is empty
Yes
Decisions & LoopsStop 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
ValuesSet topicText to blank.Set topicText to blank.
Decisions & LoopsIf a step below fails, save the error as messageErrorIf a step below fails, save the error as messageError
Try
TextTrim incomingMessage.text and save it as topicText.Trim incomingMessage.text and save it as topicText.
On error
Decisions & LoopsFinish 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.
ValuesSet 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.
Decisions & LoopsIf isOwnReply is yesIf isOwnReply is yes
Yes
Decisions & LoopsFinish 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
Decisions & LoopsIf 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.
Decisions & LoopsFinish 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
TextShorten 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.
ValuesSet brandLine to brandName - whatYouDo.Set brandLine to brandName - whatYouDo.
ValuesSet 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.
ValuesSet 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.
ValuesSet 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.
ValuesSet 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 .
ValuesSet modelResult to nothing.Set modelResult to nothing.
Decisions & LoopsIf 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
ValuesChange modelResult to nothing.Change modelResult to nothing.
ValuesSet copyRaw to blank.Set copyRaw to blank.
Decisions & LoopsIf a step below fails, save the error as copyErrorIf a step below fails, save the error as copyError
Try
TextTrim modelResult.response_text and save it as copyRaw.Trim modelResult.response_text and save it as copyRaw.
On error
ValuesChange copyRaw to blank.Change copyRaw to blank.
Decisions & LoopsIf 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.
Decisions & LoopsFinish 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
ValuesSet postText to copyRaw.Set postText to copyRaw.
ValuesSet imageBrief to cappedTopic.Set imageBrief to cappedTopic.
Decisions & LoopsIf copyRaw contains IMAGE:If copyRaw contains IMAGE:
Yes
TextSplit copyRaw by "Split copyRaw by IMAGE: and save it as copyParts.
TextTrim the first item of copyParts and save it as postText.Trim the first item of copyParts and save it as postText.
TextTrim the last item of copyParts and save it as briefPart.Trim the last item of copyParts and save it as briefPart.
Decisions & LoopsIf briefPart isn't emptyIf briefPart isn't empty
Yes
ValuesChange imageBrief to briefPart.Change imageBrief to briefPart.
No
No steps
No
No steps
Decisions & LoopsIf postText is emptyIf postText is empty
Yes
ValuesChange postText to copyRaw.Change postText to copyRaw.
No
No steps
ValuesSet 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).
ValuesSet pictureRef to blank.Set pictureRef to blank.
Decisions & LoopsIf 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
TextTrim generated.document_ref and save it as pictureRef.Trim generated.document_ref and save it as pictureRef.
On error
ValuesChange pictureRef to blank.Change pictureRef to blank.
ValuesSet pictureUrl to blank.Set pictureUrl to blank.
Decisions & LoopsIf pictureRef isn't emptyIf pictureRef isn't empty
Yes
Decisions & LoopsIf 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.
TextTrim hosted.url and save it as pictureUrl.Trim hosted.url and save it as pictureUrl.
On error
ValuesChange pictureUrl to blank.Change pictureUrl to blank.
No
No steps
Decisions & LoopsIf pictureUrl doesn't start with https://If pictureUrl doesn't start with https://
Yes
ValuesChange pictureUrl to blank.Change pictureUrl to blank.
No
No steps
ValuesSet headerNote to:Set headerNote to::
Decisions & LoopsIf 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
ValuesChange headerNote to:Change headerNote to:. No picture could be made for this one.
ValuesSet postHeader to Here is your draft platformChoice post for brandName@headerNote.Set postHeader to Here is your draft platformChoice post for brandName@headerNote.
TextShorten 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
Decisions & LoopsIf pictureUrl isn't emptyIf pictureUrl isn't empty
Yes
Decisions & LoopsFinish 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
Decisions & LoopsFinish 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.