activecampaign-automation

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

ActiveCampaign Automation via Rube MCP

通过Rube MCP实现ActiveCampaign自动化

Automate ActiveCampaign CRM and marketing automation operations through Composio's ActiveCampaign toolkit via Rube MCP.
通过Composio的ActiveCampaign工具包,借助Rube MCP自动化ActiveCampaign CRM与营销自动化操作。

Prerequisites

前置条件

  • Rube MCP must be connected (RUBE_SEARCH_TOOLS available)
  • Active ActiveCampaign connection via
    RUBE_MANAGE_CONNECTIONS
    with toolkit
    active_campaign
  • Always call
    RUBE_SEARCH_TOOLS
    first to get current tool schemas
  • 已连接Rube MCP(确保RUBE_SEARCH_TOOLS可用)
  • 通过
    RUBE_MANAGE_CONNECTIONS
    连接ActiveCampaign,使用工具包
    active_campaign
    且连接状态为活跃
  • 请始终先调用
    RUBE_SEARCH_TOOLS
    以获取最新的工具架构

Setup

设置步骤

Get Rube MCP: Add
https://rube.app/mcp
as an MCP server in your client configuration. No API keys needed — just add the endpoint and it works.
  1. Verify Rube MCP is available by confirming
    RUBE_SEARCH_TOOLS
    responds
  2. Call
    RUBE_MANAGE_CONNECTIONS
    with toolkit
    active_campaign
  3. If connection is not ACTIVE, follow the returned auth link to complete ActiveCampaign authentication
  4. Confirm connection status shows ACTIVE before running any workflows
获取Rube MCP:在客户端配置中添加
https://rube.app/mcp
作为MCP服务器。无需API密钥,只需添加该端点即可使用。
  1. 验证Rube MCP是否可用,确认
    RUBE_SEARCH_TOOLS
    能正常响应
  2. 调用
    RUBE_MANAGE_CONNECTIONS
    并指定工具包
    active_campaign
  3. 如果连接状态未显示为活跃,按照返回的认证链接完成ActiveCampaign身份验证
  4. 在运行任何工作流之前,确认连接状态为活跃

Core Workflows

核心工作流

1. Create and Find Contacts

1. 创建与查找联系人

When to use: User wants to create new contacts or look up existing ones
Tool sequence:
  1. ACTIVE_CAMPAIGN_FIND_CONTACT
    - Search for an existing contact [Optional]
  2. ACTIVE_CAMPAIGN_CREATE_CONTACT
    - Create a new contact [Required]
Key parameters for find:
  • email
    : Search by email address
  • id
    : Search by ActiveCampaign contact ID
  • phone
    : Search by phone number
Key parameters for create:
  • email
    : Contact email address (required)
  • first_name
    : Contact first name
  • last_name
    : Contact last name
  • phone
    : Contact phone number
  • organization_name
    : Contact's organization
  • job_title
    : Contact's job title
  • tags
    : Comma-separated list of tags to apply
Pitfalls:
  • email
    is the only required field for contact creation
  • Phone search uses a general search parameter internally; it may return partial matches
  • When combining
    email
    and
    phone
    in FIND_CONTACT, results are filtered client-side
  • Tags provided during creation are applied immediately
  • Creating a contact with an existing email may update the existing contact
适用场景:用户需要创建新联系人或查找已有联系人
工具执行顺序:
  1. ACTIVE_CAMPAIGN_FIND_CONTACT
    - 搜索已有联系人(可选)
  2. ACTIVE_CAMPAIGN_CREATE_CONTACT
    - 创建新联系人(必填)
查找操作关键参数:
  • email
    : 通过邮箱地址搜索
  • id
    : 通过ActiveCampaign联系人ID搜索
  • phone
    : 通过电话号码搜索
创建操作关键参数:
  • email
    : 联系人邮箱地址(必填)
  • first_name
    : 联系人名字
  • last_name
    : 联系人姓氏
  • phone
    : 联系人电话号码
  • organization_name
    : 联系人所属机构
  • job_title
    : 联系人职位
  • tags
    : 要添加的标签,以英文逗号分隔
常见陷阱:
  • email
    是创建联系人时唯一的必填字段
  • 电话号码搜索内部使用通用搜索参数,可能返回部分匹配结果
  • FIND_CONTACT
    中同时传入
    email
    phone
    时,结果会在客户端进行过滤
  • 创建联系人时指定的标签会立即生效
  • 使用已存在的邮箱创建联系人会更新该联系人的现有信息

2. Manage Contact Tags

2. 管理联系人标签

