بنقرة واحدة
communication-history
// Retrieve activity history (calls, emails, notes, meetings, tasks) for a CRM record and assemble pre-call briefs.
// Retrieve activity history (calls, emails, notes, meetings, tasks) for a CRM record and assemble pre-call briefs.
Build a targeted contact segment by filtering on lifecycle, engagement, jobtitle, geography, or firmographics — then export it as JSONL for a campaign or downstream tool.
Foundation patterns for the `hubspot` CLI — JSONL piping, batch read, pagination, dry-run/digest/confirm for destructive ops, and `hubspot history` for recovery. Every other skill builds on this one.
Find incomplete records, normalize field values in bulk, dedupe with `hubspot objects merge`, and audit custom properties. Builds on `bulk-operations` for JSONL piping and dry-run/digest/confirm.
Find a specific CRM record by ID, email, domain, or name fragment, and traverse associations for the full account picture.
Discover, create, update, and delete custom CRM object schemas. Use when defining a new object type, inspecting existing schemas, or removing one. Record CRUD on custom objects is identical to standard objects — see `bulk-operations`.
Identify inactive/at-risk customers via CRM filters and create follow-up tasks at scale. Builds on `bulk-operations`; defers activity-creation specifics to `sales-execution`.
| name | communication-history |
| description | Retrieve activity history (calls, emails, notes, meetings, tasks) for a CRM record and assemble pre-call briefs. |
| triggers | ["pre-call research","call history","email history","recent activity","communication history","meeting prep","transcripts","call transcripts","dump transcripts","fetch transcripts","call recordings","export transcripts"] |
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.
activities list returns one flat row per activity, sorted newest-first: {id, type, timestamp, title, body, status, owner_id}. timestamp is 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.
Pass exactly one of --contact, --deal, --company, --ticket. Use --type CALL|EMAIL|NOTE|MEETING|TASK to filter, --limit N for the most recent N:
hubspot activities list --contact 73235
hubspot activities list --deal 67890 --type CALL
hubspot activities list --contact 73235 --limit 10
ISO 8601 strings compare lexicographically.
CUTOFF=$(date -v-30d +%Y-%m-%dT%H:%M:%SZ) # macOS
# CUTOFF=$(date -u -d '30 days ago' +%Y-%m-%dT%H:%M:%SZ) # Linux
hubspot activities list --contact 73235 \
| jq -c --arg cutoff "$CUTOFF" 'select(.timestamp > $cutoff)'
hubspot activities list --contact 73235 --limit 20 \
| jq -r '"\(.timestamp[0:10]) \(.type) \(.title)"'
Four piped commands: contact + company + open deals + activity. Use batch objects get over stdin — never xargs -I{} (see bulk-operations/SKILL.md).
cid=73235
echo "=== 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)"'
Fetch the transcript for a single call by engagement ID:
hubspot activities calls transcript get --call 54321
Dump all call transcripts to a file:
hubspot objects list --type calls --limit 100 --properties hs_call_title \
| jq -r '.id' \
| while read -r call_id; do
hubspot activities calls transcript get --call "$call_id"
done > /tmp/transcripts.jsonl
Output shape: {"transcriptId":"...","engagementId":...,"transcriptSource":"...","utterances":[...],"createdAt":...}. The utterances array contains the speech content; it will be empty if no transcript was recorded or uploaded.
--limit max 100 and no --after cursor — long histories can't be paged. body can be long; use the compact timeline for skimming.