Supabase

Create, update, delete, search rows, upload files, and make custom API calls to Supabase.

Data and storageCredentials form8 actionsAll integrations

On this page
  1. Connect
  2. Call it from a workflow
  3. Actions (8)
  4. execute_sql
  5. create_row
  6. custom_api_call
  7. delete_rows
  8. search_rows
  9. update_row
  10. upload-file
  11. upsert_row
  12. Details

Connect

Auth type: Credentials form (custom_auth). Pass the fields the provider needs (listed below) as the connection's credentials. They are sealed at rest.

An easy-connect button is offered too: Sign in with Supabase.

FieldTypeDescription
urlrequiredtextYour Supabase project URL (e.g., https://your-project-ref.supabase.co)
apiKeyrequiredsecretService Role Key (for full access) or Anonymous Key (for read-only)
  • From your agent: integrations {action: "connect", piece, credentials, env} stores the credentials for dev, prod or all. Answers name the fields, never the values.
  • Or set the integration's project secrets with the secrets tool (SLACK_BOT_TOKEN, DISCORD_WEBHOOK_URL, TELEGRAM_BOT_TOKEN, TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN …): a call uses the connection, else those secrets. integrations {action: "catalog", piece} lists which ones work.
  • Try one action now with integrations {action: "call", piece, piece_action, input}. It really sends.

Call it from a workflow

step.ctx.integrations.invoke("supabase", action, input) resolves with the provider's answer and rejects when Supabase isn't connected or refuses. Wrap it in step.run so a retry sends once. See step.ctx. Its actions run through the integration runner, which the server's operator turns on: integrations {action: "catalog", piece: "supabase"} says whether yours can call it.

Workflow
// workflows/notify.ts: call Supabase when a booking is confirmed
import { on } from "@appbricx/workflows";

export const tellSupabase = on.transition("booking", "status", "confirmed", async (_event, step) => {
  // Recorded once: a retry doesn't send it twice. Rejects when Supabase isn't connected.
  const output = await step.run("Supabase", () =>
    step.ctx.integrations.invoke("supabase", "execute_sql", {
      "sql": "<sql query>"
    }),
  );
  step.ctx.log("Supabase answered", output);
});
Try it from your agent
{
  "name": "integrations",
  "arguments": {
    "project_id": "<project-id>",
    "action": "call",
    "piece": "supabase",
    "piece_action": "execute_sql",
    "input": {
      "sql": "<sql query>"
    },
    "env": "dev"
  }
}
From another backend (connector proxy)
curl -X POST "$APP_ORIGIN/__appbricx/connector-proxy/supabase/execute_sql" \
  -H "Authorization: Bearer $APP_KEY" \
  -H "content-type: application/json" \
  -d '{"props":{"sql":"<sql query>"}}'

Actions

execute_sql

Execute SQL. Execute raw SQL against the Supabase database (CREATE TABLE, ALTER, INSERT, SELECT, etc.). Uses the Supabase Management API via OAuth when available, or falls back to the PostgREST rpc endpoint.

InputTypeDescription
sqlrequiredtextThe SQL statement to execute

create_row

Create Row. Create a new row in a table

InputTypeDescription
table_namerequiredid (picked from your account)Select a table from your database
row_datarequiredobject (depends on other props)Enter the data for each column
return_rowoptionalbooleanWhether to return the created row

custom_api_call

Custom API Call. Make a custom API call to a specific endpoint

InputTypeDescription
urlrequiredobject (depends on other props)url
methodrequiredone of "GET" | "POST" | "PATCH" | "PUT" | "DELETE" | "HEAD"Method
headersrequiredobjectAuthorization headers are injected automatically from your connection.
queryParamsrequiredobjectQuery Parameters
body_typeoptionalone of "none" | "json" | "form_data" | "raw"Body Type
bodyoptionalobject (depends on other props)Body
response_is_binaryoptionalbooleanEnable for files like PDFs, images, etc.
failsafeoptionalbooleanNo Error on Failure
timeoutoptionalnumberTimeout (in seconds)
followRedirectsoptionalbooleanFollow redirects

delete_rows

Delete Rows. Remove rows matching filter criteria from a table

InputTypeDescription
table_namerequiredid (picked from your account)Select a table from your database
filter_typerequiredone of "eq" | "neq" | "in" | "gt" | "gte" | "lt" | "lte" | "is_null" | "is_not_null" | "like" | "ilike"How to filter rows for deletion
filter_columnrequiredid (picked from your account)Select the column to filter on
filter_valueoptionaltextThe value to match against (not used for null checks)
filter_valuesoptionalarrayList of values for "in" filter type
count_deletedoptionalbooleanWhether to count the number of deleted rows
return_deletedoptionalbooleanWhether to return the deleted rows data

search_rows

Search Rows. Search for rows in a table with filters and pagination

InputTypeDescription
table_namerequiredid (picked from your account)Select a table from your database
columnsoptionaltextColumns to return (comma-separated). Leave empty to return all columns.
filtersoptionalarrayList of filters to apply
pageoptionalnumberPage number for pagination (starts from 1)
pageSizeoptionalnumberNumber of records per page (max 1000)
countOptionoptionalone of "exact" | "planned" | "estimated"Algorithm to use for counting rows

update_row

Update Row. Update rows in a table based on filter criteria

InputTypeDescription
table_namerequiredid (picked from your account)Select a table from your database
filter_typerequiredone of "eq" | "in" | "gt"How to identify rows to update
filter_columnrequiredid (picked from your account)Select the column to filter on
filter_valueoptionaltextThe value to match against (not used for "in list" filter)
filter_valuesoptionalarrayList of values for "in list" filter type
update_datarequiredobject (depends on other props)Select which columns to update (auto-generated fields excluded)
count_updatedoptionalbooleanWhether to count the number of updated rows
return_updatedoptionalbooleanWhether to return the updated rows data

upload-file

Upload File. Upload a file to Supabase Storage

InputTypeDescription
filePathrequiredtextFile path
bucketrequiredtextBucket
filerequiredfileBase64 or URL

upsert_row

Upsert Row. Insert or update a row in a table

InputTypeDescription
table_namerequiredid (picked from your account)Select a table from your database
on_conflictrequiredid (picked from your account)Select the unique column to determine duplicates (required for upsert to work)
row_datarequiredobject (depends on other props)Enter data for the row (conflict detection handled separately)
count_upsertedoptionalbooleanWhether to count the number of upserted rows
return_upsertedoptionalbooleanWhether to return the upserted rows data

Details

Id
supabase
Category
Data and storage
Tags
database, postgres, backend-as-a-service, open-source
Package
@activepieces/piece-supabase@0.1.4
Runs
Through the integration runner