> ## Documentation Index
> Fetch the complete documentation index at: https://docs.clustr-ai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Supabase Integration

> Sync your Clustr referral intelligence to a table in your own Supabase database

Export your referral intelligence to a table in **your own** Supabase (or any Postgres) database. After each enrichment job, Clustr sends the opportunities that changed to the table, and every night it reloads the whole table so deletions and CRM or tag changes land too.

It's a **data export**, not an OAuth app: you connect with a Postgres connection string, and Clustr only ever writes to the one table it manages.

> [!NOTE]
>
> Connecting Supabase is **admin-only**, under **Integrations → Supabase** in the dashboard.

## Connect Supabase

Have your Supabase Postgres connection string ready, then run the three-step wizard.

**1. Paste your connection string**

In Supabase, click **Connect** and copy the **Session pooler** string:

```
postgresql://postgres.<ref>:<password>@aws-1-<region>.pooler.supabase.com:5432/postgres
```

Paste it into Clustr and click **Continue**. The transaction pooler (port `6543`) works too. The direct string (`db.<ref>.supabase.co`) works only if your project has Supabase's IPv4 add-on.

> [!NOTE]
>
> The string includes your password — Clustr stores it encrypted and uses it only to write the export table. The host must be a Supabase host (`db.<ref>.supabase.co` or `*.pooler.supabase.com`).

**2. Choose a destination schema**

**Use existing** (pick a schema Clustr found) or **Create new** (defaults to `clustr`; names must be lowercase letters, digits, and underscores, starting with a letter or underscore). Click **Continue**.

**3. Confirm the table and sync**

Clustr checks `<schema>.clustr_referral_paths` and either creates it, reuses it, or — on a column **shape mismatch** — asks you to pick another schema or drop the table. Click **Connect & sync** to save the connection and run the first full export.

After the initial sync, Clustr pushes the opportunities that **changed since the last sync** when an enrichment job finishes. If a sync is already running, Clustr does not start a second one: it runs one more pass when the current one ends.

Every night (about 02:00 UTC) Clustr also does a **full sync**. It loads a fresh copy of the table and swaps it in at once, so opportunities deleted in Clustr disappear and CRM or tag changes that did not touch the opportunity are picked up. If your table has row-level security, triggers, views or foreign keys that depend on it, Clustr cannot swap it, and instead writes into the table and removes the rows it did not touch.

Large workspaces are read in pages of 5,000 rows. A sync that is interrupted, by a restart or a dropped connection, carries on from the last page it wrote and does not start over.

## How It Works

Clustr writes a single table, **`<schema>.clustr_referral_paths`** — one flat, denormalized row per opportunity. Rows are upserted on `id` (`INSERT … ON CONFLICT (id) DO UPDATE`), so re-syncing never duplicates, and the nightly full sync also removes opportunities that no longer exist in Clustr. Because it's keyed and idempotent, the table is safe to query live, build views on, or point a BI dashboard at.

## Settings

The Supabase panel shows connection status and sync controls.

| Control | Description |
| - | - |
| **Connection status** | Destination host, `<schema>.clustr_referral_paths`, and last sync time. |
| **Auto-sync** | Every enrichment job sends the changed opportunities; a full sync runs every night. |
| **Sync now** | Send the changes since the last sync on demand. The first sync, and the nightly one, are full. |
| **Sync history** | Recent export runs with status and row counts. |
| **Disconnect** | Removes the saved connection and stops syncs. Data already in Supabase is **not** affected; reconnect anytime. |

## Table Schema

`clustr_referral_paths` is keyed on `id` (used for upserts); all other fields are stored as `text` so the export never fails on type coercion. Full column reference:

> [accordion] Keys & metadata
>
> | Column | Description |
> | - | - |
> | `id` | Opportunity ID (primary key) |
> | `tenant_id` | Your Clustr workspace ID |
> | `exported_at` | When the row was last written |
> | `source_app` | Always `clustr` |

> [accordion] Contact (client)
>
> | Column | Description |
> | - | - |
> | `contact_first_name` | Connector's first name |
> | `contact_last_name` | Connector's last name |
> | `contact_job_title` | Connector's job title |
> | `contact_company` | Connector's company |
> | `contact_linkedin_url` | Connector's LinkedIn URL |
> | `contact_linkedin_urn` | Connector's LinkedIn URN, the stable member identifier (e.g. `ACoAA…`). Empty when not available. |
> | `contact_tags` | Tags on the contact |
> | `contact_in_crm` | Whether the contact exists in your CRM |
> | `contact_crm_id` | The contact's record ID in your CRM. Empty when not matched. |
> | `contact_crm_provider` | Which CRM the ID is from (`hubspot`, `salesforce`, or `attio`) |
> | `contact_associated_deals` | Deals associated with the contact |
> | `contact_associated_deal_stage` | Stage of associated deals |
> | `contact_recent_activities` | Recent CRM activity |

