Supabase Integration
Skene connects to your Supabase project via OAuth and deploys growth automation triggers directly into your Postgres database. Events fire inside your database and flow back to Skene for intelligent dispatch — no data pipeline, no middleware, no ETL.
How it works
- Connect — Link your Supabase project via OAuth from the workspace Integrations page.
- Define — Describe a growth feature in plain English or pick a premade template. Skene compiles it into a state machine with conditions, effects, and lifecycle stages.
- Deploy — One click pushes database triggers into your Supabase project. Trigger reconciliation keeps your database in sync.
- Run — Row changes fire triggers inside Postgres. Events are sent to Skene via
pg_netwebhook, where the runtime evaluates conditions, executes actions, and logs every decision.
Prerequisites
- A Supabase project
- The
pg_netextension enabled in your Supabase project (used by deployed triggers to send webhooks) - A Skene workspace
Connect your Supabase project
1. Open Integrations
In the workspace sidebar, open Integrations (under Manage — next to Logs and API Keys). You can also go directly to /workspace/<your-slug>/integrations.
2. Choose access mode
Skene offers two OAuth access levels:
| Mode | What it allows | When to use |
|---|---|---|
| Read-only | Schema introspection and analysis | Exploring your schema before committing to deployment |
| Read-write | Schema introspection + trigger deployment | Deploying and managing growth features |
Click Connect Supabase and choose your access mode. You will be redirected to Supabase to authorize.
3. Select a project
After authorizing, you will be redirected back to Skene. If your Supabase organization has multiple projects, select the one you want to link from the dropdown.
4. Verify connection
Once linked, the Integrations page shows your connection status:
- Project ref and name
- Access mode (read-only or read-write)
- Schema status — whether the
skene_growthschema and required tables are present - Extension status — whether
pg_netis enabled
Schema setup
When you deploy your first feature, Skene creates a skene_growth schema in your Supabase project with:
| Object | Purpose |
|---|---|
skene_growth.event_log | Captures trigger payloads before they are sent to Skene |
skene_growth.failed_events | Stores events that failed to dispatch |
skene_growth.enrichment_map | JSON-based data joins for adding context to events |
skene_growth.enrich() | Function that resolves enrichment maps at trigger time |
You can also apply the schema migration manually from the Integrations page before deploying.
Deploying triggers
From the dashboard
- Create or select a growth action on the Actions page.
- Click Compile — Skene introspects your schema and generates a state machine.
- Click Deploy — trigger SQL is pushed to your Supabase project via the OAuth token.
From the CLI
# Analyze your codebase and generate growth loops
uvx skene analyze .
uvx skene plan
uvx skene build
# Push to Skene Cloud (which deploys triggers)
uvx skene push
What gets deployed
Each feature creates a Postgres trigger on the target table (e.g., INSERT on auth.users). The trigger:
- Captures the row data and any enrichment context.
- Calls
net.http_post()(frompg_net) to send the event to your Skene workspace endpoint. - Authenticates with a per-workspace secret (
skene_proxy_secret), encrypted at rest with AES-256-GCM.
Trigger reconciliation
Skene automatically reconciles triggers on each compile/deploy cycle:
- Adds triggers for new or updated features
- Removes orphan triggers no longer referenced by any feature
- Deduplicates — multiple features on the same table and operation share one trigger
Event flow
Your Supabase database
└─ Row change fires trigger
└─ pg_net POST → www.skene.ai/api/v1/cloud/ingest/db-trigger
└─ Skene runtime
├─ Log raw event
├─ Match to features (conditions, cooldowns, state checks)
├─ Execute actions (email, webhook, state transition)
└─ Update journey state and logs
Events are authenticated via the x-skene-secret header, matched against the workspace's encrypted proxy secret.
Premade templates
Three templates are available to get started quickly:
| Template | Trigger | Action |
|---|---|---|
| Heartbeat | New record inserted | Fire analytics event |
| Welcome Email Drip | New user signup (INSERT on users table) | Send welcome email via Resend |
| Inactivity Re-engagement | Scheduled (7+ days inactive) | Send re-engagement email |
Monitoring
Logs
The Logs page in your workspace shows:
- Raw ingest records with timestamps
- Which features matched each event and why
- Action dispatch results (success, failure, skipped)
- Semantic matcher audit trails for edge cases
Trigger status
The Actions page shows each loop’s deploy status, last deployed timestamp, and linked trigger ID.
Security
- OAuth tokens are encrypted with AES-256-GCM and stored in Skene's database, never in browser storage.
- Proxy secrets authenticate ingest webhooks — each workspace has a unique secret.
- No customer data stored beyond event metadata needed for dispatch decisions.
- Read-only mode available for schema analysis without deployment risk.
Disconnecting
To unlink your Supabase project, open Integrations in the workspace sidebar and click Disconnect. This removes the OAuth tokens from Skene but does not remove deployed triggers from your database. To clean up triggers, drop the skene_growth schema:
DROP SCHEMA IF EXISTS skene_growth CASCADE;
Upgrading access mode
To switch from read-only to read-write (or vice versa), disconnect and reconnect with the desired access mode.
Troubleshooting
"pg_net extension not enabled"
Enable it from the Supabase dashboard: Database → Extensions → Search for pg_net → Enable.
Triggers not firing
- Check that the feature is in Active status (not Draft or Paused).
- Verify the trigger exists in your database:
SELECT * FROM information_schema.triggers WHERE trigger_schema = 'skene_growth'; - Check the Logs page for ingest errors.
OAuth token expired
Skene automatically refreshes OAuth tokens. If you see auth errors, disconnect and reconnect from the Integrations page.
Next steps
- Push — Deploy growth loops from the CLI
- MCP Server — Use skene with AI assistants
- Configuration — Config files and environment variables
