Skip to content

The moment it happens

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.

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 ask my Telegram bot a question, search Google with SerpApi and reply with a short answer and the top three source links.

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 sales rep is about to walk into a meeting and wants to know whether the prospect announced layoffs last month, or what a competitor's new product costs. Opening a browser on a phone, scanning ads and skimming five pages is slow, and AI chat tools without search often answer from old information.

This bot answers with what Google shows today. The rep types the question in Telegram, the bot searches with SerpApi, and AI writes a short answer from the top results, followed by the links so they can check before repeating it to a customer.

What you get out of it

  • Current answers, not stale ones

    Answers come from today's search results, so questions about recent news, prices or announcements get recent answers. That matters for anything that changes month to month.

  • Sources you can check

    Each reply lists the links it used. Before quoting a number to a client, you can tap through and confirm it.

  • Quick to use on the move

    A Telegram message is faster than a browser search on a phone. It suits people between meetings, on the road, or on a shop floor.

  • Short answers, no scrolling

    The bot reads the results so you do not have to. You get a few sentences that answer the question instead of a page of links and ads.

How it works

What happens, step by step

  1. When you send a question to your Telegram bot, ClickRuntime runs a Google search for it through SerpApi.

  2. It collects the titles and snippets of the top results, including any quick answer Google shows.

  3. AI writes a short answer using only those results.

  4. The answer and the top three source links are sent back to you in the same chat.

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
Ask a Telegram bot and get answers with sourcesjust nowSucceeded
Telegram · Research botAcme Robotics raised a Series B of $40M in September, led by Northwind Ventures. Sources: acmerobotics.com/news ...

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

@on_event
def handle(event):
    msg = (event.json or {}).get("message") or {}
    question = msg.get("text", "").strip()
    if not question:
        return {"ignored": True}
    data = http.get("https://serpapi.com/search", params={"engine": "google", "q": question, "num": 8,
                                                          "api_key": credentials.secret("SERPAPI_API_KEY")}).json()
    results = data.get("organic_results", [])[:6]
    context = "\n".join(f"[{i + 1}] {r['title']}: {r.get('snippet', '')}" for i, r in enumerate(results))
    if data.get("answer_box"):
        context = f"Quick answer: {data['answer_box'].get('answer') or data['answer_box'].get('snippet', '')}\n" + context
    answer = ai.generate(f"Question: {question}\n\nSearch results:\n{context}", system="Answer in 2 to 4 sentences using only the results. Say if they do not answer it.",
                         max_output_tokens=250).text.strip()
    links = "\n".join(r["link"] for r in results[:3])
    http.post(f"https://api.telegram.org/bot{credentials.secret('TELEGRAM_BOT_TOKEN')}/sendMessage",
              json={"chat_id": msg["chat"]["id"], "text": f"{answer}\n\n{links}", "disable_web_page_preview": True})
    return {"results": len(results)}

FAQ

Common questions

How long are the answers?
Usually two to four sentences, followed by up to three links. You can ask for a longer answer by saying so in the question.
Can it answer about a specific website?
Yes. Add "site:" and a domain to the question, such as "site:northwind.com pricing", and the search is limited to that site.
Does it remember earlier questions?
No, each question is answered on its own. That keeps answers focused on what you just asked.
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 “Ask a Telegram bot and get answers with sources” from your assistant

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