Duaer

应用配方

在 Duaer 里把 HubSpot 新商机推送到 Slack

在 Duaer 里,HubSpot 新建商机后把名称、金额和阶段推到 Slack。可以用 HubSpot Trigger 实时推送,也可以每几分钟查一次。

做法一:HubSpot Trigger 实时推送

  1. 按 Duaer 里的 HubSpot 凭证 建两条凭证:HubSpot Developer API(给触发器,要开发者账号里的应用)和 HubSpot Service Key(给读取商机)。
  2. 加 HubSpot Trigger,Events 里加 Deal Created。
  3. 接 HubSpot 节点,Resource 选 Deal,Operation 选 Get,Deal ID 填 {{ $json.dealId }}。推送里只有编号,名称和金额要再读一次。
  4. 接 Slack,消息写:新商机 {{ $json.properties.dealname.value }},金额 {{ $json.properties.amount.value }},阶段 {{ $json.properties.dealstage.value }}。
  5. 发布数字组织。

做法二:不建开发者应用,每 5 分钟查一次

  1. 加 Schedule Trigger,每 5 分钟。
  2. 接 HubSpot 节点(Service Key 凭证),Resource 选 Deal,Operation 选 Get Recently Created/Updated。
  3. 接 Remove Duplicates,选 Remove Items Processed in Previous Executions,Value to Dedupe On 填 {{ $json.dealId }},只放行没推过的。
  4. 接 Slack,消息同上。

去重的细节见 在 Duaer 里去重。

常见问题

Duaer 的 HubSpot Trigger 为什么要开发者账号?

HubSpot 只通过开发者应用推送事件,所以 Duaer 的 HubSpot Trigger 用 HubSpot Developer API 凭证。不想建应用时用定时查询加去重。

Duaer 收到的 HubSpot 商机为什么没有名称?

HubSpot 推送只带商机编号。在 Duaer 里接 HubSpot 节点的 Deal Get 再读一次。

同组