Skip to content

The moment it happens

Add and list Supabase records from Telegram commands

You type /add, /list or /delete to your Telegram bot and the matching rows in your Supabase table are created, shown or removed.

Runs
The moment it happens
Apps
Supabase, Telegram
AI
Not needed
Access
Supabase read+write; bot token

Send this to your assistant

Create a ClickRuntime automation: let me send /add, /list and /delete commands to my Telegram bot to manage rows in my Supabase links table, only from my chat ID.

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 keeps a running list in Supabase: reading links, leads, ideas. Adding to it means opening a laptop and the table editor, so most ideas get lost between meetings.

Sending a quick command to a Telegram bot from your phone saves the item in seconds, and /list brings the latest ones back whenever you need them.

What you get out of it

  • Capture ideas in seconds

    A quick /add from your phone beats opening the database on a laptop.

  • Only you can use it

    Commands from any chat ID other than yours are ignored.

  • Works with your own table

    Rows go straight into the Supabase table your other tools already read.

  • No app to build

    Telegram is the interface, so there's nothing to design or host.

How it works

What happens, step by step

  1. You send a command to your Telegram bot, such as /add with a link.

  2. ClickRuntime checks the message came from an allowed chat ID and ignores anyone else.

  3. It adds, lists or deletes rows in your Supabase table.

  4. The bot replies with the result.

Before it runs live

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

What you get

RunsThe moment it happens
Add and list Supabase records from Telegram commandsjust nowSucceeded
Telegram · My Links bot#42 https://acme.example/blog/pricing-pages · #41 Call Northwind about the Q1 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
  • 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 Supabase 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.
manage_supabase_records_from_telegram_commands.pyexample
from clickruntime import on_event, credentials, http

ALLOWED = {123456789}  # your Telegram chat id
SUPABASE = "https://your-project.supabase.co/rest/v1"

def sb(method, path, **kw):
    key = credentials.secret("SUPABASE_KEY")
    r = http.request(method, f"{SUPABASE}/{path}", **kw, headers={"apikey": key, "Authorization": f"Bearer {key}", "Prefer": "return=representation,resolution=merge-duplicates"})
    return r.raise_for_status() or (r.json() if r.content else None)

def tg(method, **params):
    return http.post(f"https://api.telegram.org/bot{credentials.secret('TELEGRAM_BOT_TOKEN')}/{method}", json=params).json()

@on_event
def handle(event):
    msg = (event.json or {}).get("message") or {}
    chat, text = msg.get("chat", {}).get("id"), (msg.get("text") or "").strip()
    if chat not in ALLOWED or not text.startswith("/"):
        return {"ignored": True}
    cmd, _, arg = text.partition(" ")
    if cmd == "/add" and arg:
        row = sb("POST", "links", json={"text": arg})[0]
        reply = f"Saved #{row['id']}"
    elif cmd == "/list":
        rows = sb("GET", "links?order=id.desc&limit=10")
        reply = "\n".join(f"#{r['id']} {r['text']}" for r in rows) or "Nothing saved yet"
    elif cmd == "/delete" and arg.isdigit():
        reply = f"Deleted #{arg}" if sb("DELETE", f"links?id=eq.{arg}") else f"No row #{arg}"
    else:
        reply = "Commands: /add <text>, /list, /delete <id>"
    tg("sendMessage", chat_id=chat, text=reply)
    return {"command": cmd}

FAQ

Common questions

Which commands are supported?
/add followed by text or a link, /list for the latest 10 rows, and /delete followed by a row number.
Can I allow teammates to use it?
Yes. Add their Telegram chat IDs to the allowed list.
Can it work with other tables?
Yes. Change the table and columns, or add commands for each table you use.
What permissions does it need?
Supabase read+write; 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 “Add and list Supabase records from Telegram commands” from your assistant

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