> [accordion] Relationship quality
>
> | Column | Description |
> | - | - |
> | `relationship_quality_score_pct` | Confidence score for the referral path (%) |

> [accordion] Prospect
>
> | Column | Description |
> | - | - |
> | `prospect_first_name` | Prospect's first name |
> | `prospect_last_name` | Prospect's last name |
> | `prospect_seniority_level` | Prospect's seniority |
> | `prospect_profile_headline` | Prospect's profile headline |
> | `prospect_job_title` | Prospect's job title |
> | `prospect_linkedin_url` | Prospect's LinkedIn URL |
> | `prospect_linkedin_urn` | Prospect's LinkedIn URN, the stable member identifier (e.g. `ACoAA…`). Empty when not available. |
> | `prospect_in_crm` | Whether the prospect exists in your CRM |
> | `prospect_crm_id` | The prospect's record ID in your CRM. Empty when not matched. |
> | `prospect_crm_provider` | Which CRM the ID is from (`hubspot`, `salesforce`, or `attio`) |
> | `prospect_associated_deals` | Deals associated with the prospect |
> | `prospect_associated_deal_stage` | Stage of associated deals |
> | `prospect_recent_activities` | Recent CRM activity |

> [accordion] Prospect company
>
> | Column | Description |
> | - | - |
> | `prospect_company_name` | Company name |
> | `prospect_company_linkedin_url` | Company LinkedIn URL |
> | `prospect_company_linkedin_numeric_id` | Company LinkedIn numeric ID |
> | `prospect_company_linkedin_vanity_name` | Company LinkedIn vanity name |
> | `prospect_company_crm_id` | The company's record ID in your CRM. Empty when not matched. |
> | `prospect_company_crm_provider` | Which CRM the ID is from (`hubspot`, `salesforce`, or `attio`) |
> | `prospect_company_domain` | Company domain |
> | `prospect_company_industry` | Company industry |
> | `prospect_company_size` | Company size |
> | `prospect_company_revenue` | Company revenue |
> | `prospect_country` | Prospect's country |

> [accordion] Engagement
>
> | Column | Description |
> | - | - |
> | `last_engagement_type` | Type of the most recent engagement |
> | `last_engagement_url` | Link to the engagement |
> | `last_engagement_context_url` | Link to the engagement context |
> | `last_engagement_date` | Date of the most recent engagement |
> | `total_engagements_found` | Total engagements found |
> | `full_engagement_history` | Full engagement history |

> [accordion] Shared experience
>
> | Column | Description |
> | - | - |
> | `common_company` | Company shared by contact and prospect |
> | `overlap_in_months` | Months of overlap at the shared company |
> | `shared_experience_company` | Shared experience company |
> | `shared_education_institution` | Shared education institution |
> | `shared_education_overlap_months` | Months of overlap in education |

> [accordion] Signals
>
> | Column | Description |
> | - | - |
> | `interactions` | Every signal between the two, as the Interactions column shows it: `1st-degree connection, skill endorsement, 3 likes, shared work` |
> | `has_linkedin_connection` | `TRUE` when the contact and the prospect are 1st-degree connections on LinkedIn |
> | `has_endorsement` | `TRUE` when one of the two endorsed the other's skills on LinkedIn |

## Accounts and Connectors tables (optional)

Besides the warm intros, Clustr can export your **Accounts** and **Connectors** ledgers. Both are off by default. Turn them on in the connect form's last step, or later under **Integrations → Supabase → Settings**. Turning one on starts a sync straight away.

They are written into the same schema as the warm intros, by the same sync, with the same rules: every row is upserted on its key, and rows that left the ledger are removed after a complete sync. Turning a table off stops writing it; the table and its rows stay.

| Table | Key | Columns |
| - | - | - |
| `<schema>.clustr_accounts` | `account_linkedin_id` | `account_linkedin_id`, `tenant_id`, `company_id`, `name`, `domain`, `website`, `linkedin_url`, `industry`, `size`, `revenue`, `employees_exact`, `founded_year`, `hq_country`, `connector_count`, `contact_count`, `best_strength`, `best_path_kind`, `warmest_connector`, `warmest_connector_id`, `top_seniority`, `is_target`, `in_crm`, `crm_provider`, `owner_name`, `owner_email`, `deal_stage`, `is_customer`, `has_open_deal`, `last_crm_activity_type`, `last_crm_activity_at`, `crm_activity_count`, `icp_fit`, `fit_grade`, `fit_score`, `temperature`, `abm_status`, `tier`, `last_signal_at`, `last_signal_type`, `signals_30d`, `tags`, `last_engagement_at`, `first_seen_at`, `clustr_account_id`, plus `exported_at` and `source_app` |
| `<schema>.clustr_connectors` | `connector_linkedin_id` | `connector_linkedin_id`, `tenant_id`, `full_name`, `headline`, `linkedin_url`, `country`, `job_title`, `seniority_level`, `job_function`, `company_name`, `company_domain`, `company_linkedin_numeric_id`, `company_industry`, `company_size`, `may_know_count`, `reach_targets`, `reach_icp`, `reach_icp_strong`, `tags`, `owner`, `in_crm`, `crm_provider`, `crm_id`, `in_slot`, `first_seen_at`, `clustr_person_id`, plus `exported_at` and `source_app` |

