登录开始免费试用
Meta Tech Provider

用 AI 助手修改 WhatsApp 自动化

你可以通过 easyCoexistence MCP 连接器,让 AI 助手修改 WhatsApp 自动化:AI 先用 list_automations 读取自动化,再用 update_automation 提交修改,最后用 test_automation 测试。未包含的字段保留原值;但发送的 trigger、steps 列表或 settings 对象会整体替换旧内容,因此 AI 必须从当前版本开始。

Whole list

update_automation 在发送 steps 时整体替换步骤列表;未包含的字段保留原值。

4 and 10

部分 settings 对象未设置时,暂停时长和每个聊天每小时 AI 回复数会使用默认值。

60 steps

自动化可包含的步骤数上限,包含分支(每条线路 30 个,嵌套 4 层);Stop 只能作为所在线路的最后一步。

30 days

每个自动化保留运行记录;编辑时保留,删除自动化时一并删除。

Superseded

通过 connection_id 将自动化迁移到另一号码,会立即结束其等待中的运行,状态为 superseded 并跳过。

让 AI 修改自动化时会发生什么?

共三次工具调用,外加稍后一次。AI 调用 list_automations,可选择带上号码的 connection_id,获取每个自动化的 trigger、steps、settings、status 以及是否已开启。随后构建新版本,并使用 automation_id 通过 update_automation 提交。接着用示例消息运行 test_automation,它会真实执行已保存的步骤(包括 AI 和 Webhook),但不会向任何人发送消息。客户发消息之后,list_automation_runs 会显示新版本是否已回复,以及某次运行被跳过的原因。

1list_automationsRead the current trigger, steps and settings
2update_automationSend the changed version
3test_automationRun it on a sample message, nothing sent
4list_automation_runsCheck real runs after customers write

update_automation 整体替换哪些字段?

合并只在顶层逐字段进行。调用中未包含的字段保留已存储的值;发送的字段会完全替换已存储的值,内部不做合并。因此修改一个关键词就要发送完整的 trigger,修改一个步骤就要发送全部步骤。控制台编辑器的工作方式相同,因为它每次都会保存完整的自动化:

If left outIf sent
nameKeptReplaced
enabledKeptReplaced: true is on, false is off
triggerKeptReplaced whole: type, match, keywords, mode and hours together
stepsKeptReplaced whole: the new list is the full automation
settingsKeptReplaced whole: a missing field returns to its default
connection_idStays on its numberMoves it to that number

为什么 AI 修改前必须先读取自动化?

因为部分列表或对象会悄悄删除未包含的内容。要求修改三步自动化中第 2 步的文字时,如果 AI 只发送新的第 2 步,自动化就只剩一步。要求添加关键词时,如果 AI 只发送 {"keywords": ["menu"]},它会发送一个缺少 type 和 match 的 trigger,这会被拒绝。要求把暂停时间设为 8 小时时,如果 AI 只发送 {"takeoverHours": 8},每个聊天每小时的 AI 回复数也会被重置为 10,无论原来是多少。

安全的做法是读取、编辑文案,然后把完整字段发回。请求中说明“修改前先读取自动化,并把完整的 steps 列表发回”,大多数助手都会照做;要求它提供修改前后的摘要,可以在测试前发现被丢失的步骤。

正确的修改是什么样的?

这里,所有者要求修改关键词为“价格”的自动化中第二步的价格表文字。AI 先读取了该自动化,保持第 1 步和 Stop 不变,并把全部三个步骤发回,只改动第 2 步的文字。名称、enabled、trigger 和 settings 都未包含在调用中,因此保留原值。

update_automation sending the full steps list (example)
{
  "automation_id": "<from list_automations>",
  "steps": [
    { "type": "reply_text", "text": "Hi {{first_name}}! Here is our price list:" },
    { "type": "reply_text", "text": "Sourdough $7 · Croissant $3.50 · Cakes from $38. Delivery $4 within 5 km." },
    { "type": "stop" }
  ]
}

正在进行中的运行会怎样?

修改会应用于下一条触发该自动化的消息,停在 Wait 步骤的运行也会采用新版本。等待中的运行恢复时,会从其停止的步骤编号处,继续执行自动化当前的步骤。如果修改在该位置之前插入或删除了步骤,恢复的运行就会落在与原计划不同的步骤上。因此,应在没有任何等待中的运行时编辑后续跟进的自动化,或接受等待中的运行会沿用新列表。

