Skip to content

The moment it happens

Look up Facebook ad interests from Telegram

Type an interest to your Telegram bot and get back related Facebook targeting interests with their audience sizes.

Runs
The moment it happens
Apps
Facebook Pages, Telegram
AI
Not needed
Access
ads_read; bot token

Send this to your assistant

Create a ClickRuntime automation: when I send a keyword to my Telegram bot, look up matching Facebook ad interests and reply with the top ten and their audience sizes.

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 media buyer planning campaigns for several clients needs to check targeting interests constantly, often while on a call or away from a laptop. Opening Ads Manager to search one keyword is slow on a phone.

Now they send a keyword to a Telegram bot and get back a neat list of related interests with audience sizes in a few seconds, ready to paste into a plan.

What you get out of it

  • Answers in seconds

    Check an interest mid-conversation without opening Ads Manager.

  • Audience sizes included

    See at a glance which interests are big enough to target.

  • Works on your phone

    A chat message is quicker than a desktop tool.

  • Better targeting ideas

    Related interests you hadn't thought of show up in the list.

How it works

What happens, step by step

  1. You send a keyword to your Telegram bot.

  2. ClickRuntime searches Facebook's ad targeting interests for it.

  3. It picks the top ten matches with their audience sizes.

  4. The list is sent back to you in the same Telegram chat.

Before it runs live

  • Connect Facebook Pages
  • Connect Telegram
  • Paste your automation's link into the other app's webhook settings

What you get

RunsThe moment it happens
Look up Facebook ad interests from Telegramjust nowSucceeded
Telegram · Interest finderTrail running: 18,400,000-21,600,000. Ultramarathon: 2,100,000-2,500,000.

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
  • Add an AI step, for example to summarize, sort or draft a reply
  • Add another app, for example also send it to Slack
  • Combine it with other Facebook Pages 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.
look_up_facebook_ad_interests_from_telegram.pyexample
from clickruntime import on_event, credentials, http

@on_event
def handle(event):
    msg = (event.json or {}).get("message", {})
    keyword = msg.get("text", "").strip()
    if not keyword:
        return {"skipped": True}
    results = http.get("https://graph.facebook.com/v21.0/search",
                       params={"type": "adinterest", "q": keyword, "limit": 10,
                               "access_token": credentials.connection("facebook", "work")}).json()["data"]
    lines = [f"{r['name']}: {r.get('audience_size_lower_bound', 0):,}-{r.get('audience_size_upper_bound', 0):,}" for r in results]
    token = credentials.secret("TELEGRAM_BOT_TOKEN")
    http.post(f"https://api.telegram.org/bot{token}/sendMessage",
              json={"chat_id": msg["chat"]["id"], "text": "\n".join(lines) or f"No interests found for {keyword}."})
    return {"results": len(lines)}

FAQ

Common questions

Which interests does it return?
The top matches Facebook suggests for your keyword, with their estimated audience size range.
Can my team use it?
Yes. Add the bot to your team's Telegram group and anyone can send a keyword.
Does it change anything in my ad account?
No. It only searches Facebook's interest list.
What permissions does it need?
ads_read; bot token. Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's 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 “Look up Facebook ad interests from Telegram” from your assistant

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