Integrations / Supabase
Supabase
Supabase Management API: projects, organizations, SQL queries on a project's database, and read-only Edge Function and secret listings.
6 actions
OAuth 2
5 read1 write
Calls api.supabase.com
Connect
const conn = await setu.connections.initiate({ userId: "user_1", toolkit: "supabase" });
console.log(conn.connectUrl); // show this to your user
await conn.waitUntilActive();Permissions requested
| Scope | Why it is requested |
|---|---|
projects:read | See your Supabase projects |
organizations:read | See your Supabase organizations |
database:write | Run SQL queries on project databases |
edge_functions:read | See the Edge Functions of a project |
secrets:read | See the names of a project's secrets |
Actions
Get projectreadsupabase.get_projectGet one Supabase project by its ref: name, region, status, organization and database host.
Needs scope: projects:read
| Input | Type | Description | |
|---|---|---|---|
ref | string | Required | Project ref (the 20-character project identifier) |
await setu.execute({
userId: "user_1",
action: "supabase.get_project",
input: {
"ref": "<ref>"
},
});List Edge Functionsreadsupabase.list_functionsList the Edge Functions deployed on a project with slug, status and version.
Needs scope: edge_functions:read
| Input | Type | Description | |
|---|---|---|---|
ref | string | Required | Project ref |
await setu.execute({
userId: "user_1",
action: "supabase.list_functions",
input: {
"ref": "<ref>"
},
});List organizationsreadsupabase.list_organizationsList the Supabase organizations the connected account belongs to.
Needs scope: organizations:read
No input.
await setu.execute({
userId: "user_1",
action: "supabase.list_organizations",
input: {},
});List projectsreadsupabase.list_projectsList all Supabase projects the connected account can access, with ref, name, region and status.
Needs scope: projects:read
No input.
await setu.execute({
userId: "user_1",
action: "supabase.list_projects",
input: {},
});List secret namesreadsupabase.list_secret_namesList the names of a project's Edge Function secrets. Only names are returned, never values.
Needs scope: secrets:read
| Input | Type | Description | |
|---|---|---|---|
ref | string | Required | Project ref |
await setu.execute({
userId: "user_1",
action: "supabase.list_secret_names",
input: {
"ref": "<ref>"
},
});Run SQL querywritesupabase.run_sqlRun a SQL query on a project's Postgres database through the Management API. Can change data unless read_only is true. The endpoint is documented as experimental.
Needs scope: database:write
| Input | Type | Description | |
|---|---|---|---|
ref | string | Required | Project ref |
query | string | Required | SQL to run |
parameters | array of any | Optional | Positional parameters for $1, $2... placeholders |
read_only | boolean | Optional | Run the query in a read-only transaction |
await setu.execute({
userId: "user_1",
action: "supabase.run_sql",
input: {
"ref": "<ref>",
"query": "<query>"
},
});