Nodes2Cloud
Nodes2CloudDocs
Integrations

Supabase

Connect to your Supabase PostgreSQL databases and respond to database webhooks

Supabase Integration

The Supabase integration allows you to interact with your Supabase database directly from Nodes2Cloud. You can select, insert, update, upsert, and delete rows, as well as trigger workflows automatically when database events occur.

How to get credentials

To use the Supabase nodes (excluding the Trigger node which uses a different auth method), you need two things from your Supabase dashboard:

  1. Project URL: Found in your Supabase Dashboard under Project Settings → API. It looks like https://xyzcompany.supabase.co.
  2. API Key (Credential): Found in the same Project Settings → API page.
    • For read-only or restricted access based on Row Level Security (RLS), use the anon public key.
    • For unrestricted admin access (bypassing RLS), use the service_role key.

In Nodes2Cloud, add a new Supabase credential and paste the chosen API key.


1. Supabase: Select Rows

What the node does

This node fetches rows from a specific Supabase table using the PostgREST API.

Options / Fields

  • Credential: The Supabase API key (anon or service_role).
  • Project URL: Your project's URL (e.g., https://xyzcompany.supabase.co).
  • Table: The name of the table to select data from (this dropdown populates automatically if your credentials and URL are set).
  • Select Columns: A comma-separated list of columns to return (defaults to * for all columns). Supports PostgREST syntax (e.g., id, name, users(email)).
  • Filter: An optional PostgREST query string to filter results (e.g., id=eq.1&order=created_at.desc).
  • Return All Rows: A toggle. If disabled, it returns up to the specified Limit. If enabled, it pages through the database to return all matching rows.
  • Limit: The maximum number of rows to return (defaults to 1000, max 1000 per page).

How to set it up

  1. Select your Supabase Credential and enter your Project URL.
  2. Wait a moment for the Table dropdown to load, then select your target table.
  3. (Optional) Enter specific columns to Select or apply a Filter.
  4. The output will be an array of objects representing the rows.

2. Supabase: Insert Row(s)

What the node does

This node inserts new rows into a Supabase table.

Options / Fields

  • Credential & Project URL: Same as Select Rows.
  • Table: The target table for the new rows.
  • Data (JSON): The payload to insert. This should be an expression returning either a single JSON object (for one row) or an array of JSON objects (for multiple rows).
  • Select Columns: Which columns to return in the response after insertion (defaults to *).

How to set it up

  1. Select your Credential, Project URL, and Table.
  2. In the Data (JSON) field, map the data from your previous node or write a JSON object representing the row to insert.
  3. The output will be the newly created row(s) including any database-generated fields like id or created_at.

3. Supabase: Update Row(s)

What the node does

This node updates existing rows in a Supabase table that match a specific filter.

Options / Fields

  • Credential & Project URL: Same as Select Rows.
  • Table: The target table.
  • Data (JSON): A JSON object containing the fields to update.
  • Filter: A required PostgREST query string to specify which rows to update (e.g., id=eq.123).
  • Select Columns: Which columns to return in the response after the update.

How to set it up

  1. Set up authentication and select the Table.
  2. Provide the fields to change in the Data (JSON) field.
  3. Crucial: Provide a Filter to target the specific row(s), otherwise the update will fail or affect unintended rows.

4. Supabase: Upsert Row(s)

What the node does

This node inserts new rows, or updates them if a conflict occurs on a specified unique column (usually the primary key).

Options / Fields

  • Credential & Project URL: Same as Select Rows.
  • Table: The target table.
  • Data (JSON): An object or array of objects to upsert.
  • On Conflict: A comma-separated list of unique columns to check for conflicts (e.g., id or email).
  • Select Columns: Which columns to return after the upsert.

How to set it up

  1. Set your credentials, URL, and select the Table.
  2. Map your data to the Data (JSON) field.
  3. In On Conflict, type the name of the primary key or unique column that determines if a row already exists.

5. Supabase: Delete Row(s)

What the node does

This node deletes rows from a Supabase table based on a filter.

Options / Fields

  • Credential & Project URL: Same as Select Rows.
  • Table: The target table.
  • Filter: A required PostgREST query string to specify which rows to delete (e.g., status=eq.archived).
  • Select Columns: Which columns to return in the response (useful to see what was deleted).

How to set it up

  1. Select the Table.
  2. Provide the Filter to identify the row(s) to be deleted.
  3. The output will contain the deleted row(s).

6. Supabase: Database Event (Trigger)

What the node does

This trigger node starts a workflow automatically whenever a database event (Insert, Update, Delete) occurs in Supabase via Supabase Database Webhooks.

Options / Fields

  • Authentication: How to secure the webhook. Options include:
    • Header auth (Default and recommended for Supabase)
    • Shared secret
    • Basic auth
    • None
  • Header Name: The name of the custom header to check (defaults to x-supabase-secret).
  • Header Value: The secret value you expect to receive.
  • IP Whitelist: An optional comma-separated list of IP addresses allowed to call this webhook.

How to set it up

  1. Add the Supabase: Database Event node as the first node in your workflow.
  2. Select Header auth, keep x-supabase-secret, and generate a secure random string for the Header Value.
  3. Copy the Webhook URL from the Nodes2Cloud trigger node.
  4. Go to your Supabase Dashboard → Database → Webhooks.
  5. Create a new Webhook, paste the Webhook URL, select the events you want to listen to (Insert/Update/Delete).
  6. Under HTTP Headers, add a new header with name x-supabase-secret and the value you generated.
  7. Save the webhook in Supabase and activate your Nodes2Cloud workflow.

Common Troubleshooting

  • Table dropdown isn't loading: Ensure your Project URL is correct (no trailing slash) and your API Key is valid. Also verify that the key has permissions to view the database schema.
  • Rows aren't returning (Empty Array): If you are using the anon key, ensure your Row Level Security (RLS) policies allow the read operation. If you meant to bypass RLS, use the service_role key.
  • Update/Delete fails: You must provide a Filter for Updates and Deletes (e.g. id=eq.5). Supabase prevents accidental mass updates without a filter.
  • Trigger isn't firing: Check the Supabase Dashboard under Database → Webhooks → Logs to see if Supabase is successfully sending the payload or if it's being rejected (e.g., due to an auth mismatch or IP whitelist).

On this page