> AI agents: this is one page from PostHog's docs. Full index of Markdown docs for LLMs: https://posthog.com/llms.txt # Move from Customer.io Canonical URL: https://posthog.com/docs/workflows/migrate/customer-io > **Cloud region:** This page uses US Cloud hosts. For an EU Cloud project, use `https://eu.i.posthog.com` instead of `https://us.i.posthog.com` (ingestion host), and use `https://eu.posthog.com` instead of `https://app.posthog.com` (app host for links). ## On this page - [What moves](#what-moves) - [1. Set up sending](#1-set-up-sending) - [2. Import opt-outs and suppressions](#2-import-opt-outs-and-suppressions) - [3. Move your transactional email](#3-move-your-transactional-email) - [4. Import automations](#4-import-automations) - [5. Move push devices](#5-move-push-devices) - [6. Test and turn on](#6-test-and-turn-on) If you capture events with PostHog, your people are already here. You move what's around them: opt-outs, suppressions, transactional messages, automations, and push devices. Automations import as drafts, and never send until you turn them on. Or let your agent do it. Connect the [PostHog MCP](https://posthog.com/docs/workflows/mcp.md): ### Install the PostHog MCP ``` npx @posthog/wizard mcp add ``` [](https://claude.ai/directory/connectors/posthog)[](https://chatgpt.com/plugins/plugin_asdk_app_699caef2d680819188727b0ddbb349dd)[](https://posthog.com/docs/model-context-protocol/cursor.md)[](https://posthog.com/docs/model-context-protocol/vscode.md)[](https://posthog.com/docs/model-context-protocol/codex.md) Then ask: Ask your agentwith the [PostHog MCP](https://posthog.com/docs/workflows/mcp.md)[migrating-from-customer-io](https://posthog.com/docs/workflows/skills.md) “Move our email from Customer.io to PostHog.” Copy ## What moves | From Customer.io | In PostHog | | --- | --- | | Subscription topics | Marketing [categories](https://posthog.com/docs/workflows/email/opt-outs.md) | | Global unsubscribes and topic preferences | Opt-outs | | Bounced and invalid addresses | [Suppression list](https://posthog.com/docs/workflows/email/suppression.md). Blocks all email. | | Spam reports | Suppression list. Blocks marketing email. | | Transactional messages | [Transactional emails](https://posthog.com/docs/workflows/transactional/templates.md), one for each message and each translation | | Contacts | People who already exist, matched by email. Pick **New people from contacts** too to create a person for each email that matches nobody. | | Campaigns | Draft [automations](https://posthog.com/docs/workflows/automations.md), with their emails, snippets, layouts, and images | | Push device tokens | Devices on a PostHog push channel | Most segments, newsletters, forms, collections, and delivery history stay in Customer.io. ## 1\. Set up sending [Set up your domain](https://posthog.com/docs/workflows/domain.md), and add a sender for each from-address your Customer.io emails use. The automation import matches each email to the sender with the same address. ## 2\. Import opt-outs and suppressions Do this first. It creates the categories that imported automations use. 1. In Customer.io, create an **App API key** under **Settings** > **Account Settings** > **API Credentials**. 2. Go to [**Messaging** > **Opt-outs**](https://app.posthog.com/workflows/opt-outs) and click **Import from another tool**. Pick **Customer.io**, paste the key, and click **Start import**. This imports subscription topics, suppressed addresses, and global unsubscribes. To bring contacts over too, also pick **Contacts**, and **New people from contacts** for emails that match nobody in PostHog. PostHog keeps the key, so you can import again later. 3. Customer.io's API doesn't share per-topic preferences, so export them as a CSV. On Customer.io's **People** page, filter on `cio_subscription_preferences` **exists**, and export `cio_subscription_preferences` and `email`. Upload the CSV in step 2 of the same window. ![The Customer.io import, with what to import and the App API key field](https://res.cloudinary.com/dmukukwp6/image/upload/w_1600,c_limit,q_auto,f_auto/cio_step1_light_15ce3ec2c9.png) While you run both tools, keep opt-outs in sync both ways. Steps 3 and 4 of the same window set this up: - **Customer.io to PostHog:** in Customer.io, go to **Integrations** > **Add integration** > **Reporting webhook**, and paste the URL that PostHog gives you. Then paste the webhook's signing secret in PostHog. - **PostHog to Customer.io:** enter your Customer.io **Region**, **Site ID**, and **Track API key**. Only categories imported from Customer.io sync back. ## 3\. Move your transactional email 1. In the same import window, pick **Transactional messages**, and run the import. PostHog copies each message into a transactional email, and each translation into its own. It needs a verified sender, so do step 1 first. 2. Open each imported email on the [**Transactional**](https://app.posthog.com/transactional) tab, check its notes, and copy its template ID from its **API** tab. 3. Change each send in your code from Customer.io to PostHog, one email at a time. You need a [project secret API key](https://posthog.com/docs/workflows/transactional/send-from-code.md#create-an-api-key). The recipient and the message data stay the same. Customer.io reads `message_data` as `{{ trigger.* }}`, and the import rewrites each email to read `{{ variables.* }}`, so you send the same keys. An email can't read the person's profile, so pass the attributes it used, such as `customer.first_name`, in the data too. The email's notes name them. These examples use Node.js. Each [SDK page](https://posthog.com/docs/workflows/installation/quick-start.md#install-an-sdk) has the same send in its language. Before, with Customer.io: ```javascript import { APIClient, SendEmailRequest, RegionUS } from "customerio-node" const api = new APIClient(process.env.CUSTOMERIO_APP_API_KEY, { region: RegionUS }) await api.sendEmail( new SendEmailRequest({ transactional_message_id: "3", to: "jane@example.com", identifiers: { id: "user_123" }, message_data: { reset_link: resetLink }, }) ) ``` After, with PostHog: ```javascript import { PostHog } from "posthog-node" const posthog = new PostHog("", { host: "https://us.i.posthog.com", secretKey: process.env.POSTHOG_PROJECT_SECRET_API_KEY, }) const { error } = await posthog.emails.send({ to: "jane@example.com", templateId: "", templateData: { reset_link: resetLink, customer: { first_name: "Jane" } }, distinctId: "user_123", }) ``` For a message with translations, pick the template for the person's language in your code. Customer.io did this for you. ## 4\. Import automations Go to [**Workflows**](https://app.posthog.com/workflows), and click **Import from another tool**, then **Automations, as draft workflows**. Ask your agent with the Customer.io and PostHog MCPs connected, or upload JSON files exported with the Customer.io CLI. ![The Import from Customer.io window, with the preview table of automations, their status, and notes](https://res.cloudinary.com/dmukukwp6/image/upload/w_1600,c_limit,q_auto,f_auto/customerio_automation_import_light_6d570ca936.png) Ask your agentwith the [PostHog MCP](https://posthog.com/docs/workflows/mcp.md)[migrating-from-customer-io](https://posthog.com/docs/workflows/skills.md) “Move our Customer.io campaigns into PostHog.” Copy The import shows a preview first and saves nothing. Each draft gets notes: - **Needs your input before you enable it:** a setting only you can give, such as a sender or a branch condition. - **Works differently in PostHog:** check it. For example, a wait longer than 30 days becomes 30 days. - **Left out:** rebuild it another way, such as an SMS step. Importing a campaign again replaces its draft, and discards any edits you made to that draft. An automation you already turned on never changes. ## 5\. Move push devices Devices reach PostHog when your app registers them with the PostHog SDK, or when you [import your device tokens](https://posthog.com/docs/workflows/push/import-device-tokens.md). Your agent can import them in batches: Ask your agentwith the [PostHog MCP](https://posthog.com/docs/workflows/mcp.md)[importing-push-tokens](https://posthog.com/docs/workflows/skills.md) “Import our Customer.io push devices into our PostHog push channels.” Copy ## 6\. Test and turn on Open each draft, handle its notes, and send a test. Turn on the PostHog automation as you turn off the Customer.io campaign, so nobody gets the same email twice. Right before you stop sending from Customer.io, run the opt-out import again and upload a new CSV, so late unsubscribes come over. See [switch over safely](https://posthog.com/docs/workflows/migrate.md#switch-over-safely) for the full checklist.