When to use: User wants to add or remove tags from contacts
Tool sequence:
  1. ACTIVE_CAMPAIGN_FIND_CONTACT
    - Find contact by email or ID [Prerequisite]
  2. ACTIVE_CAMPAIGN_MANAGE_CONTACT_TAG
    - Add or remove tags [Required]
Key parameters:
  • action
    : 'Add' or 'Remove' (required)
  • tags
    : Tag names as comma-separated string or array of strings (required)
  • contact_id
    : Contact ID (provide this or contact_email)
  • contact_email
    : Contact email address (alternative to contact_id)
Pitfalls:
  • action
    values are capitalized: 'Add' or 'Remove' (not lowercase)
  • Tags can be a comma-separated string ('tag1, tag2') or an array (['tag1', 'tag2'])
  • Either
    contact_id
    or
    contact_email
    must be provided;
    contact_id
    takes precedence
  • Adding a tag that does not exist creates it automatically
  • Removing a non-existent tag is a no-op (does not error)
适用场景:用户需要为联系人添加或移除标签
工具执行顺序:
  1. ACTIVE_CAMPAIGN_FIND_CONTACT
    - 通过邮箱或ID查找联系人(前置步骤)
  2. ACTIVE_CAMPAIGN_MANAGE_CONTACT_TAG
    - 添加或移除标签(必填)
关键参数:
  • action
    : 'Add'或'Remove'(必填,注意大小写)
  • tags
    : 标签名称,可为英文逗号分隔的字符串或字符串数组(必填)
  • contact_id
    : 联系人ID(需提供该参数或contact_email)
  • contact_email
    : 联系人邮箱地址(contact_id的替代参数)
常见陷阱:
  • action
    参数值需大写:'Add'或'Remove'(不可小写)
  • 标签可以是英文逗号分隔的字符串(如'tag1, tag2')或数组(如['tag1', 'tag2'])
  • 必须提供
    contact_id
    contact_email
    其中一个;
    contact_id
    优先级更高
  • 添加不存在的标签时,系统会自动创建该标签
  • 移除不存在的标签不会触发错误(无操作)

3. Manage List Subscriptions

3. 管理列表订阅

When to use: User wants to subscribe or unsubscribe contacts from lists
Tool sequence:
  1. ACTIVE_CAMPAIGN_FIND_CONTACT
    - Find the contact [Prerequisite]
  2. ACTIVE_CAMPAIGN_MANAGE_LIST_SUBSCRIPTION
    - Subscribe or unsubscribe [Required]
Key parameters:
  • action
    : 'subscribe' or 'unsubscribe' (required)
  • list_id
    : Numeric list ID string (required)
  • email
    : Contact email address (provide this or contact_id)
  • contact_id
    : Numeric contact ID string (alternative to email)
Pitfalls:
  • action
    values are lowercase: 'subscribe' or 'unsubscribe'
  • list_id
    is a numeric string (e.g., '2'), not the list name
  • List IDs can be retrieved via the GET /api/3/lists endpoint (not available as a Composio tool; use the ActiveCampaign UI)
  • If both
    email
    and
    contact_id
    are provided,
    contact_id
    takes precedence
  • Unsubscribing changes status to '2' (unsubscribed) but the relationship record persists
适用场景:用户需要为联系人订阅或取消订阅列表
工具执行顺序:
  1. ACTIVE_CAMPAIGN_FIND_CONTACT
    - 查找目标联系人(前置步骤)
  2. ACTIVE_CAMPAIGN_MANAGE_LIST_SUBSCRIPTION
    - 执行订阅或取消订阅操作(必填)
关键参数:
  • action
    : 'subscribe'或'unsubscribe'(必填,注意大小写)
  • list_id
    : 数字类型的列表ID字符串(必填)
  • email
    : 联系人邮箱地址(需提供该参数或contact_id)
  • contact_id
    : 数字类型的联系人ID字符串(email的替代参数)
常见陷阱:
  • action
    参数值需小写:'subscribe'或'unsubscribe'
  • list_id
    是数字字符串(如'2'),而非列表名称
  • 可通过ActiveCampaign UI获取列表ID(Composio工具暂不支持通过API获取)
  • 若同时提供
    email
    contact_id
    contact_id
    优先级更高
  • 取消订阅会将状态改为'2'(已取消订阅),但关系记录会保留

4. Add Contacts to Automations

4. 将联系人加入自动化流程

