The moment it happens
Turn photos sent to Telegram into an approved Facebook post
Send photos or an idea to your bot, get a caption written, approve it in Telegram, and it's posted to your Facebook Page.
- Runs
- The moment it happens
- Apps
- Facebook Pages, Telegram
- AI
- Yes, uses the built-in AI allowance
- Access
- pages_manage_posts; bot token
Send this to your assistant
Create a ClickRuntime automation: when I send photos or an idea to my Telegram bot, write a caption, send me a preview with Approve and Redo buttons, and when I approve, post it with the photos to my Facebook Page.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A florist takes lovely photos of every arrangement but rarely posts them, because writing captions and uploading from the phone at the end of a long day feels like one job too many.
Now they send the photos to a Telegram bot with a few words. A caption comes back for approval, and one tap posts it to the shop's Facebook Page with the photos.
What you get out of it
Post straight from the shop floor
Send photos the moment you take them.
Captions written for you
A few words become a polished caption.
You approve every post
Nothing goes live until you tap Approve.
Ask for another version
Not happy? Tap Redo for a new caption.
How it works
What happens, step by step
You send photos and a short note to your Telegram bot, and they're held as a draft.
AI writes a caption from your note.
You get a preview in Telegram with Approve and Redo buttons.
When you tap Approve, the photos and caption are posted to your Facebook Page.
Before it runs live
- Connect Facebook Pages
- Connect Telegram
- Paste your automation's link into the other app's webhook settings
What you get
Build your own
Need it to work differently?
Your own rules
Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.
Any number of apps
One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.
AI where it helps
Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.
On a schedule or on each event
Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.
Changes you can ask for
- Act only on the items that match your own rules, and skip the rest
- Change what the AI looks for, or how it writes the result
- Add another app, for example also send it to Slack
- Combine it with other Facebook Pages and Telegram steps into one automation
Under the hood
The code that runs this automation
from clickruntime import on_event, credentials, http, ai, state
PAGE_ID, CHAT = "1234567890", "123456789"
@on_event
def handle(event):
body, token = event.json or {}, credentials.secret("TELEGRAM_BOT_TOKEN")
draft = state.get("draft") or {"photos": [], "note": ""}
if "callback_query" in body:
if body["callback_query"]["data"] == "approve":
fb = {"access_token": credentials.connection("facebook", "work")}
ids = [http.post(f"https://graph.facebook.com/v21.0/{PAGE_ID}/photos", data={**fb, "url": u, "published": "false"}).json()["id"] for u in draft["photos"]]
http.post(f"https://graph.facebook.com/v21.0/{PAGE_ID}/feed",
json={**fb, "message": draft["caption"], "attached_media": [{"media_fbid": i} for i in ids]})
state.delete("draft")
return {"posted": len(ids)}
else:
msg = body.get("message", {})
if msg.get("photo"):
path = http.get(f"https://api.telegram.org/bot{token}/getFile", params={"file_id": msg["photo"][-1]["file_id"]}).json()["result"]["file_path"]
draft["photos"].append(f"https://api.telegram.org/file/bot{token}/{path}")
draft["note"] = msg.get("caption") or msg.get("text") or draft["note"]
draft["caption"] = ai.generate(f"Warm Facebook caption for a florist's post: {draft['note']}", max_output_tokens=150).text.strip()
state.set("draft", draft)
buttons = [[{"text": "Approve", "callback_data": "approve"}, {"text": "Redo", "callback_data": "redo"}]]
http.post(f"https://api.telegram.org/bot{token}/sendMessage",
json={"chat_id": CHAT, "text": f"Preview ({len(draft['photos'])} photos):\n{draft['caption']}", "reply_markup": {"inline_keyboard": buttons}})
return {"draft": True}FAQ
Common questions
Can I send several photos?
What does Redo do?
How long are drafts kept?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Look up Facebook ad interests from Telegram
Type an interest to your Telegram bot and get back related Facebook targeting interests with their audience sizes.
See how it worksMirror your Telegram channel to your Facebook Page
Posts in your Telegram channel are reposted to your Facebook Page, with photos, as soon as you publish them.
See how it worksPublish AI posts to your Page and get a Telegram note
AI writes and publishes a post on your Facebook Page from your topic list, and Telegram tells you what went out.
See how it worksKeep exploring
Set up “Turn photos sent to Telegram into an approved Facebook post” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.