> AI agents: this is one page from PostHog's docs. Full index of Markdown docs for LLMs: https://posthog.com/llms.txt # Move from Resend Canonical URL: https://posthog.com/docs/workflows/migrate/resend > **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) - [Run the import](#run-the-import) - [Switch your sending](#switch-your-sending) PostHog imports your Resend suppression list, unsubscribes, topics, contacts, templates, and automations in one background import. 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-email-providers](https://posthog.com/docs/workflows/skills.md) “Move our email from Resend to PostHog.” Copy ## What moves | From Resend | In PostHog | | --- | --- | | Suppression list | [Suppression list](https://posthog.com/docs/workflows/email/suppression.md). Hard bounces block all email. Spam complaints and addresses your team added block marketing email only, so they still get transactional email. Resend blocks all email to them. | | Unsubscribed contacts | Opted out of all marketing email | | Public topics, and who opted out of each | Marketing [categories](https://posthog.com/docs/workflows/email/opt-outs.md) and opt-outs | | Contacts and their properties | People who already exist, matched by email, with their first and last name. Pick **New people from contacts** too to create a person for each email that matches nobody, and **Contact properties** to copy custom properties. A cohort of all contacts, and one for each segment. | | Templates | Templates, keyed by their Resend alias | | Automations | Draft automations | | Domains | A list, so you know which to add | API keys, webhooks, private topics, send history, and stats stay in Resend. ## Run the import 1. Create an API key at [resend.com/api-keys](https://resend.com/api-keys) with **Full access**. Resend has no read-only keys, so PostHog refuses a sending-only key. PostHog only reads, and deletes the key when the import ends. 2. Go to [**Messaging** > **Opt-outs**](https://app.posthog.com/workflows/opt-outs) and click **Import from another tool**. 3. Pick **Resend**, paste the key, pick what to import, and click **Start import**. ![The Resend import, with the key field and the list of steps](https://res.cloudinary.com/dmukukwp6/image/upload/w_1600,c_limit,q_auto,f_auto/resend_import_light_0cef6ddab4.png) Resend shares topic preferences and contact properties one contact at a time, so PostHog reads about 25,000 contacts an hour. If the import stops partway, start it again with the key, and it picks up where it left off. The **Contacts** step needs **Suppression list**, **Unsubscribed contacts**, and **Topic preferences** in the same import, so nobody who left in Resend gets marketing email. Each person it creates or updates counts as an event on your bill. ## Switch your sending ### 1\. Set up your domain [Set up your domain](https://posthog.com/docs/workflows/domain.md) in PostHog, and publish its DNS records. PostHog needs its own records, even for a domain that already sends through Resend. Keep Resend's records until nothing sends through it. If Resend uses the `feedback` subdomain, pick another MAIL FROM subdomain in PostHog. The import says when this applies. ### 2\. Move your transactional email Change your code one email at a time, starting with a low-risk one. You need a [project secret API key](https://posthog.com/docs/workflows/transactional/send-from-code.md#create-an-api-key). 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. If your code writes the HTML, send it as it is. Name the email with a `templateKey`, so PostHog groups its metrics and logs. Before, with Resend: ```javascript import { Resend } from "resend" const resend = new Resend(process.env.RESEND_API_KEY) const { error } = await resend.emails.send({ from: "Hedgebox ", to: "jane@example.com", subject: "Reset your password", html, }) ``` 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({ from: "Hedgebox ", to: "jane@example.com", templateKey: "password-reset", subject: "Reset your password", html, distinctId: userId, }) ``` If you send a Resend template, the import copied it into PostHog. The import doesn't make it transactional, because it can't tell which templates your app sends, and a transactional email skips opt-outs and the frequency cap. Open it in the [email library](https://posthog.com/docs/workflows/email/library.md), [make it transactional](https://posthog.com/docs/workflows/transactional/templates.md#use-an-existing-template), and copy its template ID from its **API** tab. Pass the same variables. Resend fills `FIRST_NAME`, `LAST_NAME`, and `EMAIL` from the contact. PostHog doesn't, so pass them too. Before, with Resend: ```javascript const { error } = await resend.emails.send({ from: "Hedgebox ", to: "jane@example.com", template: { id: "welcome", variables: { PLAN: "Pro" } }, }) ``` After, with PostHog: ```javascript const { error } = await posthog.emails.send({ to: "jane@example.com", templateId: "", templateData: { FIRST_NAME: "Jane", PLAN: "Pro" }, distinctId: userId, }) ``` A send to an address on the [suppression list](https://posthog.com/docs/workflows/email/suppression.md) fails with `recipient_suppressed`. Don't retry it. ### 3\. Turn on your automations Each imported automation is a draft, and lists the events your app must send to PostHog. Turn each one on as you turn off the Resend one, so nobody gets the same email twice. ### Watch for - **Suppressions:** spam complaints and addresses your team added still get transactional email in PostHog. Resend blocks all email to them. - **Images:** the import keeps each image's address. An image that Resend hosts stops loading once you close your Resend account, so copy it into PostHog first. Ask your agentwith the [PostHog MCP](https://posthog.com/docs/workflows/mcp.md)[migrating-from-email-providers](https://posthog.com/docs/workflows/skills.md) “Copy the images that Resend hosts in our imported templates into PostHog, and point the templates at the copies.” Copy See [switch over safely](https://posthog.com/docs/workflows/migrate.md#switch-over-safely) for the full checklist.