Skip to content

The moment it happens

Send a topic to Telegram and approve a LinkedIn draft

Send a topic to your bot, get a well-researched LinkedIn draft back, and it's posted when you tap Approve.

Runs
The moment it happens
Apps
LinkedIn, Telegram
AI
Yes, uses the built-in AI allowance
Access
bot token; LinkedIn w_member_social

Send this to your assistant

Create a ClickRuntime automation: when I send a topic to my Telegram bot, write a researched LinkedIn post about it, send me the draft with Approve and Redo buttons, and post it to LinkedIn when I approve, replying with the link.

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 management consultant has strong views but little time. Ideas for LinkedIn posts come during commutes and between meetings, and by the time they sit down to write, the moment has gone.

Now they send a topic to a Telegram bot whenever an idea strikes. A considered draft comes back in under a minute; one tap posts it, and the bot replies with the link.

What you get out of it

  • Post from your phone

    An idea becomes a LinkedIn post in under a minute.

  • Drafts with substance

    Posts include context and a clear point, not filler.

  • Approve or redo

    Tap Redo for another angle on the same topic.

  • Link sent back

    The bot confirms each post with its link.

How it works

What happens, step by step

  1. You send a topic to your Telegram bot.

  2. AI writes a LinkedIn draft, which is saved and sent back with Approve and Redo buttons.

  3. Tapping Redo writes a new version; tapping Approve posts it to LinkedIn.

  4. The bot replies with the link to your live post.

Before it runs live

  • Connect LinkedIn
  • Connect Telegram
  • Paste your automation's link into the other app's webhook settings

What you get

RunsThe moment it happens
Send a topic to Telegram and approve a LinkedIn draftjust nowSucceeded
Telegram · LinkedIn botPosted: linkedin.com/feed/update/urn:li:share:7... (Why most reorganisations fail in month three)

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 LinkedIn 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.
ai_content_factory_with_telegram_approval_before_linkedin.pyexample
from clickruntime import on_event, credentials, http, ai, state

AUTHOR = "urn:li:person:abc123"

@on_event
def handle(event):
    body, token = event.json or {}, credentials.secret("TELEGRAM_BOT_TOKEN")
    tg = f"https://api.telegram.org/bot{token}"
    cb = body.get("callback_query")
    key = cb["data"].split(":")[1] if cb else event.event_id
    draft = state.get(f"draft:{key}") or {"topic": body.get("message", {}).get("text", ""), "chat": body.get("message", {}).get("chat", {}).get("id")}
    if cb:
        http.post(f"{tg}/answerCallbackQuery", json={"callback_query_id": cb["id"]})
    if cb and cb["data"].startswith("ok:"):
        r = http.post("https://api.linkedin.com/rest/posts", headers={"Authorization": f"Bearer {credentials.connection('linkedin', 'work')}", "LinkedIn-Version": "202409"},
                      json={"author": AUTHOR, "commentary": draft["text"], "visibility": "PUBLIC", "lifecycleState": "PUBLISHED", "distribution": {"feedDistribution": "MAIN_FEED"}})
        http.post(f"{tg}/sendMessage", json={"chat_id": draft["chat"], "text": f"Posted: https://www.linkedin.com/feed/update/{r.headers.get('x-restli-id')}"})
        state.delete(f"draft:{key}")
        return {"posted": True}
    draft["text"] = ai.generate(f"Write a thoughtful LinkedIn post with context and a clear point on: {draft['topic']}", max_output_tokens=600).text
    state.set(f"draft:{key}", draft)
    buttons = [[{"text": "Approve", "callback_data": f"ok:{key}"}, {"text": "Redo", "callback_data": f"redo:{key}"}]]
    http.post(f"{tg}/sendMessage", json={"chat_id": draft["chat"], "text": draft["text"], "reply_markup": {"inline_keyboard": buttons}})
    return {"drafted": key}

FAQ

Common questions

How researched are the drafts?
Drafts draw on general knowledge and any notes or links you include with the topic. Send a link and it's used as source material.
What does Redo do?
It writes a fresh draft with a different angle and sends it back for approval.
Can several drafts wait at once?
Yes. Each draft has its own buttons, so you can approve them in any order.
What permissions does it need?
bot token; LinkedIn w_member_social. 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 “Send a topic to Telegram and approve a LinkedIn draft” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.