intercom-automation

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Intercom Automation via Rube MCP

通过Rube MCP实现Intercom自动化

Automate Intercom operations through Composio's Intercom toolkit via Rube MCP.
通过Composio的Intercom工具包,借助Rube MCP自动化Intercom操作。

Prerequisites

前置条件

  • Rube MCP must be connected (RUBE_SEARCH_TOOLS available)
  • Active Intercom connection via
    RUBE_MANAGE_CONNECTIONS
    with toolkit
    intercom
  • Always call
    RUBE_SEARCH_TOOLS
    first to get current tool schemas
  • 必须已连接Rube MCP(需提供RUBE_SEARCH_TOOLS)
  • 通过
    RUBE_MANAGE_CONNECTIONS
    完成Intercom的激活连接,工具包为
    intercom
  • 请始终先调用
    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
    intercom
  3. If connection is not ACTIVE, follow the returned auth link to complete Intercom OAuth
  4. Confirm connection status shows ACTIVE before running any workflows
获取Rube MCP:在客户端配置中添加
https://rube.app/mcp
作为MCP服务器。无需API密钥,仅需添加端点即可使用。
  1. 确认
    RUBE_SEARCH_TOOLS
    可正常响应,以此验证Rube MCP是否可用
  2. 调用
    RUBE_MANAGE_CONNECTIONS
    ,指定工具包为
    intercom
  3. 如果连接状态未显示为ACTIVE,请按照返回的授权链接完成Intercom OAuth认证
  4. 在运行任何工作流之前,确认连接状态已显示为ACTIVE

Core Workflows

核心工作流

1. Manage Conversations

1. 对话管理

When to use: User wants to create, list, search, or manage support conversations
Tool sequence:
  1. INTERCOM_LIST_ALL_ADMINS
    - Get admin IDs for assignment [Prerequisite]
  2. INTERCOM_LIST_CONVERSATIONS
    - List all conversations [Optional]
  3. INTERCOM_SEARCH_CONVERSATIONS
    - Search with filters [Optional]
  4. INTERCOM_GET_CONVERSATION
    - Get conversation details [Optional]
  5. INTERCOM_CREATE_CONVERSATION
    - Create a new conversation [Optional]
Key parameters:
  • from
    : Object with
    type
    ('user'/'lead') and
    id
    for conversation creator
  • body
    : Message body (HTML supported)
  • id
    : Conversation ID for retrieval
  • query
    : Search query object with
    field
    ,
    operator
    ,
    value
Pitfalls:
  • CREATE_CONVERSATION requires a contact (user/lead) as the
    from
    field, not an admin
  • Conversation bodies support HTML; plain text is auto-wrapped in
    <p>
    tags
  • Search query uses structured filter objects, not free-text search
  • Conversation IDs are numeric strings
适用场景:用户需要创建、列出、搜索或管理支持对话
工具执行顺序:
  1. INTERCOM_LIST_ALL_ADMINS
    - 获取用于分配的管理员ID【前置步骤】
  2. INTERCOM_LIST_CONVERSATIONS
    - 列出所有对话【可选】
  3. INTERCOM_SEARCH_CONVERSATIONS
    - 使用过滤器搜索对话【可选】
  4. INTERCOM_GET_CONVERSATION
    - 获取对话详情【可选】
  5. INTERCOM_CREATE_CONVERSATION
    - 创建新对话【可选】
关键参数:
  • from
    : 包含
    type
    ('user'/'lead')和
    id
    的对象,代表对话创建者
  • body
    : 消息内容(支持HTML)
  • id
    : 用于检索的对话ID
  • query
    : 包含
    field
    operator
    value
    的搜索查询对象
注意事项:
  • 创建对话(CREATE_CONVERSATION)要求
    from
    字段为联系人(用户/潜在客户),而非管理员
  • 对话内容支持HTML格式;纯文本会自动被包裹在
    <p>
    标签中
  • 搜索查询使用结构化过滤器对象,而非自由文本搜索
  • 对话ID为数字字符串

2. Reply and Manage Conversation State

2. 回复与对话状态管理

When to use: User wants to reply to, close, reopen, or assign conversations
Tool sequence:
  1. INTERCOM_GET_CONVERSATION
    - Get current state [Prerequisite]
  2. INTERCOM_REPLY_TO_CONVERSATION
    - Add a reply [Optional]
  3. INTERCOM_ASSIGN_CONVERSATION
    - Assign to admin/team [Optional]
  4. INTERCOM_CLOSE_CONVERSATION
    - Close conversation [Optional]
  5. INTERCOM_REOPEN_CONVERSATION
    - Reopen closed conversation [Optional]
