Supabase Grid Integration
The Supabase Grid integration allows users to view, search, inline-edit, create, and delete rows from any Supabase PostgreSQL database table directly inside AppColab Grid without complex ETL or data pipelines.

What’s Deployed
| Component | Name | Purpose |
|---|---|---|
| Named Credential | Supabase |
Connects to your Supabase Project REST endpoint via Supabase External Credential |
| External Credential | Supabase |
Custom authentication with apikey and Authorization: Bearer <anon_key> headers |
| Apex Client | SupabaseClient.cls |
PostgREST client supporting listRecords, getRecord, createRecord, updateRecord, deleteRecord, getTableSchema |
| Apex Data Provider | SupabaseGridDataProvider.cls |
Implements appcg.GridDataProviderV1 and appcg.GridDataMutationProviderV1 with dynamic schema describe and full CRUD |
| Permission Set | Integration_Admin |
Grants access to Supabase → ApiKey external credential principal |
One-Time Manual Setup
1. Get Your Supabase Project URL & Anon Key
- Sign in to your Supabase Dashboard and select your project.
- Click Project Settings (⚙️) in the sidebar → navigate to API Keys.
- Under the Project API keys section:
- Copy the Project URL (e.g.
https://xyzcompany.supabase.co). - Copy the
anon(public) key (starts witheyJhbGci...).
- Copy the Project URL (e.g.

2. Configure Credentials in Salesforce Setup
2.1 Create the External Credential
- Go to Setup (gear icon ⚙️ → Setup).
- In the Quick Find box, enter Named Credentials and select Named Credentials.
- Click the External Credentials tab → click New:
- Label:
Supabase - Name:
Supabase - Authentication Protocol:
Custom - Click Save.
- Label:
- In the Principals section, click New:
- Parameter Name:
ApiKey - Sequence:
1 - Click Save.
- Parameter Name:
- In the Custom Headers section, click New:
- Name:
apikey - Value: Paste your
anonkey (eyJhbGci...) - Sequence Number:
1 - Click Save.
- Name:
- Click New again under Custom Headers:
- Name:
Authorization - Value:
Bearerfollowed by the sameanonkey (e.g.Bearer eyJhbGci...) - Sequence Number:
2 - Click Save.
- Name:

2.2 Create the Named Credential
- Click the Named Credentials tab (next to External Credentials) → click New:
- Label:
Supabase - Name:
Supabase - URL: Paste your Supabase Project URL (e.g.
https://xyzcompany.supabase.co) - External Credential: Select
Supabase - Generate Authorization Header: Leave Unchecked (handled by custom Authorization header)
- Allow Formulas in HTTP Header: Checked
- Label:
- Click Save.

3. Assign Permission Set Access
- In Salesforce Setup, enter Permission Sets in Quick Find.
- Select Integration Admin (or
Appcolab Grid Admin). - Click External Credential Principal Access → click Edit.
- Add
Supabase - ApiKeyto Enabled External Credential Principals. - Click Save and verify the permission set is assigned to your Salesforce users.
Creating a Supabase Grid Definition
- In Salesforce, open AppColab Grid app → Grid Definitions tab → click New Grid Definition.
- Fill in:
- Grid Settings Name:
Supabase_Contacts_Grid - Grid Label:
Supabase Contacts - Is Active?: Checked
- Data Provider Class:
SupabaseGridDataProvider - Data Provider Configuration:
{ "table": "contacts" }
- Grid Settings Name:
- Click Save & Next → proceed to Preview.
- The Grid automatically discovers all database columns, maps PostgreSQL data types to Grid types, and displays live database records!

Supported Grid Features
| Feature | Details |
|---|---|
| Dynamic Schema Discovery | Queries OpenAPI schema definition to discover column names and types automatically |
| Inline Editing | Modifying cell values sends instant PATCH requests to Supabase PostgREST |
| Row Insertion | Click + Add Row to create new PostgreSQL records directly from Salesforce |
| Row Deletion | Delete database records with automatic UI removal |
| Server-Side Pagination | Supports limit and offset for high-performance navigation through tens of thousands of database rows |
Troubleshooting
401 Unauthorized / Invalid API Key: Ensure bothapikeyandAuthorizationheaders are present in the Supabase External Credential.PGRST200 / relation does not exist: Check that the"table"name in your Data Provider Configuration JSON matches the exact table name in Supabase (e.g.,contacts).- RLS Blocked: If you have Row Level Security enabled in Supabase, make sure your table policies permit select/insert/update operations for the
anonrole, or disable RLS for that specific table.