When to use: User wants to enroll a contact in an automation workflow
Tool sequence:
  1. ACTIVE_CAMPAIGN_FIND_CONTACT
    - Verify contact exists [Prerequisite]
  2. ACTIVE_CAMPAIGN_ADD_CONTACT_TO_AUTOMATION
    - Enroll contact in automation [Required]
Key parameters:
  • contact_email
    : Email of the contact to enroll (required)
  • automation_id
    : ID of the target automation (required)
Pitfalls:
  • The contact must already exist in ActiveCampaign
  • Automations can only be created through the ActiveCampaign UI, not via API
  • automation_id
    must reference an existing, active automation
  • The tool performs a two-step process: lookup contact by email, then enroll
  • Automation IDs can be found in the ActiveCampaign UI or via GET /api/3/automations
适用场景:用户需要将联系人纳入自动化工作流
工具执行顺序:
  1. ACTIVE_CAMPAIGN_FIND_CONTACT
    - 验证联系人是否存在(前置步骤)
  2. ACTIVE_CAMPAIGN_ADD_CONTACT_TO_AUTOMATION
    - 将联系人加入自动化流程(必填)
关键参数:
  • contact_email
    : 待加入流程的联系人邮箱(必填)
  • automation_id
    : 目标自动化流程的ID(必填)
常见陷阱:
  • 联系人必须已存在于ActiveCampaign中
  • 自动化流程只能通过ActiveCampaign UI创建,无法通过API创建
  • automation_id
    必须指向已存在且处于活跃状态的自动化流程
  • 该工具会执行两步操作:先通过邮箱查找联系人,再将其加入流程
  • 可通过ActiveCampaign UI或GET /api/3/automations接口获取自动化流程ID

5. Create Contact Tasks

5. 创建联系人关联任务

When to use: User wants to create follow-up tasks associated with contacts
Tool sequence:
  1. ACTIVE_CAMPAIGN_FIND_CONTACT
    - Find the contact to associate the task with [Prerequisite]
  2. ACTIVE_CAMPAIGN_CREATE_CONTACT_TASK
    - Create the task [Required]
Key parameters:
  • relid
    : Contact ID to associate the task with (required)
  • duedate
    : Due date in ISO 8601 format with timezone (required, e.g., '2025-01-15T14:30:00-05:00')
  • dealTasktype
    : Task type ID based on available types (required)
  • title
    : Task title
  • note
    : Task description/content
  • assignee
    : User ID to assign the task to
  • edate
    : End date in ISO 8601 format (must be later than duedate)
  • status
    : 0 for incomplete, 1 for complete
Pitfalls:
  • duedate
    must be a valid ISO 8601 datetime with timezone offset; do NOT use placeholder values
  • edate
    must be later than
    duedate
  • dealTasktype
    is a string ID referencing task types configured in ActiveCampaign
  • relid
    is the numeric contact ID, not the email address
  • assignee
    is a user ID; resolve user names to IDs via the ActiveCampaign UI
适用场景:用户需要创建与联系人关联的跟进任务
工具执行顺序:
  1. ACTIVE_CAMPAIGN_FIND_CONTACT
    - 查找要关联任务的联系人(前置步骤)
  2. ACTIVE_CAMPAIGN_CREATE_CONTACT_TASK
    - 创建任务(必填)
关键参数:
  • relid
    : 关联任务的联系人ID(必填)
  • duedate
    : 任务截止时间,需为带时区的ISO 8601格式(必填,示例:'2025-01-15T14:30:00-05:00')
  • dealTasktype
    : 基于可用类型的任务类型ID(必填)
  • title
    : 任务标题
  • note
    : 任务描述/内容
  • assignee
    : 任务负责人的用户ID
  • edate
    : 任务结束时间,需为ISO 8601格式(必须晚于duedate)
  • status
    : 0表示未完成,1表示已完成
常见陷阱:
  • duedate
    必须是带时区偏移的有效ISO 8601时间格式;请勿使用占位符
  • edate
    必须晚于
    duedate
  • dealTasktype
    是指向ActiveCampaign中配置的任务类型的字符串ID
  • relid
    是数字类型的联系人ID,而非邮箱地址
  • assignee
    是用户ID;需通过ActiveCampaign UI将用户名转换为对应ID

Common Patterns

通用流程模式

Contact Lookup Flow

联系人查询流程

1. Call ACTIVE_CAMPAIGN_FIND_CONTACT with email
2. If found, extract contact ID for subsequent operations
3. If not found, create contact with ACTIVE_CAMPAIGN_CREATE_CONTACT
4. Use contact ID for tags, subscriptions, or automations
1. 调用ACTIVE_CAMPAIGN_FIND_CONTACT并传入邮箱
2. 若找到联系人,提取其ID用于后续操作
3. 若未找到,调用ACTIVE_CAMPAIGN_CREATE_CONTACT创建新联系人
4. 使用联系人ID执行标签、订阅或自动化流程相关操作

