Move from Customer.io

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:

Install the PostHog MCP

npx @posthog/wizard mcp add

Then ask:

“Move our email from Customer.io to PostHog.”

What moves

From Customer.ioIn PostHog
Subscription topicsMarketing categories
Global unsubscribes and topic preferencesOpt-outs
Bounced and invalid addressesSuppression list. Blocks all email.
Spam reportsSuppression list. Blocks marketing email.
Transactional messagesTransactional emails, one for each message and each translation
ContactsPeople who already exist, matched by email. Pick New people from contacts too to create a person for each email that matches nobody.
CampaignsDraft automations, with their emails, snippets, layouts, and images
Push device tokensDevices 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, 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 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

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

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 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("<ph_project_token>", {
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: "<template_id>",
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, 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

“Move our Customer.io campaigns into PostHog.”

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. Your agent can import them in batches:

Ask your agentimporting-push-tokens
“Import our Customer.io push devices into our PostHog push channels.”

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 for the full checklist.

Still have questions?

Was this page useful?