Key parameters:
  • conversation_id
    /
    id
    : Conversation ID
  • body
    : Reply message body (HTML supported)
  • type
    : Reply type ('admin' or 'user')
  • admin_id
    : Admin ID for replies from admin, assignment, and close/reopen
  • assignee_id
    : Admin or team ID for assignment
  • message_type
    : 'comment' (default) or 'note' (internal)
Pitfalls:
  • admin_id
    is REQUIRED for admin replies, close, reopen, and assignment operations
  • Always fetch admin IDs first with LIST_ALL_ADMINS or IDENTIFY_AN_ADMIN
  • Duplicate sends can occur on retry; implement idempotency checks
  • Internal notes use
    message_type: 'note'
    ; visible only to workspace members
  • Closing requires an admin_id and optional body message
适用场景:用户需要回复、关闭、重新打开或分配对话
工具执行顺序:
  1. INTERCOM_GET_CONVERSATION
    - 获取当前对话状态【前置步骤】
  2. INTERCOM_REPLY_TO_CONVERSATION
    - 添加回复内容【可选】
  3. INTERCOM_ASSIGN_CONVERSATION
    - 将对话分配给管理员/团队【可选】
  4. INTERCOM_CLOSE_CONVERSATION
    - 关闭对话【可选】
  5. INTERCOM_REOPEN_CONVERSATION
    - 重新打开已关闭的对话【可选】
关键参数:
  • conversation_id
    /
    id
    : 对话ID
  • body
    : 回复消息内容(支持HTML)
  • type
    : 回复类型('admin' 或 'user')
  • admin_id
    : 用于管理员回复、分配、关闭/重新打开对话的管理员ID
  • assignee_id
    : 用于分配的管理员或团队ID
  • message_type
    : 'comment'(默认)或 'note'(内部备注)
注意事项:
  • 管理员回复、关闭、重新打开和分配操作必须提供
    admin_id
  • 请始终先通过LIST_ALL_ADMINS或IDENTIFY_AN_ADMIN获取管理员ID
  • 重试时可能会出现重复发送的情况,需实现幂等性检查
  • 内部备注需设置
    message_type: 'note'
    ;仅工作区成员可见
  • 关闭对话需要提供admin_id,可选择附带消息内容

3. Manage Contacts

3. 联系人管理

When to use: User wants to search, view, or manage contacts (users and leads)
Tool sequence:
  1. INTERCOM_SEARCH_CONTACTS
    - Search contacts with filters [Required]
  2. INTERCOM_GET_A_CONTACT
    - Get specific contact [Optional]
  3. INTERCOM_SHOW_CONTACT_BY_EXTERNAL_ID
    - Look up by external ID [Optional]
  4. INTERCOM_LIST_CONTACTS
    - List all contacts [Optional]
  5. INTERCOM_LIST_TAGS_ATTACHED_TO_A_CONTACT
    - Get contact tags [Optional]
  6. INTERCOM_LIST_ATTACHED_SEGMENTS_FOR_CONTACT
    - Get contact segments [Optional]
  7. INTERCOM_DETACH_A_CONTACT
    - Remove contact from company [Optional]
Key parameters:
  • contact_id
    : Contact ID for retrieval
  • external_id
    : External system ID for lookup
  • query
    : Search filter object with
    field
    ,
    operator
    ,
    value
  • pagination
    : Object with
    per_page
    and
    starting_after
    cursor
Pitfalls:
  • SEARCH_CONTACTS uses structured query filters, not free-text; format:
    {field, operator, value}
  • Supported operators:
    =
    ,
    !=
    ,
    >
    ,
    <
    ,
    ~
    (contains),
    !~
    (not contains),
    IN
    ,
    NIN
  • Contact types are 'user' (identified) or 'lead' (anonymous)
  • LIST_CONTACTS returns paginated results; use
    starting_after
    cursor for pagination
  • External IDs are case-sensitive
