把Mail Niaga连接到Make(Integromat)或Zapier
Make(以前叫Integromat)和Zapier可以把Mail Niaga连接到很多其他App。两者都使用Mail Niaga API。你可以把新的订阅者发送到名单,或从Mail Niaga获取营销活动事件。
本文适合熟悉Make或Zapier的用户。你需要Mail Niaga控制台的API页面上的API token(在侧边菜单点击API,然后点击Copy)。请看取得和更换你的API token和使用Mail Niaga API。
从Make或Zapier添加订阅者
Section titled “从Make或Zapier添加订阅者”在Make,使用HTTP module(Make a request)。在Zapier,使用Webhooks by Zapier的POST action。按以下方式设置请求:
| 设置 | 值 |
|---|---|
| Method | POST |
| URL | https://manage.mailniaga.com/api/v1/subscribers |
| Header | Authorization: Bearer YOUR_API_TOKEN和Accept: application/json |
list_uid |
你的Mail Niaga名单的UID |
EMAIL |
订阅者的电邮地址(必填) |
FIRST_NAME、LAST_NAME和其他名单栏位 |
选填,按照你名单里的栏位 |
status |
选填:subscribed、unsubscribed或unconfirmed |
tag |
选填:订阅者的标签,用逗号分开 |
请把YOUR_API_TOKEN换成你的token。要获取list_uid,请用同样的header发送GET到https://manage.mailniaga.com/api/v1/lists。响应会列出每个名单和它的UID。
要查看所有endpoint和参数,请在侧边菜单点击API。然后点击View full API documentation。
如果API回复“List not found”,请检查你的list_uid和token。如果API回复“Subscriber quota exceeded for this plan”、“Per-list subscriber quota exceeded”或“List quota exceeded”,表示你的账户或名单已经达到你配套的订阅者上限。
把营销活动事件当作触发器
Section titled “把营销活动事件当作触发器”营销活动webhook会把Open、Click或Unsubscribe事件发送到Make或Zapier。按以下步骤操作:
- 在Make加入Webhooks module(custom webhook)。在Zapier选择Webhooks by Zapier触发器(Catch Hook)。复制工具给你的webhook URL。
- 在Mail Niaga控制台的侧边菜单点击Email。在你的营销活动那一行点击Edit,然后前往Setup步骤。
- 打开Advanced Settings,打开Webhooks卡片,然后点击Manage。
- 在Manage Webhooks弹窗,点击Add webhook。
- 选择Webhook type,把webhook URL贴到Endpoint URL,然后点击Add webhook。
每次事件发生时,Mail Niaga都会以JSON发送事件资料。关于资料格式,请看营销活动webhook。
- 用新的电邮地址测试。Mail Niaga会拒绝已经在名单里的地址。
- 把token放在连接设置里,不要写在scenario备注里。这个token可以访问你账户的资料。
常见问题
Make或Zapier里有Mail Niaga App吗?
请在Make使用HTTP module,或在Zapier使用Webhooks by Zapier,搭配Mail Niaga API。这个方法不需要专用的App。
Integromat还存在吗?
Integromat的新名称是Make。为旧newsletter系统做的旧scenario,不能用在现在的Mail Niaga控制台。请用API创建新的scenario。
我可以通过Make连接WooCommerce吗?
目前,Mail Niaga控制台没有WooCommerce整合。你可以按照本文的方法,用HTTP module和API把网店顾客发送到名单。
