Skip to content

The moment it happens

Turn a topic into a researched post on X

Send a topic to your trigger link and a post on X based on fresh Google results goes out from your account, with the link emailed to you.

Runs
The moment it happens
Apps
SerpApi, X
AI
Yes, uses the built-in AI allowance
Access
SerpApi key; X tweet.write

Send this to your assistant

Create a ClickRuntime automation: when I send a topic to this link, search Google with SerpApi, write a post for X from the top results, publish it and email me 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 product manager at a developer tools startup runs the company's X account on the side. They see things worth commenting on all day, but turning a thought into a post with a real fact behind it means stopping to search and write, and the moment usually passes.

This automation makes it one step. They send a topic to the trigger link, it searches Google through SerpApi, AI writes a short post from what it finds, and it goes out from the company account. An email with the link follows so they can watch for replies.

What you get out of it

  • Post while a topic is hot

    Timing matters on X. Going from idea to post in seconds means you join the conversation while people are still talking about it.

  • Short, but backed by facts

    Each post is grounded in current search results. A specific figure or detail makes a short post more credible and more likely to be shared.

  • Send a topic from anywhere

    A phone shortcut, a bookmark or your AI assistant can send the topic. The account stays active even when you are away from your desk.

  • You always know what went out

    The confirmation email shows the post text and link. You can reply to responses or delete the post quickly if needed.

How it works

What happens, step by step

  1. When a topic arrives at the automation's trigger link, ClickRuntime searches Google for it through SerpApi.

  2. AI writes a short post for X from the top results, keeping within the character limit.

  3. The post is published from your connected X account.

  4. You get an email with the post text and a link to it.

Before it runs live

  • Connect SerpApi
  • Connect X
  • Paste your automation's link into the other app's webhook settings

What you get

RunsThe moment it happens
Turn a topic into a researched post on Xjust nowSucceeded
Email · Posted on XPosted on X: "Acme Cloud just cut egress fees by half. If you move a lot of data between regions, your bill is about to drop."

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 X 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.
research_a_topic_and_post_a_tweet.pyexample
from clickruntime import on_event, credentials, http, ai, notify

def post_to_x(text):
    r = http.post("https://api.x.com/2/tweets", headers={"Authorization": f"Bearer {credentials.connection('x', 'work')}"}, json={"text": text})
    r.raise_for_status()
    return r.json()["data"]["id"]

@on_event
def handle(event):
    topic = ((event.json or {}).get("topic") or "").strip()
    if not topic:
        return {"error": "no topic"}
    results = http.get("https://serpapi.com/search", params={"engine": "google", "q": topic, "api_key": credentials.secret("SERPAPI_API_KEY")}).json().get("organic_results", [])[:6]
    facts = "\n".join(f"- {r['title']}: {r.get('snippet', '')}" for r in results)
    text = ai.generate(f"Topic: {topic}\nResults:\n{facts}\nWrite one post for X under 250 characters. No hashtags.", max_output_tokens=120).text.strip()[:280]
    post_id = post_to_x(text)
    notify.email_me(f"Posted on X: {topic}", f"{text}\n\nhttps://x.com/i/web/status/{post_id}")
    return {"post": post_id}

FAQ

Common questions

Can I review the post first?
Yes. Ask for the draft to be emailed to you instead of published, and post it yourself.
Will it include a link?
It can add the link of the main source when there is room within the character limit.
How many posts can it make?
X sets posting limits by plan, and the free API tier allows only a small number a month. Occasional posts on request fit well within it.
What permissions does it need?
SerpApi key; X tweet.write. 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 a topic into a researched post on X” from your assistant

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