适用场景:用户需要搜索、查看或管理联系人(用户和潜在客户)
工具执行顺序:
  1. INTERCOM_SEARCH_CONTACTS
    - 使用过滤器搜索联系人【必填】
  2. INTERCOM_GET_A_CONTACT
    - 获取特定联系人详情【可选】
  3. INTERCOM_SHOW_CONTACT_BY_EXTERNAL_ID
    - 通过外部ID查找联系人【可选】
  4. INTERCOM_LIST_CONTACTS
    - 列出所有联系人【可选】
  5. INTERCOM_LIST_TAGS_ATTACHED_TO_A_CONTACT
    - 获取联系人的标签【可选】
  6. INTERCOM_LIST_ATTACHED_SEGMENTS_FOR_CONTACT
    - 获取联系人所属的用户分群【可选】
  7. INTERCOM_DETACH_A_CONTACT
    - 将联系人从公司中移除【可选】
关键参数:
  • contact_id
    : 用于检索的联系人ID
  • external_id
    : 用于查找的外部系统ID
  • query
    : 包含
    field
    operator
    value
    的搜索过滤器对象
  • pagination
    : 包含
    per_page
    starting_after
    游标对象
注意事项:
  • 联系人搜索(SEARCH_CONTACTS)使用结构化查询过滤器,而非自由文本;格式示例:
    {field, operator, value}
  • 支持的操作符:
    =
    !=
    >
    <
    ~
    (包含)、
    !~
    (不包含)、
    IN
    NIN
  • 联系人类型分为'user'(已识别用户)或'lead'(匿名潜在客户)
  • 列出联系人(LIST_CONTACTS)返回分页结果;需使用
    starting_after
    游标进行分页
  • 外部ID区分大小写

4. Manage Admins and Teams

4. 管理员与团队管理

When to use: User wants to list workspace admins or identify specific admins
Tool sequence:
  1. INTERCOM_LIST_ALL_ADMINS
    - List all admins and teams [Required]
  2. INTERCOM_IDENTIFY_AN_ADMIN
    - Get specific admin details [Optional]
Key parameters:
  • admin_id
    : Admin ID for identification
Pitfalls:
  • LIST_ALL_ADMINS returns both admins and teams
  • Admin IDs are required for conversation replies, assignment, close, and reopen
  • Teams appear in the admins list with
    type: 'team'
适用场景:用户需要列出工作区管理员或查找特定管理员
工具执行顺序:
  1. INTERCOM_LIST_ALL_ADMINS
    - 列出所有管理员和团队【必填】
  2. INTERCOM_IDENTIFY_AN_ADMIN
    - 获取特定管理员详情【可选】
关键参数:
  • admin_id
    : 用于识别的管理员ID
注意事项:
  • 列出所有管理员(LIST_ALL_ADMINS)会同时返回管理员和团队信息
  • 对话回复、分配、关闭和重新打开操作需要管理员ID
  • 团队在管理员列表中以
    type: 'team'
    标识

5. View Segments and Counts

5. 用户分群与统计数据查看

When to use: User wants to view segments or get aggregate counts
Tool sequence:
  1. INTERCOM_LIST_SEGMENTS
    - List all segments [Optional]
  2. INTERCOM_LIST_ATTACHED_SEGMENTS_FOR_CONTACT
    - Segments for a contact [Optional]
  3. INTERCOM_LIST_ATTACHED_SEGMENTS_FOR_COMPANIES
    - Segments for a company [Optional]
  4. INTERCOM_GET_COUNTS
    - Get aggregate counts [Optional]
Key parameters:
  • contact_id
    : Contact ID for segment lookup
  • company_id
    : Company ID for segment lookup
  • type
    : Count type ('conversation', 'company', 'user', 'tag', 'segment')
  • count
    : Sub-count type
Pitfalls:
  • GET_COUNTS returns approximate counts, not exact numbers
  • Segment membership is computed; changes may not reflect immediately
适用场景:用户需要查看用户分群或获取聚合统计数据
工具执行顺序:
  1. INTERCOM_LIST_SEGMENTS
    - 列出所有用户分群【可选】
  2. INTERCOM_LIST_ATTACHED_SEGMENTS_FOR_CONTACT
    - 获取联系人所属的用户分群【可选】
  3. INTERCOM_LIST_ATTACHED_SEGMENTS_FOR_COMPANIES
    - 获取公司所属的用户分群【可选】
  4. INTERCOM_GET_COUNTS
    - 获取聚合统计数据【可选】
关键参数:
  • contact_id
    : 用于查找用户分群的联系人ID
  • company_id
    : 用于查找用户分群的公司ID
  • type
    : 统计类型('conversation'、'company'、'user'、'tag'、'segment')
  • count
    : 子统计类型
