Supabase
Create, update, delete, search rows, upload files, and make custom API calls to Supabase.
On this page
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.
| Field | Type | Description |
|---|---|---|
urlrequired | text | Your Supabase project URL (e.g., https://your-project-ref.supabase.co) |
apiKeyrequired | secret | Service 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.
// 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);
});{
"name": "integrations",
"arguments": {
"project_id": "<project-id>",
"action": "call",
"piece": "supabase",
"piece_action": "execute_sql",
"input": {
"sql": "<sql query>"
},
"env": "dev"
}
}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.
| Input | Type | Description |
|---|---|---|
sqlrequired | text | The SQL statement to execute |
create_row
Create Row. Create a new row in a table
| Input | Type | Description |
|---|---|---|
table_namerequired | id (picked from your account) | Select a table from your database |
row_datarequired | object (depends on other props) | Enter the data for each column |
return_rowoptional | boolean | Whether to return the created row |
custom_api_call
Custom API Call. Make a custom API call to a specific endpoint
| Input | Type | Description |
|---|---|---|
urlrequired | object (depends on other props) | url |
methodrequired | one of "GET" | "POST" | "PATCH" | "PUT" | "DELETE" | "HEAD" | Method |
headersrequired | object | Authorization headers are injected automatically from your connection. |
queryParamsrequired | object | Query Parameters |
body_typeoptional | one of "none" | "json" | "form_data" | "raw" | Body Type |
bodyoptional | object (depends on other props) | Body |
response_is_binaryoptional | boolean | Enable for files like PDFs, images, etc. |
failsafeoptional | boolean | No Error on Failure |
timeoutoptional | number | Timeout (in seconds) |
followRedirectsoptional | boolean | Follow redirects |
delete_rows
Delete Rows. Remove rows matching filter criteria from a table
| Input | Type | Description |
|---|---|---|
table_namerequired | id (picked from your account) | Select a table from your database |
filter_typerequired | one of "eq" | "neq" | "in" | "gt" | "gte" | "lt" | "lte" | "is_null" | "is_not_null" | "like" | "ilike" | How to filter rows for deletion |
filter_columnrequired | id (picked from your account) | Select the column to filter on |
filter_valueoptional | text | The value to match against (not used for null checks) |
filter_valuesoptional | array | List of values for "in" filter type |
count_deletedoptional | boolean | Whether to count the number of deleted rows |
return_deletedoptional | boolean | Whether to return the deleted rows data |
search_rows
Search Rows. Search for rows in a table with filters and pagination
| Input | Type | Description |
|---|---|---|
table_namerequired | id (picked from your account) | Select a table from your database |
columnsoptional | text | Columns to return (comma-separated). Leave empty to return all columns. |
filtersoptional | array | List of filters to apply |
pageoptional | number | Page number for pagination (starts from 1) |
pageSizeoptional | number | Number of records per page (max 1000) |
countOptionoptional | one of "exact" | "planned" | "estimated" | Algorithm to use for counting rows |
update_row
Update Row. Update rows in a table based on filter criteria
| Input | Type | Description |
|---|---|---|
table_namerequired | id (picked from your account) | Select a table from your database |
filter_typerequired | one of "eq" | "in" | "gt" | How to identify rows to update |
filter_columnrequired | id (picked from your account) | Select the column to filter on |
filter_valueoptional | text | The value to match against (not used for "in list" filter) |
filter_valuesoptional | array | List of values for "in list" filter type |
update_datarequired | object (depends on other props) | Select which columns to update (auto-generated fields excluded) |
count_updatedoptional | boolean | Whether to count the number of updated rows |
return_updatedoptional | boolean | Whether to return the updated rows data |
upload-file
Upload File. Upload a file to Supabase Storage
| Input | Type | Description |
|---|---|---|
filePathrequired | text | File path |
bucketrequired | text | Bucket |
filerequired | file | Base64 or URL |
upsert_row
Upsert Row. Insert or update a row in a table
| Input | Type | Description |
|---|---|---|
table_namerequired | id (picked from your account) | Select a table from your database |
on_conflictrequired | id (picked from your account) | Select the unique column to determine duplicates (required for upsert to work) |
row_datarequired | object (depends on other props) | Enter data for the row (conflict detection handled separately) |
count_upsertedoptional | boolean | Whether to count the number of upserted rows |
return_upsertedoptional | boolean | Whether 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