migrating-from-customer-io
它能做什么
这项技能指导智能体把自动化消息从 Customer.io 迁移到 PostHog。适合正在更换邮件工具、希望保留现有自动化流程的团队。
适用场景
- ✓当你想把 Customer.io 的自动化迁移到 PostHog 的时候。
- ✓当你想从 Customer.io 切换过来并保留消息流程的时候。
- ✓当你想在保存任何内容之前预览将要导入的内容的时候。
技能链接
https://github.com/PostHog/posthog/blob/master/products/workflows/skills/migrating-from-customer-io/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我们正在离开 Customer.io。你能把我们的自动化迁移到 PostHog,让我以草稿的形式审阅吗?”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会先从 Customer.io 读取每个自动化并预览导入内容。然后它会把这些自动化以草稿形式保存到 PostHog,并指导你哪些地方需要你的输入,之后才会启用任何内容。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Migrating from Customer.io
PostHog imports Customer.io automations as draft workflows. Drafts never send. A person reviews each one, fixes what the import could not carry over, and enables it.
You move the data between two MCP servers. Read from Customer.io's MCP (or the cio CLI), and pass what it returns unchanged to PostHog's workflows-import-customerio. PostHog does the translation, so do not rebuild workflows yourself with workflows-create.
Never move people
Pass automations, templates, sender identities and segment names only. Never fetch or pass customer profiles, segment members, deliveries or event data. The people are usually in PostHog already, and copying them is a privacy risk the user did not ask for.
Keep message content out of your context
Email templates are large, often tens of kilobytes of HTML each. When the PostHog project stored a Customer.io App API key (teams that ran the opt-out import have one), PostHog reads the message content from Customer.io itself. So pass the automation graph first, and read templates only if PostHog asks for them.
Steps
- Confirm the PostHog project. The drafts go into the PostHog MCP's active project. Read it with
project-get, tell the user its name and id, and ask whether the drafts should go there. If not, switch withswitch-projectbefore you read anything from Customer.io. - Find the environment. Ask which Customer.io workspace to migrate if there is more than one. Its id is the
environment_idin every path below. - List the automations.
GET /v1/environments/{environment_id}/campaignswith the Customer.io read tool (cio_read_apion the MCP,cio apion the CLI). It returns 20 per page throughpage(0-based): read every page until one returns fewer than 20. Show the user the list with each automation's state, and ask which to move. Running automations are the usual answer; skip archived ones unless asked. - Read each automation.
GET /v1/environments/{environment_id}/campaigns/{campaign_id}. Keep the response'scampaignobject and its top-levelactionsarray.campaign.actionsdoes not exist. - Read senders and segments.
GET /v1/environments/{environment_id}/identities?type=emailforsender_identities(id,email,name), and the segment list forsegments(id,name,typeonly). PostHog matches each email to the PostHog sender with the same address, and names the segments in its notes. - Preview without templates. Call
workflows-import-customeriowithsource: "customerio",dry_run: true,campaigns: [{campaign, actions}],sender_identitiesandsegments. Up to 50 automations per call. - Read templates only if needed. Go by each automation's notes, not by
content_fetchedalone:trueonly means PostHog read some content, and one automation can still miss its messages. For every automation whose notes say message content was not part of the import, or that PostHog could not read its messages, read the template of every action that has atemplate_idwithGET /v1/environments/{environment_id}/templates/{template_id}, keep thetemplateobject, and preview again withcampaigns: [{campaign, actions, templates}]. Read templates one at a time: listing every template in the workspace times out on large ones. Tell the user that Import from Customer.io on the Workflows Opt-outs tab stores their App API key, which skips this step next time. - Collect snippets and layouts. If a note names a Customer.io snippet, or a template body you read contains
{{ snippets.name }}, read the workspace snippets and pass them assnippets({name: content}). When PostHog read the content itself, it read the snippets too, and a note names any it could not find. If a note names a layout, readGET /v1/environments/{environment_id}/layouts/{layout_id}and pass itsbodyaslayouts({layout_id: body}). - Report the preview. For each automation, give its status and its notes, grouped by level (see below). Ask before importing anything with status
failed; itsvalidation_errorssay why the draft would be rejected. - Import. Call again with
dry_run: falseand the same arguments. Share each draft's link (/workflows/{workflow_id}) and theneeds_inputnotes again, since the team must handle those before enabling.
When you are unsure of an endpoint's parameters, ask for that one endpoint's schema (cio_schema with resource.method). A whole res
常见问题
我客户的资料会被复制吗?
不会。只会迁移自动化、模板、发件人身份和分群名称,绝不会迁移人员或其事件数据。
导入的工作流会立即发送消息吗?
不会。它们以草稿形式导入,必须由人审阅并逐一启用。
导入的草稿会进入哪个 PostHog 项目?
智能体会先与你确认当前使用的 PostHog 项目,确保草稿进入正确的位置。
详情
作者的原始描述
Move Customer.io automations into PostHog as draft workflows. Read each automation with the Customer.io MCP or CLI, preview the import with workflows-import-customerio (dry_run), then import and walk the user through what needs their input. Use when asked to migrate, move, switch, copy or import from Customer.io (customer.io, CIO) to PostHog workflows, including "migrate everything to PostHog".
repo: PostHog/posthog
热度
- GitHub 星标
- 41k
- 排名
- #6982
- 许可证
- —
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
depot-ci
41k帮你的智能体设置并运行 Depot CI 工作流(GitHub Actions 的替代方案),包括迁移现有工作流和读取运行日志。
depot-container-builds
41k帮你的智能体在 Depot 的远程构建器上构建 Docker 镜像,包括多平台镜像、推送到镜像仓库,以及修复构建失败。
depot-github-runners
41k帮你的智能体把 GitHub Actions 任务迁移到 Depot 托管的运行器上,选择运行器规格和标签,并排查运行器设置问题。
editing-agents-md
41k帮你的智能体判断某条规则应写入 AGENTS.md 还是 CLAUDE.md,并以不会让文件臃肿的方式写下,确保规则真正生效。