Supabase

Connect to Supabase for database queries, authentication, and storage from your Spala flows.

Supabase

The Supabase addon connects your Spala flows to a Supabase project. Query your Supabase database, manage authentication, and interact with Supabase Storage — extending your Spala backend with Supabase's hosted services.

Installation

1. Enable the Supabase addon from the Addons panel
2. Enter your Supabase project URL and API key

Configuration

API.' },

Use the service_role key, not the anon key. The service role key bypasses Row Level Security and should only be used on the server side. Never expose it to clients.

Available Steps

Supabase Query

Queries a Supabase table using the PostgREST API.

Supabase Insert

Inserts one or more rows into a Supabase table.

Supabase Update

Updates rows in a Supabase table that match the given filters.

Supabase Delete

Deletes rows from a Supabase table that match the given filters.

Example: Query with Relationships

// GET /api/posts

// Step 1: Supabase Query
// table: 'posts'
// select: '*, author:users(name, avatar_url), comments(id, text, created_at)'
// filters: { published: true }
// order: 'created_at.desc'
// limit: 20
// Output → vars.posts
// Step 2: Response
// { posts: vars.posts }

Example: Upsert Pattern

// POST /api/preferences

// Step 1: Supabase Insert
// table: 'user_preferences'
// data: { user_id: vars.auth.userId, theme: input.theme, language: input.language }
// upsert: true (on conflict, update existing row)
// Output → vars.preference
// Step 2: Response
// { preference: vars.preference }

The Supabase addon uses Supabase's REST API (PostgREST), which supports powerful query features like nested selects, full-text search, and JSON column queries. You can also use Spala's built-in Database Query step if your Supabase database is configured as Spala's primary database.

Your Supabase project URL (e.g., https://abcdefg.supabase.co). Found in Settings > API.
The service_role key for server-side access. Found in Settings > API > Project API keys.
The table name to query.
Columns to select (default: '*'). Supports relationships (e.g., '*, posts(*)').
Filter conditions as an object (e.g., { status: "active", age: "gte.18" }).
Maximum number of rows to return.
Column to sort by (e.g., 'created_at.desc').
The table name.
A row object or array of row objects to insert.
The table name.
An object with the columns and new values to set.
Filter conditions to select which rows to update.
The table name.
Filter conditions to select which rows to delete.
Addons Overview
/addons
Browse available addons
Installing Addons
/addons/installing
Enable and configure addons in your project