有两种修改会停止等待中的运行。将 enabled 设为 false 后,它们在被唤醒时会以跳过结束,原因为“Automation is off”。通过 connection_id 将自动化迁移到另一号码,会立即将它们结束,标记为 superseded。

哪些请求效果好?

请求应指明自动化,并用你自己的话描述想要的结果,使用你的助手能理解的任何语言。AI 会把它翻译成字段,先读取当前版本,并把完整字段发回;你需要核对修改前后的摘要和测试回复。只涉及 enabled 的请求,是唯一可以单独发送的修改:

"Add the keywords cardápio and menú"Full trigger sent back with the new keywords added
"Close at 20:00 on Saturdays"Full trigger sent back with the new hours
"Make the AI answers shorter"Full steps sent back with a length rule in the prompt
"Wait 2 hours instead of 1"Full steps sent back, wait minutes changed to 120
"Stay quiet 8 hours after I reply"Full settings sent back with takeoverHours 8
"Turn off the away message"Only enabled false sent, everything else kept

AI 不能通过这种方式修改哪些内容?

AI 密钥只能在控制台的 AI keys 下录入:没有任何工具能接收或返回密钥;如果修改为某个未保存密钥的服务商添加 Reply with AI 步骤,会被拒绝,并提示“save your ... API key on the Automations page first”。已批准模板的内容归 Meta 审核管理:请用 create_template 请求新模板,待批准后再把步骤指向它。号码的消息路由由 set_inbound_mode 设置,这是另一个独立工具。其他拒绝情况会以普通消息返回,AI 可以修正后重新发送,例如“Stop must be the last step”、“Add at least one keyword”,或时区无效。

设置方法

  1. Name the automationTell your AI which automation and which number, or ask it to list your automations first.
  2. Describe the result you wantSay what should change and ask it to read the automation first and send full fields back.
  3. Review the before and afterAsk for a short summary of the old and new trigger, steps and settings, and check nothing was dropped.
  4. Test the new versionHave it run test_automation with a message that should trigger the change, and read the reply.
  5. Check the first real runsAfter customers write, ask it to read list_automation_runs and explain any skipped or failed run.

常见错误

  • 只发送改动的设置。只含 takeoverHours 的 settings 对象会将每个聊天每小时的 AI 回复数重置为默认值 10。
  • 等待跟进时增删步骤。等待中的运行会按原步骤编号在新列表中恢复,可能执行错误的步骤。
  • 让 AI 重写整个 Instructions 来修改一个事实。应只让它修改那一行,使其他已测试的文字保持不变。
  • 同时在控制台和 AI 中编辑同一个自动化。两者都会保存完整的自动化,因此最后一次保存生效,另一处的修改会丢失。
使用 EasyCoexistence 完成这些操作

easyCoexistence 让你的 AI 通过一个超过 30 个工具的 MCP 连接器,按名称修改你的 WhatsApp 自动化:读取自动化、发送完整的新版本、在不发送任何消息的情况下测试,并在之后读取运行记录。号码全程保留在 WhatsApp Business 应用中。每个已连接号码每月 US$ 9 起,降至 US$ 0.75,号码越多单价越低,前 3 天免费试用。

常见问题

我可以撤销修改吗?

可以,前提是你保留了之前的版本。修改前请让 AI 显示当前的自动化,并保存该回复;要撤销时,让它用 update_automation 把该版本发回即可。系统没有自动的版本历史。

ChatGPT 或 Claude 在修改自动化前会先询问吗?

ChatGPT 可能会要求你确认 update_automation 等写入类工具调用。在 Claude 中,你可以在 Customize > Connectors 下为每个工具设置权限,包括对你不希望它调用的工具设为 Blocked。

编辑能否修复因密钥被拒而暂停的自动化?

在 AI keys 下保存一个可用的密钥后,它会自动重新启动。编辑时如果删除了已暂停服务商的 AI 步骤,自动化也会恢复为 active 状态。

编辑需要付费吗?

不需要。编辑和自动化已包含在每个号码的价格中。使用 Reply with AI 步骤的 test_automation 调用会消耗你自己 AI 密钥的 token,由你的服务商计费。

继续阅读

准备开始了吗?

几分钟即可设置 WhatsApp Coexistence,而不是几个月。应用会继续在手机上运行。

开始免费试用

验证时间