Skip to content

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.

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

  1. When you send a topic to your Telegram bot, ClickRuntime searches Google News for recent articles about it.

  2. It takes the headlines and short summaries of the top results.

  3. AI writes a LinkedIn post and a shorter post for X from those results, following the tone you set.

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

RunsThe moment it happens
Send a topic to Telegram and get researched social postsjust nowSucceeded
Telegram · Post draftsLinkedIn: Four-day weeks are back in the news after Northwind Logistics reported lower turnover in its pilot...

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 SerpApi 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.
social_posts_researched_from_the_web_via_telegram.pyexample
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?
No. It sends the drafts back to you in Telegram. You copy them into each network, which lets you edit and pick the right moment to post.
Can I set the tone of the posts?
Yes. Describe your voice once, such as "plain, practical, no hashtags", and every draft follows it.
How recent are the search results?
It searches Google News for the topic, which favours articles from the last few days. You can ask for results from the past week or month instead.
What permissions does it need?
SerpApi key; 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 “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.