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). Fill in the fields the provider needs (listed below). They are stored encrypted in the vault.
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) |
- In the editor: Backend panel, Integrations tab, then Connect. This connects it for the project.
- For every project in a workspace: Workspace settings, Integrations.
- Owners and admins choose which integrations members may connect in the admin panel (Integrations tab), and can attach their own OAuth app there.
Call it from a workflow
Pass the action name and its input. The call resolves with { success, output, error? }; a missing connection resolves with success false and the reason. See ctx.integrations.invoke and ctx.integrations.call.
// .workflow.js (native ctx)
export async function run(ctx) {
const res = await ctx.integrations.invoke("supabase", "execute_sql", {
"sql": "<sql query>"
});
if (!res.success) throw new Error(res.error);
ctx.log.info("Supabase answered", { output: res.output });
}// defineWorkflow module (@app/sdk ctx)
import { defineWorkflow } from "@app/sdk";
export default defineWorkflow({
id: "supabase-execute-sql",
name: "Supabase: Execute SQL",
description: "Calls Supabase when a row is created.",
trigger: { type: "entity_event", entity: "tickets", event: "created" },
async run(ctx, event) {
const res = await ctx.integrations.call("supabase", {
"action": "execute_sql",
"sql": "<sql query>"
}) as { success: boolean; error?: string };
if (!res.success) throw new Error(res.error);
},
});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_sqlin catalogbuilt in
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_rowin catalog
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_callin catalog
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_rowsin catalog
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_rowsin catalog
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_rowin catalog
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-filein catalog
Upload File. Upload a file to Supabase Storage
| Input | Type | Description |
|---|---|---|
filePathrequired | text | File path |
bucketrequired | text | Bucket |
filerequired | file | Base64 or URL |
upsert_rowin catalog
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 |
Env keys
When connected, these credential fields are exposed to the project's runtime as environment variables (Postgres DB + auth + storage (Supabase).). Server keys never reach the browser.
| Variable | Field | Where |
|---|---|---|
SUPABASE_URL | url | server only |
SUPABASE_SERVICE_ROLE_KEY | serviceRoleKey | server only |
VITE_SUPABASE_URL | url | browser (VITE_) |
VITE_SUPABASE_ANON_KEY | anonKey | browser (VITE_) |
Details
- Id
supabase- Category
- Data and storage
- Tags
- database, postgres, backend-as-a-service, open-source
- Package
@activepieces/piece-supabase@0.1.4- Tier
- Built in