contacts
table in your Supabase database. Or âCustomersâ in Stripe become a customers
table in your Supabase database. You can then integrate this data into your application using Supabaseâs tools.
This guide explains how to setup a sync between Sequin and a Supabase Postgres database.
Connect Sequin to Supabase
If you havenât already, setup your Supabase organization and project. Once you have a project up and running, youâll be able to connect Sequin to your Supabase projectâs database. Step 1: In the Sequin console, start a new sync or go to the Settings tab of an existing sync. In the Destination section of your sync configuration, click New database connection:
sequin
user in your Supabase database. Run the code snippets in the SQL Editor in your Supabase dashboard to create the user:
- Create a Postgres user for Sequin:
- Grant permissions:
- Create a Sequin read role: Later, youâll grant this read role to other Supabase database users so they can access and work with the Sequin tables.
sequin
user to connect Sequin to your Supabase database.
First, get the connection credentials for your Supabase database. In the Supabase dashboard, go to the settings page and open up your Database settings. In the Connection info section, youâll find the credentials for your database.
Now, enter the database connection details in Sequin.
Remeber to use the
sequin
user and password you created in the previous step đ- Host: The host for your Supabse database.
- Port: The port for your Supabase database (usually
5432
). - Database: The name of your Supabase database (usually
postgres
). - Schema: The name of the schema you want to sync to. Weâd recommend naming it after your source (i.e.
stripe
orsalesforce
) - Username: The
sequin
user you created. - Password: The password for the
sequin
user you created. - SSL: Set this to
true
.
Grant Permissions
With your Supabse database connected, Sequin will start syncing your data to a new schema in the database. You might not see your new synced schema appear in the Supabse dashboard. Thatâs because Supabase doesnât automatically grant all userâs in the database permissions to work with new schemas. To ensure other database users can access the synced schema Sequin manages, youâll need to run a couple permission grants. In the Supabase dashboard, go to the SQL Editor and run the following permission grants:Sequin Proxy
Sequin uses a Postgres Proxy to interface with your Sequin-synced tables. The Proxy lets Sequin capture inserts, updates, and deletes you make in your database and commit them to the API. When using Sequin with Supabase, we recommend that anytime you read or write to your Sequin synced schemas, you connect to the Supabase database through the proxy. You can connect to the proxy from any Postres client or ORM. But note that you should not write to your synced tables using the Supabse clients - as this will bypass the Sequin proxy. To connect to the Sequin Proxy, configure your postgres client, library or ORM to use thehost
, port
, database
, user
, and password
provided to you on the Connection instructions tab of your Sequin sync.

JOIN
data), youâll need to grant the sequin
user permission to access these tables. To do so, run the following grants in the Supabase SQL editor:
You can specify the exacact permissions provided to the
sequin
user. The above grants are just an example.Reading
You read from your Sequin synced tables just like you would any other table in your Supabase database. For example, if you are syncing your Stripe data to Supabase, you can find a customerâs subscription status with the following query:user_id
as a metadata key in your stripe.customer
table so you can easily join between the two. Then, you can use the user_id
to return the subscription status with a join:
Writing
Mutations work just as youâd expect too. You can insert, update, and delete data from your Sequin synced tables just like you would any other table in your Supabase database. For example, you can update a customerâs email address in yourstripe.customer
table with the following query:
Reminder - to make mutations to your synced tables, you need to connect to your Supabase database using the Sequin Postgres Proxy.