SuperAPI AI 工具集

hubspot-list-emails

办公与效率

查看项目

更新于 10-15 08:14

技能介绍

用途

hubspot-list-emails 是一个专门用于从 HubSpot CRM 中列出邮件互动记录(email engagements)的技能。当用户表达“list emails”“show emails”“email history”“hubspot emails”等意图时加载,返回已记录的邮件数据。

主要能力

  • 列出 HubSpot CRM 中的邮件互动记录,默认返回 10 封。
  • 支持通过 --limit 参数自定义返回数量。
  • 支持通过 --after 参数传入分页游标,实现分页获取。
  • 输出 JSON 格式结果,包含邮件 ID 及属性(主题、正文、方向、状态、时间戳)。
  • 提供便于阅读的展示格式,逐条列出邮件主题、方向、状态、日期、预览和 ID。

使用方式

运行前需先执行配置检查:

python 00-system/skills/hubspot/hubspot-master/scripts/check_hubspot_config.py --json

若 ai_action 不是 proceed_with_operation,则需按照 hubspot-connect 设置指南进行配置。

基本列出(默认 10 封邮件):

python 00-system/skills/hubspot/hubspot-master/scripts/list_emails.py --json

指定数量:

python 00-system/skills/hubspot/hubspot-master/scripts/list_emails.py --limit 25 --json

分页:

python 00-system/skills/hubspot/hubspot-master/scripts/list_emails.py --after "cursor_value" --json

输出格式

JSON 输出包含 results 数组和 paging 对象。results 中每项包含 id 和 properties,properties 内含 hs_email_subject、hs_email_text、hs_email_direction、hs_email_status、hs_timestamp。paging.next.after 提供下一页游标。

展示格式示例:

Found {count} emails:

1. Follow up on proposal
   Direction: Sent
   Status: SENT
   Date: 2025-12-13 10:00
   Preview: Hi John, following up on...
   ID: 14389550562

邮件方向取值

  • EMAIL:外发(已发送)
  • INCOMING_EMAIL:接收(收到)
  • FORWARDED_EMAIL:转发

错误处理

  • 401:令牌无效,需重新运行设置。
  • 403:缺少 crm.objects.emails.read 权限范围。
  • 429:触发速率限制,需等待后重试。

相关技能

  • hubspot-log-email:记录新邮件。
  • hubspot-get-associations:获取邮件关联的联系人。

适用场景与限制

适用于需要查看 HubSpot CRM 中邮件往来历史的场景,例如销售跟进、客户沟通记录查询。使用前需完成 HubSpot 连接配置并具备相应读取权限。具体平台支持、收费情况等资料暂未提供。