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

# Mixpanel Integration

> Sync Mixpanel cohorts into Sequenzy as tags that segment contacts and start automations

Connect Mixpanel to turn your cohorts into Sequenzy tags. When someone joins a cohort you sync, they get the cohort's tag, and when they leave, the tag comes off. Use the tag in segments and campaigns, or start an automation the moment someone joins.

## How it works

Mixpanel can't stream raw events to a webhook. What it can send is cohort membership: its **Webhook** destination exports cohorts every 30 minutes as "these people joined" and "these people left" batches. Sequenzy mirrors each cohort as one tag:

| Mixpanel cohort | Sequenzy tag |
| - | - |
| Power Users | `mixpanel-power-users` |
| Churn Risk | `mixpanel-churn-risk` |
| Trial · Day 7 | `mixpanel-trial-day-7` |

The tag is fixed the first time a cohort syncs. Renaming the cohort in Mixpanel keeps the same tag, so automations built on it keep working.

> [!NOTE]
>
> Want Mixpanel events in Sequenzy too? Send them through
> [Segment](https://docs.sequenzy.com/integrations/segment.md) or the [events API](https://docs.sequenzy.com/api-reference/subscribers/events/trigger.md). Mixpanel
> itself only exports cohorts to webhooks.

## Prerequisites

* A paid Mixpanel plan (cohort syncs to destinations need one).
* Your Mixpanel users have the `$email` user property set, so cohort members arrive with an email address.

## Connecting Mixpanel

### Step 1: Create credentials in Sequenzy

1. Go to **Settings → Integrations** in Sequenzy.
2. Find **Mixpanel** under Product analytics and click **Connect**.
3. Click **Create webhook credentials**. Sequenzy saves the connection and shows a **Webhook URL**, a **Username** (`sequenzy`) and a **Password**.

Copy the password now. Sequenzy stores it encrypted and can't show it again. If you lose it, open the Mixpanel settings on the integration card and click **New credentials**.

> [!WARNING]
>
> Create the credentials in Sequenzy before you add the destination in
> Mixpanel. Mixpanel sends the whole cohort only on its first sync, and later
> syncs send just the changes, so a first sync that arrives before the
> connection exists would leave those people untagged.

### Step 2: Add a webhook destination in Mixpanel

1. In Mixpanel, open **Data → Destinations** and add a **Webhook** destination.
2. Paste the **Webhook URL** from Sequenzy. Mixpanel can't change the URL later.
3. Turn on **Basic authentication** and enter the username and password from Sequenzy.
4. Save the destination.

### Step 3: Export cohorts to it

1. Open **Cohorts** in Mixpanel and pick a cohort.
2. Choose **Export to**, select your webhook destination and choose a sync, not a one-time export.
3. Optional: add user properties under **Properties to Export**. Sequenzy copies them onto contacts as custom attributes.

The Sequenzy dialog shows **Waiting for the first delivery** until Mixpanel's first sync arrives, then confirms it with a summary such as `Power Users: 1,204 tagged mixpanel-power-users`.

From the CLI, `sequenzy integrations connect mixpanel` generates the password and prints the values to paste:

```bash theme={null}
sequenzy integrations connect mixpanel
# Webhook URL: https://api.sequenzy.com/api/webhooks/mixpanel/<company-id>
# Basic auth username: sequenzy
# Basic auth password: <generated>
```

## What gets synced

| Mixpanel sends | What Sequenzy does |
| - | - |
| `members` | The full cohort (first sync). Tags every member without starting automations |
| `add_members` | People who joined. Adds the tag and starts **Tag added** automations |
| `remove_members` | People who left. Removes the tag from contacts that exist. Never creates a contact |

For each member, Sequenzy:

1. Matches the contact by email, or by the `mixpanelDistinctId` attribute when the member has no email.
2. Creates the contact if it doesn't exist and the member has an email. New contacts join your [default lists](https://docs.sequenzy.com/concepts/subscribers.md#default-lists).
3. Sets first and last name when Mixpanel sends them, plus `mixpanelDistinctId` and any exported properties.
4. Adds or removes the cohort's tag.

Members without an email who don't match an existing contact are skipped. Each delivery shows up in **Settings → Integrations → Activity** with counts of tagged, skipped and failed members.

### First sync and automations

The first sync of a cohort tags everyone already in it without starting automations, new-contact notifications or confirmation emails, so syncing a cohort of 5,000 people doesn't send 5,000 emails at once. From then on, people who join start **Tag added** automations as usual. Contacts are created as confirmed, like contacts from other analytics integrations, because consent comes from your product.

## Using cohorts in Sequenzy

### Email people when they join a cohort

1. Go to **Automations → Create new**.
2. Set the trigger to **Tag added** and pick the cohort's tag, for example `mixpanel-power-users`.
3. Add your emails.

### Send a campaign to a cohort

Create a segment with **Tag is** `mixpanel-churn-risk`, or pick the tag directly as the campaign audience.

## Managing synced cohorts

Open the settings on the Mixpanel card to see every cohort Sequenzy has received, the tag it maps to, how many contacts have the tag and when it last synced. The same list is in `cohorts` on `GET /v1/integrations/{id}`, `sequenzy integrations get <id>` and the `get_integration` MCP tool.

## Troubleshooting

### Nothing arrives

1. Check the Basic auth password in Mixpanel matches the one Sequenzy showed exactly. Sequenzy accepts each delivery before verifying it, so Mixpanel reports success even when the password is wrong. If you no longer have the password, click **New credentials** in the Mixpanel settings and update the destination right away: syncs that still carry the old password are dropped, and Mixpanel won't resend the people who joined or left in between.
2. Make sure the cohort is exported as a sync to the webhook destination.
3. Mixpanel syncs every 30 minutes. The first sync usually arrives a few minutes after you export the cohort.

### Members are skipped

Members are skipped when they have no `$email` in Mixpanel and don't match a contact Sequenzy already knows. Set `$email` on your Mixpanel users with `mixpanel.people.set({ $email: ... })`.

### Someone left a cohort but still has the tag

If Mixpanel couldn't deliver to Sequenzy for more than 3 days, it sends the whole cohort again. That full sync only adds tags, so people who left during the outage keep the tag until they rejoin and leave again. Remove the tag by hand if it matters.

## FAQ

> [accordion] Is this one-way or two-way?
>
> One-way. Sequenzy receives cohorts from Mixpanel and never writes back.

> [accordion] Can I sync several cohorts?
>
> Yes. Export each cohort to the same webhook destination. Each gets its own
> tag.

> [accordion] What happens if I rename a cohort?
>
> The tag stays the same. The settings dialog shows the new name.

> [accordion] Can I change the tag a cohort maps to?
>
> Not yet. The tag is set from the cohort name when it first syncs.


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