> For the complete documentation index, see [llms.txt](https://docs.coupler.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.coupler.io/destinations/categories/database/supabase.md).

# Supabase

Supabase is an open-source backend platform built on PostgreSQL. Because every Supabase project is a full Postgres database, Coupler.io can load data from any supported source straight into your Supabase tables — where you can query it with SQL, the Data API, or any Postgres client.

Sending data to Supabase with Coupler.io gives you a scheduled pipeline into the same database your application already reads from, with no manual CSV imports or glue scripts.

## Why use Supabase as a Coupler.io destination?

* **SQL-native analysis** — query your imported data with any SQL tool, BI platform, or ORM without exporting anything
* **Type enforcement** — Coupler.io detects and maps column types automatically, so your data lands cleanly structured
* **Any source, one database** — combine data from Google Ads, Stripe, Shopify, Facebook Ads, and dozens of other sources into a single Supabase project
* **Feeds your app, not just your reports** — imported tables are available to your Data API, Edge Functions, and client libraries like any other table
* **Scheduled refreshes** — keep your tables up to date automatically on the interval that fits your workflow

## Prerequisites

* A Supabase project
* Your Supabase **database password** — set when you created the project. This is not your `anon` or `service_role` API key
* A database user with the following privileges:
  * **CREATE** at the database level
  * **CREATE** at the schema level
  * **INSERT** on the target table
* If your project restricts inbound connections, allowlist these Coupler.io IPs:
  * `34.123.243.115`
  * `34.170.96.92`

## Quick start

{% hint style="success" %}
In your Supabase dashboard, click **Connect** at the top of the page. Every value Coupler.io asks for is in the connection string shown there — pick the **Session pooler** tab if your setup needs IPv4.
{% endhint %}

{% stepper %}
{% step %}

### **Create a new data flow and add your source.**&#x20;

Log in to Coupler.io, click **Add data flow**, and configure your data source — this can be any source Coupler.io supports, such as Google Ads, Stripe, or Shopify.
{% endstep %}

{% step %}

### Select Supabase as your destination.

In the destination step, choose **Supabase** from the list.
{% endstep %}

{% step %}

### Connect your Supabase account.

Click **+ Add Account** and fill in your connection credentials:

* **Host** — hostname, IPv4, or IPv6 address of your Supabase server
* **Port** — default is `5432`
* **Database** — the name of the target database, usually `postgres`
* **User** — your Supabase database username
* **Password** — your Supabase database password

Once filled in, click **Save** to verify the connection.

{% hint style="warning" %}
The username differs depending on which connection string you copied. A direct connection uses `postgres`, while the shared pooler expects `postgres.[project-ref]`. Taking the host from one and the username from the other is the most common cause of connection and authentication failures.
{% endhint %}
{% endstep %}

{% step %}

### Set your target schema and table.

Enter the schema name and table name where Coupler.io should write data. If the schema or table doesn't exist yet, Coupler.io will create them automatically on the first run. A dedicated schema such as `reporting` keeps imported data separate from your application tables.
{% endstep %}

{% step %}

### Choose a write mode.

* **Replace** — drops all existing rows in the table and loads fresh data on each run. Best for dashboards and reports that always reflect the latest state.
* **Append** — adds new rows below existing data without removing anything. Best for event logs, transaction history, or any time-series data.

{% hint style="warning" %}
If you use Append mode and your source data structure changes (e.g., new columns are added), you'll need to manually update the Supabase table schema before the next run.
{% endhint %}
{% endstep %}

{% step %}

### Run your data flow.

Click **Save and Run** to trigger the first manual run. Coupler.io will connect to your database, create the table if needed, and load your data. Once the run completes successfully, you can set up a schedule.
{% endstep %}
{% endstepper %}

## Which connection string to use

Supabase exposes several endpoints on different ports, and the choice determines both the host and the username format:

| Supabase mode                    | Host and port                           | Username                 |
| -------------------------------- | --------------------------------------- | ------------------------ |
| Direct connection                | `db.[project-id].supabase.co:5432`      | `postgres`               |
| Shared pooler — session mode     | `aws-[region].pooler.supabase.com:5432` | `postgres.[project-ref]` |
| Shared pooler — transaction mode | `aws-[region].pooler.supabase.com:6543` | `postgres.[project-ref]` |

Direct connections are IPv6-only unless your project has the Supabase IPv4 add-on. The shared pooler is IPv4 on every Supabase plan, so **session mode** is the safest choice if you hit connectivity problems. Avoid transaction mode — it doesn't support prepared statements.

{% hint style="info" %}
Coupler.io writes to your database directly, so Row Level Security policies on the target table don't apply to the import. If the table is exposed through your Data API, review its RLS policies separately.
{% endhint %}

#### Supported features

| Feature              | Supported |
| -------------------- | --------- |
| Replace mode         | Yes       |
| Append mode          | Yes       |
| Automatic scheduling | Yes       |
| Type enforcement     | Yes       |
| Templates            | No        |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.coupler.io/destinations/categories/database/supabase.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
