Developer tools

Supabase

Text someone when a row changes, from a database webhook or an Edge Function.

What you can do

  • Point a Database Webhook at a Text Hook to text someone when a row is inserted.
  • Send texts from an Edge Function with BlueBot’s TypeScript SDK.
  • Save each reply to a table from an Edge Function that receives BlueBot’s webhooks.

How it connects

  • Recommended

    API

    Your own code calls BlueBot’s REST API and listens to its signed webhooks.

    API in the docs
  • Text Hook

    A Text Hook is a BlueBot address the app posts its own webhook to. You map its fields to a recipient and a template, and each post becomes a text.

    Text Hook in the docs

Recipes

Three recipes to start from.

Set one up as written, or change it to fit how you work. The docs have the same recipes step by step.
01With a Text Hook

Text a customer when a booking row is added

Starts when

A Supabase Database Webhook on inserts into a table

  1. Make a Text Hook in BlueBot and copy its address.
  2. Add a Database Webhook in Supabase that posts inserts on your bookings table to that address.
  3. Insert a test row, then map record.phone and record.first_name from the payload BlueBot kept.
  4. Write the template, and each new row becomes a text.

The text it sends

Hi {{first_name}}, your booking is confirmed. Reply here if you need to change it.

From your own number

02With the API

Send from an Edge Function

Starts when

Your Edge Function runs

  1. Store your API key with supabase secrets set.
  2. Import bluebot from npm in the function and send with to and text.
  3. Pass an Idempotency-Key made from the row’s ID, so a retried function never sends twice.

The text it sends

Hi {{first_name}}, your order is confirmed. We’ll text you here when it’s on its way.

From your own number

03With the API

Save replies to a table

Starts when

A text comes in (BlueBot’s message.received webhook)

  1. Deploy an Edge Function and add its URL in BlueBot as a webhook for message.received.
  2. Check the Standard Webhooks signature with your signing secret before anything else.
  3. Insert the sender, the words and the time into a replies table.

Try BlueBot free for 7 days.

You need a card to start the trial. After 7 days it’s $17.99 a month plus any tax, and you can cancel from your billing page at any time.