注意事项:
  • 获取统计数据(GET_COUNTS)返回的是近似值,而非精确数字
  • 用户分群的成员信息是计算得出的;变更可能不会立即生效

6. Manage Companies

6. 公司管理

When to use: User wants to list companies or manage company-contact relationships
Tool sequence:
  1. INTERCOM_LIST_ALL_COMPANIES
    - List all companies [Required]
  2. INTERCOM_LIST_ATTACHED_SEGMENTS_FOR_COMPANIES
    - Get company segments [Optional]
  3. INTERCOM_DETACH_A_CONTACT
    - Remove contact from company [Optional]
Key parameters:
  • company_id
    : Company ID
  • contact_id
    : Contact ID for detachment
  • page
    : Page number for pagination
  • per_page
    : Results per page
Pitfalls:
  • Company-contact relationships are managed through contact endpoints
  • DETACH_A_CONTACT removes the contact-company association, not the contact itself
适用场景:用户需要列出公司或管理公司与联系人的关联关系
工具执行顺序:
  1. INTERCOM_LIST_ALL_COMPANIES
    - 列出所有公司【必填】
  2. INTERCOM_LIST_ATTACHED_SEGMENTS_FOR_COMPANIES
    - 获取公司所属的用户分群【可选】
  3. INTERCOM_DETACH_A_CONTACT
    - 将联系人从公司中移除【可选】
关键参数:
  • company_id
    : 公司ID
  • contact_id
    : 用于解除关联的联系人ID
  • page
    : 分页页码
  • per_page
    : 每页结果数量
注意事项:
  • 公司与联系人的关联关系通过联系人端点进行管理
  • 解除联系人关联(DETACH_A_CONTACT)仅移除联系人与公司的关联关系,不会删除联系人本身

Common Patterns

通用模式

Search Query Filters

搜索查询过滤器

Single filter:
json
{
  "field": "email",
  "operator": "=",
  "value": "user@example.com"
}
Multiple filters (AND):
json
{
  "operator": "AND",
  "value": [
    {"field": "role", "operator": "=", "value": "user"},
    {"field": "created_at", "operator": ">", "value": 1672531200}
  ]
}
Supported fields for contacts: email, name, role, created_at, updated_at, signed_up_at, last_seen_at, external_id
Supported fields for conversations: created_at, updated_at, source.type, state, open, read
单个过滤器:
json
{
  "field": "email",
  "operator": "=",
  "value": "user@example.com"
}
多个过滤器(AND逻辑):
json
{
  "operator": "AND",
  "value": [
    {"field": "role", "operator": "=", "value": "user"},
    {"field": "created_at", "operator": ">", "value": 1672531200}
  ]
}
联系人支持的字段: email, name, role, created_at, updated_at, signed_up_at, last_seen_at, external_id
对话支持的字段: created_at, updated_at, source.type, state, open, read

Pagination

分页处理

  • Most list endpoints use cursor-based pagination
  • Check response for
    pages.next
    with
    starting_after
    cursor
  • Pass cursor in
    pagination.starting_after
    for next page
  • Continue until
    pages.next
    is null
  • 大多数列表端点使用基于游标的分页
  • 检查响应中的
    pages.next
    字段获取
    starting_after
    游标
  • pagination.starting_after
    中传入游标以获取下一页数据
  • 直到
    pages.next
    为null时停止分页请求

Admin ID Resolution

管理员ID获取流程

1. Call INTERCOM_LIST_ALL_ADMINS to get all admins
2. Find the desired admin by name or email
3. Use admin.id for replies, assignments, and state changes
1. 调用INTERCOM_LIST_ALL_ADMINS获取所有管理员信息
2. 通过姓名或邮箱查找目标管理员
3. 使用admin.id进行回复、分配和状态变更操作

Known Pitfalls

常见注意事项

Admin ID Requirement:
  • Admin ID is required for: reply (as admin), assign, close, reopen
  • Always resolve admin IDs first with LIST_ALL_ADMINS
HTML Content:
  • Conversation bodies are HTML
  • Plain text is auto-wrapped in paragraph tags
  • Sanitize HTML input to prevent rendering issues
Idempotency:
  • Replies and conversation creation are not idempotent
  • Duplicate sends can occur on retry or timeout
  • Track message IDs to prevent duplicates
Rate Limits:
  • Default: ~1000 requests per minute (varies by plan)
  • 429 responses include rate limit headers
  • Implement exponential backoff for retries
