Skip to content

Supabase - Database Call

Overview

Makes a CRUD call to the Supabase REST API.

Hint - Place this block inside a Set Data Structure block to handle the response.


BlockCompatible SlotsDescription
Supabase — Create UserData StructureAllows you to create a user account on your Supabase instance via Comnoco
Supabase — LoginData StructureAllows you to authenticate a user with your Supabase instance via Comnoco
Returns
Data Structure

Parameters

ParameterParameterValid BlocksRequired
Query Builder Structure The parameters to send as part of the query URL (eg: id=eq.1) defined as a Data Structure Data Structure Block Group No
Base URL Your Supabase instance's base URL, eg: https://yourprojecturl.supabase.co. We recommend you set this as an environment variable. Text Process Block Group No
API Key Your Supabase API Key. This can be your Anon or Service Role key. If you have RLS enabled, and want the current user to define access permissions use the Anon key. To give comnoco full access as a backend process, use the Service Role key. We recommend you set this as a system secret. Secret Block Group No
User Token The Access Token (JWT) of a logged-in Supabase user, if provided, this will be used to determine the user's permissions (data returned) as set by RLS. Will remove the `Bearer` prefix from an auth header if necessary. Semi-Secret Block Group No
Table Name The name of the table to call Text Process Block Group Yes
Call Method The type of call to make Text Process Block Group No
Record Data The records to insert or update depending on the Call Method Supabase Payload Block Group No
Bulk Insert Mode To bulk insert CSV simply choose CSV here, map CSV (in a text block) to the body and include the names of the columns as the first row Text Process Block Group No
Show Advanced Options If on, shows the additional option of defining or appending query parameters manually (define your own postgREST query string). Boolean Block Group No
Options These control behaviour and set PostgREST Prefer Header values Text Block Group No
Query Parameters Add your own parameters to send as part of the query URL (eg: id=eq.1). If you have defined a Query Builder output this field it will be added to the end of the URL. Supabase Payload Block Group No
Catch Errors to Data Structure Catch errors from the Supabase call as a Data Structure and return them as the response value to enable manual error handling. If turned on errors will not get caught in a Try-Catch block. Boolean Block Group No
Project Connection Config A Supabase connection configuration that was setup in the Databases panel Text Process Block Group No
Project Schema Switch schema on your Supabase project, defaults to 'public'. See https://supabase.com/docs/guides/api/using-custom-schemas for a guide on custom schemas. Text Process Block Group No