> 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.**

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        |

## Supabase common issues

### Connection issues

<details>

<summary>Coupler.io can't connect to my Supabase database</summary>

Work through these in order:

* **Use the Session pooler string**, not the direct connection. The direct endpoint resolves to IPv6, which Coupler.io can't reach without the project's IPv4 add-on. See [Which connection string to use](#which-connection-string-to-use).
* **Check the username format.** Pooler connections use `postgres.[project-ref]`, not plain `postgres`. Copying only the password from the dashboard and typing the user manually is the most common mistake.
* **Reset the database password** if authentication fails — it's separate from your Supabase login. Find it in **Project Settings → Database → Database password**.
* **Confirm the project isn't paused.** See [My data flow suddenly stopped running](#my-data-flow-suddenly-stopped-running-after-a-quiet-period).
* **Check Network Restrictions** if you've enabled them. See below.

</details>

<details>

<summary>I use Network Restrictions — which IPs do I allowlist?</summary>

Supabase's **Network Restrictions** (Project Settings → **Database** → Network Restrictions) is the equivalent of a firewall allowlist, and it uses **CIDR notation** rather than bare IPs. Add both Coupler.io addresses as `/32` ranges:

* `34.123.243.115/32`
* `34.170.96.92/32`

Notes specific to Supabase:

* Restrictions are enforced on **all connection routes** — the shared pooler as well as direct connections. Allowlisting only for direct connections and then switching Coupler.io to the pooler is not a workaround.
* If your direct connection resolves to IPv6, Supabase asks you to add IPv6 CIDRs too. Coupler.io only needs the two IPv4 entries above, but leaving your existing IPv6 entries in place keeps your own tooling working.
* An `update` via the CLI **replaces** the whole list unless you pass `--append`. Adding Coupler.io's IPs with a plain update can silently drop your own.
* You need Owner or Admin permissions on the project to change restrictions.

</details>

<details>

<summary>Connection worked, then started being refused after a few failed attempts</summary>

This is Supabase-specific and often mistaken for a Coupler.io problem. Supabase runs Fail2ban in front of the database: a couple of failed authentication attempts in a row (for example, saving a Coupler.io destination with a stale password and retrying) **temporarily bans the client IP**.

* Bans clear automatically after about **30 minutes**.
* To lift one immediately, go to **Project Settings → Database** and use **Unban IP**, or run `supabase network-bans remove` with the CLI.
* Fix the credentials before retrying, otherwise the ban is reapplied.

{% hint style="info" %}
If a data flow fails repeatedly on connection, stop re-running it. Each failed attempt can extend the ban and make the destination look permanently broken.
{% endhint %}

</details>

<details>

<summary>Connection times out during the data flow run</summary>

A timeout mid-run (not at the credentials step) means the query outlived a statement timeout or the instance ran out of headroom. Supabase applies its own timeout defaults, so this behaves differently from a self-hosted PostgreSQL server:

* The `postgres` role has no explicit statement timeout but is capped by a **2-minute global default**. Large loads can hit this.
* Raise it for the role Coupler.io connects as, from the SQL Editor:

  ```sql
  alter role postgres set statement_timeout = '10min';
  ```

  Session-level `set statement_timeout` only works over session mode or a direct connection — another reason not to use the transaction pooler.
* Check **Observability → Database Connections** for pool saturation. Compute size caps both max connections and max pooler clients, so a busy app plus a large Coupler.io load can exhaust them.
* Split very large flows into several sources, or filter at the source level.

</details>

### Project state

<details>

<summary>My data flow suddenly stopped running after a quiet period</summary>

Free Plan Supabase projects are **paused after \~7 days of low activity**, and a paused project accepts no database connections at all. Every scheduled Coupler.io run counts as activity, so an active flow normally keeps a project awake — but a paused or newly imported flow won't.

* Restore the project from the Supabase dashboard. Paused Free projects are restorable for 90 days after pausing.
* Re-run the data flow after the project is fully restored; credentials and schema are unchanged.
* Upgrade to Pro to stop automatic pausing.

</details>

### Data issues

<details>

<summary>Data flow fails with a column name error</summary>

Supabase enforces a **63-character limit** on column names. If your source data has field names longer than 63 characters, the data flow will fail.

This is a known issue with sources like **Facebook (Meta) Ads** and **Stripe**, which sometimes produce long field names.

To fix this:

* Use the **Transformations** step in your data flow to rename the affected columns to shorter names before they reach PostgreSQL
* Be careful when editing transformations — changes are saved automatically without a confirmation prompt, so double-check before navigating away

{% hint style="danger" %}
Transformation changes in Coupler.io save automatically. Accidental edits can change your column structure without warning. Review your transformation settings carefully if your data flow suddenly starts failing.
{% endhint %}

</details>

<details>

<summary>Append mode breaks after a source schema change</summary>

Same behavior as any PostgreSQL destination: in Append mode, Coupler.io writes into the existing table structure, so new source columns cause the run to fail.

Add the columns yourself in the Supabase **SQL Editor** before the next run:

```sql
alter table your_schema.your_table add column new_column text;
```

After that, Coupler.io populates them normally. Using the Table Editor works too, but SQL is faster for several columns at once.

</details>

<details>

<summary>Data types are wrong in the destination table</summary>

Coupler.io detects and enforces column types from the source. Mismatches happen when the table already exists with different types.

* In **Replace** mode, drop the table and let Coupler.io recreate it cleanly on the next run
* In **Append** mode, check that existing column types match what Coupler.io writes

{% hint style="warning" %}
Supabase-specific: dropping and recreating a table also drops its **RLS policies, grants, indexes, and foreign keys**, and any Data API access other services rely on. If the table is used by your app, alter the column types instead of dropping the table.
{% endhint %}

</details>

### Permission errors

<details>

<summary>Permission denied when creating a schema or table</summary>

Supabase's default `postgres` role is an admin role (not a superuser) and can create schemas and tables, so this error almost always means you connected with a **custom, limited role**. Grant it:

```sql
GRANT CREATE ON DATABASE postgres TO your_user;
GRANT CREATE ON SCHEMA your_schema TO your_user;
GRANT INSERT ON TABLE your_schema.your_table TO your_user;
```

{% hint style="info" %}
For Coupler.io to create schemas and tables automatically, the role needs CREATE at both the database and schema level — not just INSERT on an existing table. Note that PostgreSQL 15+ (which Supabase runs) no longer grants CREATE on the `public` schema to everyone, so custom roles need an explicit grant even for `public`.
{% endhint %}

</details>

<details>

<summary>Coupler.io's tables trigger an "RLS disabled in public" security warning</summary>

Tables Coupler.io creates are plain PostgreSQL tables with **Row Level Security disabled**. If they live in the `public` schema, Supabase's Security Advisor flags them, and they're readable through the Data API by anyone with your anon key.

Two options:

* **Load into a dedicated schema** (for example, `coupler`) that isn't exposed through the Data API. This is the recommended setup for analytics data.
* **Enable RLS** on each table after the first run. RLS doesn't block Coupler.io's writes, since the role it connects as bypasses RLS:

  ```sql
  alter table public.your_table enable row level security;
  ```

</details>

<details>

<summary>My table loaded successfully but I can't see it in the dashboard or API</summary>

Not an error. If Coupler.io created the table in a schema other than `public`, the Table Editor only shows it once you select that schema from the schema dropdown, and the Data API ignores it entirely until you add the schema to **Project Settings → API → Exposed schemas** and grant `usage` on it to the API roles.

</details>

## Supabase FAQ

<details>

<summary>Which Supabase connection string should I use?</summary>

Use the **Session pooler** string. In your Supabase dashboard, click **Connect** and choose **Session pooler**:

| Field    | Value                                                       |
| -------- | ----------------------------------------------------------- |
| Host     | `aws-[region].pooler.supabase.com`                          |
| Port     | `5432`                                                      |
| Database | `postgres`                                                  |
| User     | `postgres.[project-ref]`                                    |
| Password | Your database password (not your Supabase account password) |

Coupler.io connects over IPv4. Supabase's direct connection (`db.[project-ref].supabase.co`) is IPv6-only unless your project has the paid IPv4 add-on, so it usually won't work. The shared pooler is IPv4 on every plan tier.

{% hint style="warning" %}
Don't use the Transaction pooler (port `6543`). Transaction mode doesn't support prepared statements or session-level settings, which leads to intermittent, hard-to-diagnose run failures.
{% endhint %}

</details>

<details>

<summary>Can I load data into a Supabase table that doesn't exist yet?</summary>

Yes. Enter any table name and Coupler.io creates it on the first successful run — the same as with any PostgreSQL destination. You can also specify a schema that doesn't exist yet and Coupler.io will create it.

The default `postgres` role has enough privileges for this. If you connect with a custom, limited role, grant it `CREATE` on the database and schema first.

</details>

<details>

<summary>Should I load data into the public schema?</summary>

Prefer a **dedicated schema** (for example, `coupler` or `analytics`).

Anything in `public` is exposed through Supabase's Data API, and tables Coupler.io creates have Row Level Security disabled — so they'd be readable by anyone holding your anon key, and Supabase's Security Advisor will flag them. A separate schema stays out of the Data API unless you explicitly add it to **Project Settings → API → Exposed schemas**.

If you do need tables in `public`, enable RLS on them after the first run. RLS doesn't block Coupler.io's writes, since the role it connects as bypasses RLS.

</details>

<details>

<summary>How does Coupler.io determine column types?</summary>

Coupler.io detects types from your source data and enforces them when writing — numeric fields land as numbers, dates as date types, and so on, rather than everything becoming text. There's no schema auto-detection setting to configure, unlike the BigQuery destination.

If a table already exists with different column types, you may hit type mismatch errors. Letting Coupler.io create the table from scratch is the cleanest way to get properly typed columns.

</details>

<details>

<summary>What's the best write mode for my use case?</summary>

* **Replace** — deletes all existing rows and loads fresh data on every run. Best for dashboards and reports that should always reflect the current state of your source.
* **Append** — adds new rows below the existing data without touching what's already there. Best for historical logs and tracking change over time.

If you're unsure, start with Replace and switch to Append once your pipeline is stable.

</details>

<details>

<summary>What are the rules for column names in Supabase?</summary>

Standard PostgreSQL rules apply — Supabase doesn't change them. The one that trips people up is the **63-character limit** on identifiers. Sources like Facebook (Meta) Ads and Stripe sometimes produce longer field names, which fails the run.

Use the **Transformations** step to rename affected columns to something shorter before they reach Supabase.

{% hint style="info" %}
Unlike BigQuery, PostgreSQL does allow spaces and mixed case in column names — but they then require double quotes in every query, so renaming them in Coupler.io is still worth doing.
{% endhint %}

</details>

<details>

<summary>Can multiple sources send data to the same Supabase project?</summary>

Yes, in two ways:

* **One data flow, multiple sources** — use Append, Join, or Aggregate transformations to combine sources before the data lands in Supabase
* **Multiple data flows** — each pointing at the same database but writing to different tables or schemas

</details>

<details>

<summary>Will my data flow fill up my Supabase project?</summary>

Worth watching, particularly in Append mode and particularly on the Free plan:

* **Free plan** projects go **read-only** once the database exceeds 500 MB, which fails subsequent runs
* **Paid plans** autoscale disk as you approach capacity, so this is rarely an issue

To keep size in check, filter or aggregate at the source level, use Replace mode where you don't need history, or periodically archive old rows out of append-only tables.

</details>

<details>

<summary>Will Coupler.io keep my Free plan project from being paused?</summary>

Usually, yes. Supabase pauses Free plan projects after roughly 7 days of low activity, and a scheduled Coupler.io data flow counts as database activity — a daily run is generally enough to keep the project awake.

A paused project accepts no connections at all, so if you pause your data flow for a while, restore the project from the Supabase dashboard before resuming it.

</details>

<details>

<summary>Do I need to allowlist Coupler.io's IP addresses?</summary>

Only if you've enabled Supabase's **Network Restrictions** (Project Settings → **Database**). It uses CIDR notation, so add:

* `34.123.243.115/32`
* `34.170.96.92/32`

Restrictions are enforced on pooled and direct connections alike, so switching connection route isn't a workaround.

{% hint style="warning" %}
If you manage restrictions via the Supabase CLI, an `update` replaces the entire allowlist unless you pass `--append`. Adding Coupler.io's IPs without it can silently remove your own.
{% endhint %}

</details>

<details>

<summary>Why did my connection start failing right after I fixed the password?</summary>

Supabase temporarily bans client IPs after repeated failed authentication attempts — sometimes as few as two wrong passwords in a row. The ban clears after about 30 minutes, or you can lift it immediately with **Unban IP** in Project Settings → Database.

Avoid re-running a failing data flow repeatedly, since each attempt can extend the ban.

</details>

<details>

<summary>My data flow times out. Can I extend the limit?</summary>

Yes. Supabase caps statements at 2 minutes by default for the `postgres` role. Raise it from the SQL Editor:

```sql
alter role postgres set statement_timeout = '10min';
```

Also consider splitting large flows into smaller sources or filtering at the source level. Note that the Supabase dashboard and client libraries cap out at 60 seconds regardless — that limit doesn't apply to Coupler.io's connection.

</details>


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