Bulk Contact Tagging

批量为联系人添加标签

1. For each contact, call ACTIVE_CAMPAIGN_MANAGE_CONTACT_TAG
2. Use contact_email to avoid separate lookup calls
3. Batch with reasonable delays to respect rate limits
1. 对每个联系人调用ACTIVE_CAMPAIGN_MANAGE_CONTACT_TAG
2. 使用contact_email参数以避免单独的查询操作
3. 批量操作时需设置合理延迟,以遵守速率限制

ID Resolution

ID转换

Contact email -> Contact ID:
1. Call ACTIVE_CAMPAIGN_FIND_CONTACT with email
2. Extract id from the response
联系人邮箱 -> 联系人ID:
1. 调用ACTIVE_CAMPAIGN_FIND_CONTACT并传入邮箱
2. 从响应结果中提取id字段

Known Pitfalls

已知常见问题

Action Capitalization:
  • Tag actions: 'Add', 'Remove' (capitalized)
  • Subscription actions: 'subscribe', 'unsubscribe' (lowercase)
  • Mixing up capitalization causes errors
ID Types:
  • Contact IDs: numeric strings (e.g., '123')
  • List IDs: numeric strings
  • Automation IDs: numeric strings
  • All IDs should be passed as strings, not integers
Automations:
  • Automations cannot be created via API; only enrollment is possible
  • Automation must be active to accept new contacts
  • Enrolling a contact already in the automation may have no effect
Rate Limits:
  • ActiveCampaign API has rate limits per account
  • Implement backoff on 429 responses
  • Batch operations should be spaced appropriately
Response Parsing:
  • Response data may be nested under
    data
    or
    data.data
  • Parse defensively with fallback patterns
  • Contact search may return multiple results; match by email for accuracy
操作参数大小写:
  • 标签操作:'Add'、'Remove'(首字母大写)
  • 订阅操作:'subscribe'、'unsubscribe'(全小写)
  • 大小写错误会导致操作失败
ID类型:
  • 联系人ID:数字字符串(如'123')
  • 列表ID:数字字符串
  • 自动化流程ID:数字字符串
  • 所有ID需以字符串形式传递,而非整数
自动化流程限制:
  • 无法通过API创建自动化流程;仅支持将联系人加入已有流程
  • 自动化流程必须处于活跃状态才能接收新联系人
  • 将已在流程中的联系人再次加入可能无任何效果
速率限制:
  • ActiveCampaign API对每个账号有速率限制
  • 收到429响应时需实现退避机制
  • 批量操作需设置合理的时间间隔
响应解析:
  • 响应数据可能嵌套在
    data
    data.data
  • 需采用防御性解析方式,设置回退逻辑
  • 联系人搜索可能返回多个结果;需通过邮箱精确匹配

Quick Reference

快速参考

TaskTool SlugKey Params
Find contactACTIVE_CAMPAIGN_FIND_CONTACTemail, id, phone
Create contactACTIVE_CAMPAIGN_CREATE_CONTACTemail, first_name, last_name, tags
Add/remove tagsACTIVE_CAMPAIGN_MANAGE_CONTACT_TAGaction, tags, contact_email
Subscribe/unsubscribeACTIVE_CAMPAIGN_MANAGE_LIST_SUBSCRIPTIONaction, list_id, email
Add to automationACTIVE_CAMPAIGN_ADD_CONTACT_TO_AUTOMATIONcontact_email, automation_id
Create taskACTIVE_CAMPAIGN_CREATE_CONTACT_TASKrelid, duedate, dealTasktype, title
任务工具标识关键参数
查找联系人ACTIVE_CAMPAIGN_FIND_CONTACTemail, id, phone
创建联系人ACTIVE_CAMPAIGN_CREATE_CONTACTemail, first_name, last_name, tags
添加/移除标签ACTIVE_CAMPAIGN_MANAGE_CONTACT_TAGaction, tags, contact_email
订阅/取消订阅ACTIVE_CAMPAIGN_MANAGE_LIST_SUBSCRIPTIONaction, list_id, email
加入自动化流程ACTIVE_CAMPAIGN_ADD_CONTACT_TO_AUTOMATIONcontact_email, automation_id
创建任务ACTIVE_CAMPAIGN_CREATE_CONTACT_TASKrelid, duedate, dealTasktype, title