The moment it happens
Send a topic to Telegram and get researched social posts
Message your bot a topic and get back a LinkedIn post and a post for X, written from what is being said about it on the web right now.
- Runs
- The moment it happens
- Apps
- SerpApi, Telegram
- AI
- Yes, uses the built-in AI allowance
- Access
- SerpApi key; bot token
Send this to your assistant
Create a ClickRuntime automation: when I send a topic to my Telegram bot, search Google for recent news on it with SerpApi, write a LinkedIn post and a post for X with AI, and reply with both.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A founder of a small HR software company knows they should post on LinkedIn and X a few times a week. Ideas come up all the time, on a train or after a customer call, but by the time they sit down to write, the moment has passed and they have to research the topic again to say something current.
This automation lets them capture the idea and get a usable draft in one step. They send a topic to their Telegram bot, it searches Google for recent coverage, and AI writes a LinkedIn post and a shorter post for X grounded in those results. The drafts arrive in the chat a few seconds later, ready to tweak and post.
What you get out of it
Turn passing ideas into posts
The gap between having an idea and posting about it is where most social content dies. A draft in hand within seconds makes it far more likely the post actually goes out.
Grounded in what is happening now
Posts built from recent search results reference current news and figures. That makes them more useful to readers than generic opinions written from memory.
Two formats from one request
LinkedIn rewards a longer, considered post and X a short, sharp one. Getting both at once saves rewriting the same thought twice.
You stay in control of publishing
The bot replies with drafts rather than posting for you. You can adjust the tone, add a personal story, and post when it suits you.
How it works
What happens, step by step
When you send a topic to your Telegram bot, ClickRuntime searches Google News for recent articles about it.
It takes the headlines and short summaries of the top results.
AI writes a LinkedIn post and a shorter post for X from those results, following the tone you set.
Both drafts are sent back to you in the same Telegram chat, with the main source link.
Before it runs live
- Connect SerpApi
- 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 SerpApi and Telegram steps into one automation
Under the hood
The code that runs this automation
from clickruntime import on_event, credentials, http, ai
VOICE = "Plain and practical, first person, no hashtags."
@on_event
def handle(event):
msg = (event.json or {}).get("message") or {}
topic = msg.get("text", "").strip()
if not topic:
return {"ignored": True}
results = http.get("https://serpapi.com/search", params={"engine": "google", "q": topic, "tbm": "nws", "num": 8,
"api_key": credentials.secret("SERPAPI_API_KEY")}).json().get("news_results", [])
sources = "\n".join(f"- {r['title']}: {r.get('snippet', '')} ({r['link']})" for r in results[:8])
drafts = ai.generate(f"Topic: {topic}\nRecent coverage:\n{sources}\n\nWrite a LinkedIn post (under 200 words) and a post for X (under 260 characters). Label them LinkedIn: and X:.",
system=f"You write social posts. {VOICE} Use only facts from the coverage.", max_output_tokens=600).text
if results:
drafts += f"\n\nSource: {results[0]['link']}"
http.post(f"https://api.telegram.org/bot{credentials.secret('TELEGRAM_BOT_TOKEN')}/sendMessage", json={"chat_id": msg["chat"]["id"], "text": drafts})
return {"topic": topic, "sources": len(results)}FAQ
Common questions
Does it post to LinkedIn or X for me?
Can I set the tone of the posts?
How recent are the search results?
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
Ask a Telegram bot and get answers with sources
Ask your bot any question and get a short answer based on live Google results, with the links it used.
See how it worksA Telegram assistant that searches the web when it needs to
Chat with your own assistant on Telegram that remembers the conversation and looks things up online when a question needs current information.
See how it worksFind promo codes for a shop from Telegram
Send a shop name to your bot and get a list of current discount codes found on the web, with what each one claims to offer.
See how it worksKeep exploring
Set up “Send a topic to Telegram and get researched social posts” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.
