Call Postgres Function
supabase.rpc
ActionDatabases & warehousesconnection required
Calls the Supabase API with the connection's credentials.
Call a Postgres function exposed through PostgREST (POST /rest/v1/rpc/name) and return whatever it produces — a scalar, a row, or a set of rows.
Connection
- Required
- Yes — the node will not save without one
- Auth type
- API key
- Providers
- Supabase
- Secret shape
- the project API key, or {"api_key": "…"} / {"service_role_key": "…"}
- Config it needs
- base_url, schema
- Resolved by
- config.connection_id, else node.connection_id
Configuration
3 fields, 1 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
function Name of the Postgres function, as exposed on /rest/v1/rpc/. | string | Yes | — | — | search_orders |
args Arguments as an object of parameter name to value. Names must match the function's declared parameters exactly. Leave empty for none. | object | No | — | — | — |
schema Postgres schema for this call (sent as Accept-Profile / Content-Profile). Overrides the connection's schema; leave blank for the connection default. | string | No | — | — | — |
Example configuration
Every value below is the contract’s own example or default — nothing invented.
{
"function": "search_orders"
}Output
One shape.
result
| Field | Type | Example |
|---|---|---|
function The function that was called. | string | — |
result Whatever the function returned, unchanged. | any | — |
items The rows, when the function returned a set. | array | — |
count How many rows were returned (0 for a scalar). | number | — |
{
"count": 0,
"function": "",
"items": [],
"result": null
}Notes
- A service_role (or sb_secret_…) key has BYPASSRLS and skips every Row Level Security policy on the project; an anon/publishable key is filtered by them.
See Call Postgres Function run in a workflow.
In a technical demo we add the Supabase connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.