Skip to content

The moment it happens

Take WhatsApp orders into Supabase

Customers order or ask for a quote on WhatsApp, the items are priced from your Supabase menu, the order is saved and they get a summary back.

Runs
The moment it happens
Apps
Supabase, WhatsApp Business
AI
Yes, uses the built-in AI allowance
Access
WhatsApp messaging; Supabase read+write

Send this to your assistant

Create a ClickRuntime automation: when a customer sends an order on WhatsApp, pick out the items and quantities, price them from our menu table in Supabase, save the order, and reply with a summary and total.

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 bakery, caterer or wholesaler takes orders on WhatsApp because customers like it, but someone has to read each message, look up prices, add it up and type it into the order system. Mistakes creep in during busy periods.

Reading each order message, pricing it from your own menu table and saving it straight into Supabase removes the retyping, and the instant summary lets the customer catch any misunderstanding before it's made.

What you get out of it

  • No retyping orders

    Orders go straight into your database from the message.

  • Correct prices

    Prices come from your menu table, so totals are always current.

  • Customers confirm what you understood

    The reply lists the items and total, so mistakes are caught early.

  • Orders any time

    Customers can order at midnight and it's ready for you in the morning.

How it works

What happens, step by step

  1. A customer sends an order to your WhatsApp number.

  2. AI picks out each item and quantity from the message.

  3. Prices are looked up in your Supabase menu table and the total is worked out.

  4. The order is saved in Supabase and the customer gets a summary with the total.

Before it runs live

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

What you get

RunsThe moment it happens
Take WhatsApp orders into Supabasejust nowSucceeded
WhatsApp · OrdersThanks! Your order: 12 x Sourdough loaf = 54.00 · 24 x Croissant = 43.20 · Total: 97.20

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 Supabase and WhatsApp Business 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.
take_orders_and_quote_requests_over_whatsapp_into_supabase.pyexample
from clickruntime import on_event, credentials, http, ai

SCHEMA = {"type": "object", "properties": {"items": {"type": "array", "items": {"type": "object",
          "properties": {"name": {"type": "string"}, "qty": {"type": "integer"}}}}}, "required": ["items"]}
SUPABASE_URL = "https://your-project.supabase.co"
sb = lambda: {"apikey": credentials.secret("SUPABASE_SECRET_KEY"), "Authorization": f"Bearer {credentials.secret('SUPABASE_SECRET_KEY')}"}
WA = "https://graph.facebook.com/v20.0/your-phone-number-id/messages"

def wa(to, text):
    http.post(WA, headers={"Authorization": f"Bearer {credentials.secret('WHATSAPP_TOKEN')}"},
              json={"messaging_product": "whatsapp", "to": to, "type": "text", "text": {"body": text}}).raise_for_status()
def incoming(event):
    changes = [c for e in (event.json or {}).get("entry", []) for c in e.get("changes", [])]
    return [(m["from"], m["text"]["body"]) for c in changes for m in c["value"].get("messages", []) if m.get("type") == "text"]

@on_event
def handle(event):
    menu = {m["name"].lower(): m["price"] for m in http.get(f"{SUPABASE_URL}/rest/v1/menu", headers=sb(), params={"select": "name,price"}).json()}
    for phone, text in incoming(event):
        items = ai.generate(text[:1500], system=f"Extract ordered items, matching these names where possible: {', '.join(menu)}",
                            json_schema=SCHEMA, max_output_tokens=300).json["items"]
        lines, total, missing = [], 0, []
        for i in items:
            price = menu.get(i["name"].lower())
            if price is None:
                missing.append(i["name"]); continue
            total += price * i["qty"]; lines.append(f"{i['qty']} x {i['name']} = {price * i['qty']:.2f}")
        http.post(f"{SUPABASE_URL}/rest/v1/orders", headers=sb(), json={"phone": phone, "items": items, "total": total, "message": text})
        note = f"\nNot on our menu: {', '.join(missing)}" if missing else ""
        wa(phone, "Thanks! Your order:\n" + "\n".join(lines) + f"\nTotal: {total:.2f}{note}")
    return {"ok": True}

FAQ

Common questions

What if an item isn't on the menu?
It's listed as not found in the reply, and the customer can rephrase or ask for a quote.
Can customers change an order?
They can send a new message. Each message is saved as its own order for your team to merge.
Does it take payment?
No. You can add a payment link to the reply if you use one.
What permissions does it need?
WhatsApp messaging; Supabase read+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 “Take WhatsApp orders into Supabase” from your assistant

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