Communication History

hubspot/agent-cli-skills/communication-history

作者 hubspota8eea0880838无许可证27 个星标收录于 2026年10月8日更新于 2026年10月8日仓库7天前更新

Retrieve activity history (calls, emails, notes, meetings, tasks) for a CRM record and assemble pre-call briefs.

AI 生成的概览

通过 hubspot CLI 获取 CRM 活动历史与通话记录,并整理通话前简报。

功能
该技能说明如何使用 hubspot CLI 拉取 HubSpot CRM 记录的活动历史(通话、邮件、备注、会议、任务),包括客户端日期过滤和精简时间线输出。它还展示如何整合联系人、公司、未结交易和近期活动来生成通话前简报,以及如何获取或批量导出通话与会议记录。它仅为说明文档,不附带脚本。
适用场景
适用于通话前调研、会议准备,或查看某条 CRM 记录的近期沟通历史。也适合需要获取或导出联系人、交易、公司或工单的通话记录时使用。
运行要求
需要 hubspot CLI(含 activities、objects 和 associations 命令)、jq 以及 POSIX shell;文档引用了 bulk-operations/SKILL.md 和 resources/json-patterns.md。隐含需要访问 HubSpot 的网络连接和相应账号凭据。不附带脚本。

Read bulk-operations/SKILL.md first — JSONL piping, batch read, and jq reshape patterns (resources/json-patterns.md) apply. hubspot activities list --help is the source of truth.

Output shape

activities list returns one flat row per activity, sorted newest-first: {id, type, timestamp, lastModified, title, body, status, owner_id}. timestamp and lastModified are ISO 8601; type is CALL|EMAIL|NOTE|MEETING|TASK. Different from the raw hs_call_* / hs_timestamp (Unix ms) on the underlying objects — fetch those with hubspot objects get --type calls if needed.

For point-in-time filtering compare lastModified (hs_lastmodifieddate, when the body was last edited), not timestamp (engagement creation time) — otherwise you include content edited after your cutoff.

All activity for a record

Pass exactly one of --contact, --deal, --company, --ticket (or --type <object_type> --record <id> for any other object type). Use --activity-type CALL|EMAIL|NOTE|MEETING|TASK to filter by activity kind, --limit N for the most recent N. Note --type is now the object-type flag, not the activity-kind filter:

bash
hubspot activities list --contact 73235hubspot activities list --deal 67890 --activity-type CALLhubspot activities list --type subscriptions --record 45123 --activity-type NOTEhubspot activities list --contact 73235 --limit 10

Client-side date filter

ISO 8601 strings compare lexicographically.

bash
CUTOFF=$(date -v-30d +%Y-%m-%dT%H:%M:%SZ)          # macOS# CUTOFF=$(date -u -d '30 days ago' +%Y-%m-%dT%H:%M:%SZ)  # Linuxhubspot activities list --contact 73235 \| jq -c --arg cutoff "$CUTOFF" 'select(.timestamp > $cutoff)'

Compact timeline

bash
hubspot activities list --contact 73235 --limit 20 \| jq -r '"\(.timestamp[0:10])  \(.type)  \(.title)"'

Pre-call brief

Four piped commands: contact + company + open deals + activity. Use batch objects get over stdin — never xargs -I{} (see bulk-operations/SKILL.md).

bash
cid=73235echo "=== Contact ==="hubspot objects get --type contacts $cid \  --properties email,firstname,lastname,phone,jobtitle,lifecyclestage --format table
echo "=== Company ==="hubspot associations list --from contacts:$cid --to companies \| jq -c '{id}' \| hubspot objects get --type companies --properties name,domain,industry,annualrevenue --format table
echo "=== Open Deals ==="hubspot associations list --from contacts:$cid --to deals \| jq -c '{id}' \| hubspot objects get --type deals --properties dealname,amount,dealstage,closedate,hs_is_closed \| jq -c 'select(.properties.hs_is_closed != "true")'
echo "=== Recent Activity ==="hubspot activities list --contact $cid --limit 10 \| jq -r '"\(.timestamp[0:10])  \(.type)  \(.title)"'

Transcripts

Fetch the transcript for a single call or meeting by its activity ID (from hubspot activities list). Defaults to CALL; pass --activity-type MEETING for a meeting, and --fields to limit which enrichment fields are fetched:

bash
hubspot activities transcript get 54321hubspot activities transcript get 54321 --activity-type MEETINGhubspot activities transcript get 54321 --fields recordingUrl,aiSummary

Dump all call transcripts to a file:

bash
hubspot objects list --type calls --limit 100 --properties hs_call_title \| jq -r '.id' \| while read -r call_id; do    hubspot activities transcript get "$call_id"  done > /tmp/transcripts.jsonl

Output shape: {"transcriptId":"...","activityId":...,"transcriptSource":"...","transcriptStatus":"READY","numUtterances":3,"recordingUrl":"...","aiSummary":"...","transcriptionProvider":null,"utterances":[...],"createdAt":"...","updatedAt":"..."}. transcriptStatus, numUtterances, recordingUrl, aiSummary, and transcriptionProvider are the five enrichment fields — present only on enriched transcripts, and --fields limits which are fetched. The utterances array holds the speech content; empty if no transcript was recorded or uploaded.

Deleting a transcript is irreversible: hubspot activities transcript delete <id> --dry-run first, then re-run with --digest/--confirm (confirm the target name from the preview line).

Constraints

  • --limit defaults to 100 and there is no --after cursor — long histories can't be paged. body can be long; use the compact timeline for skimming.

来源与署名

来源:hubspot/agent-cli-skills位于communication-history提交a8eea08

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架