管理员ID必填项:
  • 以下操作必须提供管理员ID:以管理员身份回复、分配对话、关闭对话、重新打开对话
  • 请始终先通过LIST_ALL_ADMINS获取管理员ID
HTML内容处理:
  • 对话内容为HTML格式
  • 纯文本会自动被包裹在段落标签中
  • 需对HTML输入进行 sanitize 处理,避免渲染问题
幂等性:
  • 回复和对话创建操作不具备幂等性
  • 重试或超时情况下可能会出现重复发送
  • 需跟踪消息ID以防止重复发送
速率限制:
  • 默认限制:约每分钟1000次请求(根据套餐不同有所变化)
  • 429响应中包含速率限制头部信息
  • 重试时需实现指数退避策略

Quick Reference

快速参考

TaskTool SlugKey Params
List conversationsINTERCOM_LIST_CONVERSATIONS(pagination)
Search conversationsINTERCOM_SEARCH_CONVERSATIONSquery
Get conversationINTERCOM_GET_CONVERSATIONid
Create conversationINTERCOM_CREATE_CONVERSATIONfrom, body
Reply to conversationINTERCOM_REPLY_TO_CONVERSATIONconversation_id, body, admin_id
Assign conversationINTERCOM_ASSIGN_CONVERSATIONconversation_id, admin_id, assignee_id
Close conversationINTERCOM_CLOSE_CONVERSATIONid, admin_id
Reopen conversationINTERCOM_REOPEN_CONVERSATIONid, admin_id
Search contactsINTERCOM_SEARCH_CONTACTSquery
Get contactINTERCOM_GET_A_CONTACTcontact_id
Contact by external IDINTERCOM_SHOW_CONTACT_BY_EXTERNAL_IDexternal_id
List contactsINTERCOM_LIST_CONTACTS(pagination)
Contact tagsINTERCOM_LIST_TAGS_ATTACHED_TO_A_CONTACTcontact_id
Contact segmentsINTERCOM_LIST_ATTACHED_SEGMENTS_FOR_CONTACTcontact_id
Detach contactINTERCOM_DETACH_A_CONTACTcontact_id, company_id
List adminsINTERCOM_LIST_ALL_ADMINS(none)
Identify adminINTERCOM_IDENTIFY_AN_ADMINadmin_id
List segmentsINTERCOM_LIST_SEGMENTS(none)
Company segmentsINTERCOM_LIST_ATTACHED_SEGMENTS_FOR_COMPANIEScompany_id
Get countsINTERCOM_GET_COUNTStype, count
List companiesINTERCOM_LIST_ALL_COMPANIESpage, per_page

Powered by Composio
任务工具标识关键参数
列出对话INTERCOM_LIST_CONVERSATIONS(pagination)
搜索对话INTERCOM_SEARCH_CONVERSATIONSquery
获取对话详情INTERCOM_GET_CONVERSATIONid
创建对话INTERCOM_CREATE_CONVERSATIONfrom, body
回复对话INTERCOM_REPLY_TO_CONVERSATIONconversation_id, body, admin_id
分配对话INTERCOM_ASSIGN_CONVERSATIONconversation_id, admin_id, assignee_id
关闭对话INTERCOM_CLOSE_CONVERSATIONid, admin_id
重新打开对话INTERCOM_REOPEN_CONVERSATIONid, admin_id
搜索联系人INTERCOM_SEARCH_CONTACTSquery
获取联系人详情INTERCOM_GET_A_CONTACTcontact_id
通过外部ID查找联系人INTERCOM_SHOW_CONTACT_BY_EXTERNAL_IDexternal_id
列出联系人INTERCOM_LIST_CONTACTS(pagination)
获取联系人标签INTERCOM_LIST_TAGS_ATTACHED_TO_A_CONTACTcontact_id
获取联系人所属分群INTERCOM_LIST_ATTACHED_SEGMENTS_FOR_CONTACTcontact_id
解除联系人与公司关联INTERCOM_DETACH_A_CONTACTcontact_id, company_id
列出管理员INTERCOM_LIST_ALL_ADMINS(none)
获取管理员详情INTERCOM_IDENTIFY_AN_ADMINadmin_id
列出用户分群INTERCOM_LIST_SEGMENTS(none)
获取公司所属分群INTERCOM_LIST_ATTACHED_SEGMENTS_FOR_COMPANIEScompany_id
获取统计数据INTERCOM_GET_COUNTStype, count
列出公司INTERCOM_LIST_ALL_COMPANIESpage, per_page

Composio提供技术支持