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.
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
You send a topic to your Telegram bot.
AI writes a LinkedIn draft, which is saved and sent back with Approve and Redo buttons.
Tapping Redo writes a new version; tapping Approve posts it to LinkedIn.
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
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 LinkedIn and Telegram steps into one automation
Under the hood
The code that runs this automation
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?
What does Redo do?
Can several drafts wait at once?
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
Turn a voice note on Telegram into a LinkedIn post
Send a rough idea or voice note to your bot, get a polished LinkedIn post back, and publish it when you confirm.
See how it worksSchedule AI LinkedIn posts with Telegram approval
On your schedule a LinkedIn post is written from your themes, sent to Telegram for approval, published, and confirmed.
See how it worksShare new articles on LinkedIn and get a Telegram note
New articles from your blog, Medium or Dev.to are posted to LinkedIn with a short intro, and Telegram confirms each one.
See how it worksKeep exploring
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.