All columns are text, like the warm-intros table.

## Competitor monitoring tables (optional)

With competitor monitoring, Clustr can also export your competitors' activity and the accounts they work. One switch writes both tables: **Competitor monitoring**, in the connect form's last step or under **Integrations → Supabase → Settings**. It is off by default, and turning it on starts a sync straight away.

Both tables are written by every sync, including the one that follows each competitor scan, and each sync writes them whole: an interaction you ignore or a competitor you remove leaves them at the next sync. Turning the switch off stops writing them; the tables and their rows stay.

| Table | Key | Columns |
| - | - | - |
| `<schema>.clustr_competitor_activity` | `activity_id` | `activity_id`, `tenant_id`, `engaged_at`, `direction`, `interaction_type`, `competitor_id`, `competitor_name`, `competitor_domain`, `competitor_ids`, `rep_linkedin_id`, `rep_name`, `rep_title`, `rep_role`, `rep_comment`, `post_url`, `post_preview`, `person_linkedin_id`, `person_name`, `person_job_title`, `person_in_your_network`, `company_id`, `clustr_account_id`, `account_linkedin_id`, `account_name`, `account_domain`, `is_customer`, `buying_intent`, `buying_intent_reason`, `is_critical`, `critical_reason`, `owner_name`, `owner_email`, `has_open_deal`, `deal_stage`, `deal_name`, plus `exported_at` and `source_app` |
| `<schema>.clustr_competitor_accounts` | `account_key` | `account_key`, `tenant_id`, `company_id`, `clustr_account_id`, `account_linkedin_id`, `account_name`, `account_domain`, `linkedin_url`, `standing`, `is_customer`, `in_crm`, `customer_only`, `customer_of`, `competitors`, `competitor_count`, `in_market`, `reading`, `latest_intent`, `latest_intent_reason`, `interactions`, `interactions_30d`, `interactions_90d`, `likes`, `comments`, `pitches`, `inbound_interactions`, `outbound_interactions`, `people_engaged`, `weeks_active`, `first_interaction_at`, `last_interaction_at`, `latest_signal`, `owner_name`, `owner_email`, `cs_owner_name`, `cs_owner_email`, `has_open_deal`, `deal_stage`, `deal_name`, `deal_amount`, `deal_close_date`, plus `exported_at` and `source_app` |

* `clustr_competitor_activity` has one row per like or comment, as the Activity tab lists them. `activity_id` stays the same for the same interaction from one sync to the next. `direction` is `outbound` when their person engaged someone's post, `inbound` when someone engaged their person's post.
* `clustr_competitor_accounts` has one row per account a competitor ever touched, and per company that buys from a competitor you watch (`customer_only` is `true` for those, with no interactions). `standing` is `customer`, `crm` or `new`, as the Account column reads.
* `has_open_deal`, `deal_stage` and `deal_name` are the open deal in your CRM, the one the Accounts page shows.
* Join either table to `clustr_accounts` on `company_id`, `account_linkedin_id` or `clustr_account_id`.

## Renaming a table

Every table Clustr writes carries a marker in its comment (`clustr:referral_paths`, `clustr:accounts`, `clustr:connectors`, `clustr:competitor_activity`, `clustr:competitor_accounts`). If you rename a table in your database, Clustr finds it by that marker and keeps writing to it under its new name. Clustr only writes the comment when the table has none, so a comment of your own is never overwritten; keep the marker text in it if you edit it.

## Troubleshooting

| Problem | What to do |
| - | - |
| **Authentication failed** | Re-copy the connection string (especially the password) from **Settings → Database → Connection string**. |
| **Supabase host is IPv6 only** | You pasted the direct string (`db.<ref>.supabase.co`) and your project has no IPv4 address. In Supabase, click **Connect** and copy the **Session pooler** string instead. |
| **Host not allowed** | The host must be `db.<ref>.supabase.co` or a `*.pooler.supabase.com` pooler host. Custom proxies aren't supported. |
| **Insufficient permissions** | The role needs permission to create and write in the chosen schema (for Supabase, the default `postgres` user works). |
| **Table shape mismatch** | A `clustr_referral_paths` table with incompatible columns already exists. Pick a different schema, or drop it and reconnect. |
| **An export is already running** | Nothing to do. Your request is queued and runs right after the current sync. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.