> This page is part of the [Customer.io documentation](https://docs-customerio.netlify.app). For the complete index, see [llms.txt](https://docs-customerio.netlify.app/llms.txt).
> Last updated: July 15, 2026

# Automation for syncing Mixpanel cohorts

Send cohort data from Mixpanel to Customer.io so you can add profiles, index events, and more.

In Mixpanel, you can organize users into [cohorts](https://docs.mixpanel.com/docs/users/cohorts), which are akin to segments in Customer.io. Mixpanel cohorts compile users based on criteria like what events they’ve performed. You can send cohort data from Mixpanel to Customer.io through webhooks, and you can trigger automations to update profiles, index events, and more. Visit [Mixpanel’s documentation on webhooks](https://docs.mixpanel.com/docs/cohort-sync) for more info.

## Before you begin

### Mixpanel

You must have a paid Mixpanel plan to create custom webhooks. View other [prerequisites](https://docs.mixpanel.com/docs/cohort-sync/webhooks) here.

### Customer.io

In your Customer.io workspace, [create a webhook-triggered automation](/messaging/send/automations/data-workflows/webhook-triggered-automations/). Select the trigger block then choose **Webhook**. Next, [set up a custom webhook in Mixpanel](#set-up-mixpanel).

## Set up Mixpanel

1.  Log into Mixpanel.
2.  Go to *Data Management > Integrations* in the top navigation.
3.  Select **Custom Webhooks** from the list of integration options.
    
    [![webhook-campaign-mixpanel-connection.png](https://docs.customer.io/images/webhook-campaign-mixpanel-connection.png)](#7e773e0c7a172fa66073b89d148cda4e-lightbox)
    
4.  Create a **Connection**. If you already have connections, select the connection dropdown then click **Add Connection** at the bottom.
    1.  Provide a name. Then copy/paste the URL under Trigger Conditions from your automation in Customer.io.
    2.  Enter your [Track API credentials](https://fly.customer.io/settings/api_credentials) under *Username* and *Password*. Make sure you use credentials for the correct workspace.
5.  Go to *Data Management > Cohorts*. Create a cohort you want to send to your workspace or select an existing cohort.
6.  Click the three dots  followed by **Export to…**. Choose the name of your custom webhook then the sync frequency: one time or recurring. Click **Begin Sync** when you’re done. This will populate test data in your workspace to help you set up your workflow.

 Mixpanel will not send more than 1,000 users per call. For info on retries, custom properties, and more, visit [Mixpanel’s documentation](https://docs.mixpanel.com/docs/cohort-sync/webhooks#faq).

## Finish setting up your webhook-triggered automation

1.  Go to your webhook-triggered automation.
    
2.  Drag a **Send and Receive Data** block onto the canvas. We refer to this as a *Webhook Action*.
    
3.  Click **Add Request** in the left hand pane.
    
4.  Create a **POST** request targeting [our track v2 endpoint for multiple requests](/integrations/api/track/#operation/batch). If you’re in the EU, make sure you use our endpoint with `track-eu` in the URL.
    
    [![webhook-campaign-mixpanel-send-data-1.png](https://docs.customer.io/images/webhook-campaign-mixpanel-send-data-1.png)](#f2aa9b2d06b87ca5fc587576c5460ed3-lightbox)
    
5.  Add your [Track API credentials](https://fly.customer.io/settings/api_credentials) to the `Authorization` header: Basic {{ ‘siteID:appKEY’ | base64 }}. Make sure you use credentials for the correct workspace; these need to match those you added to Mixpanel.
    
6.  Add the following JSON to the body:
    
    ```TEXT
        {
            "batch": [
                {% for items in trigger.parameters.members %}
                    {
                        "type": "person",
                        "identifiers": {
                            "id": "{{items.<id>}}"
                        },
                        "action": "event",
                        "name": "{{ trigger.parameters.mixpanel_cohort_name }}",
                        "attributes":  {{ items | to_json }}
                    }
                    {% unless forloop.last %},
                    {% endunless %}
                {% endfor %}
            ]
        }
    ```
    
    Make sure your identifiers match your *General workspace settings*. For instance, if you identify profiles by email, you’ll want to replace with `email`.
    
    On the left, you’ll see the test data sent from setting up your cohort in Mixpanel.
    
7.  Click **Save**.
    
8.  Click **Review items** if you have outstanding steps to complete.
    
9.  Then click **Start Automation** to review your settings and go live!
    
10.  If you set up your cohort to send once, go back to Mixpanel and export the cohort again.
    

After the webhook triggers the automation, you’ll see new profiles and events created in your workspace. New profiles are identified based on the `id` provided in the payload. An event with the cohort name and attributes will be added to your Data Index and associated with all profiles in this payload.

[![webhook-campaign-mixpanel-new-person-and-event.png](https://docs.customer.io/images/webhook-campaign-mixpanel-new-person-and-event.png)](#1d51359c675799b05035db0711c5eac5-lightbox)

### Add event attributes to profiles

You add event data to profiles in a couple of ways:

*   You can add a [**Create/update profile action**](/messaging/send/workflows/attribute-updates/create-update-profile/) after the webhook action in this automation.
*   You can create a [**automation triggered by an event**](/messaging/send/automations/triggers/#event-trigger) (the cohort in this case) to craft a new workflow that could also include updating profiles based on event data.

## Create a segment from a Mixpanel cohort

After you send cohort data from [Mixpanel](#set-up-mixpanel) to [Customer.io](#set-up-campaign) through a webhook-triggered automation, you can create segments that correspond to these cohorts to track the population over time.

To create a segment that targets a Mixpanel cohort:

1.  Go to  *Segments*.
2.  Click **Create Segment**.
3.  Give your segment a name and description so you know which cohort it relates to.
4.  Choose *Data-driven segment* so that your segment audience stays in sync with your cohort data from Mixpanel.
5.  Recall that cohort data comes over as an event. Select *Add condition or group* then choose **Event** from the dropdown.
    
    [![webhook-campaign-mixpanel-segment.png](https://docs.customer.io/images/webhook-campaign-mixpanel-segment.png)](#0f572dd6be139b5b54a7a558ce4f1a31-lightbox)
    
6.  In the event\_name field, select your cohort name.
7.  Then choose whether you want to target profiles that have or have not performed this event. Hover over the condition and click **Refine** to filter the audience further.
8.  **Save** your changes.

You can use this to trigger an automation, but to reference any event attributes (attributes of the cohort in this case) in messages, you’ll need to create an [event-triggered automation](/messaging/send/automations/triggers/#event-trigger) or [store event data on profiles](#add-event-data-to-people).

*   *   [Before you begin](#before-you-begin)
        *   [Mixpanel](#mixpanel)
        *   [Customer.io](#customerio)
    *   [Set up Mixpanel](#set-up-mixpanel)
    *   [Finish setting up your webhook-triggered automation](#set-up-campaign)
        *   [Add event attributes to profiles](#add-event-data-to-people)
    *   [Create a segment from a Mixpanel cohort](#create-a-segment-from-a-mixpanel-cohort)

Copy page

Copy page [Download .md](/messaging/send/automations/data-workflows/mixpanel-data-automation.md)

Is this page helpful?

![](https://docs.customer.io/images/export-success.png) ![](https://docs.customer.io/images/export-failure.png)

# How can we make it better?

Close

Do you need help from Customer.io support?  No  
 Yes

What part of Customer.io do you need help with? 

How can we improve this page?

Email (optional):  Please provide a valid email address

 I am not a bot

 

We appreciate your feedback!

Our support team will contact you as soon as possible
