Skip to content

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.

Paste it into your assistant. It tells you what it will send or change before it runs live.

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

  1. You send photos and a short note to your Telegram bot, and they're held as a draft.

  2. AI writes a caption from your note.

  3. You get a preview in Telegram with Approve and Redo buttons.

  4. 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

RunsThe moment it happens
Turn photos sent to Telegram into an approved Facebook postjust nowSucceeded
Telegram · Post previewPreview (3 photos): Autumn wedding blooms in burnt orange and cream, made for Acme Hall this weekend. [Approve] [Redo]

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • 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

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
telegram_photos_to_approved_facebook_post.pyexample
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?
Yes. Photos sent together are kept as one post; send a short note with them for context.
What does Redo do?
It writes a different caption from the same photos and note, and sends a new preview.
How long are drafts kept?
Until you approve or send new photos. Only one draft is waiting at a time.
What permissions does it need?
pages_manage_posts; bot token. Nothing else in your accounts is used.
Does it need AI?
Yes. It uses ClickRuntime's built-in AI, so you don't need an OpenAI or Anthropic key. Every plan includes a monthly AI allowance.
How many runs does it use?
One run for each event the app sends.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

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.