communication-history
hubspot/agent-cli-skills
Retrieve CRM activity history and assemble pre-call briefs from calls, emails, notes, meetings, and tasks.
What is communication-history?
Fetches communication history (calls, emails, notes, meetings, tasks) for a CRM record and generates pre-call research briefs. Use this to quickly gather context before customer interactions or to export call transcripts for analysis.
- Retrieve all activities for a contact, deal, company, or ticket sorted newest-first
- Filter activities by type (CALL, EMAIL, NOTE, MEETING, TASK) and limit results to most recent N
- Generate compact activity timelines with date, type, and title
- Assemble multi-part pre-call briefs combining contact info, company details, open deals, and recent activity
- Fetch and export call transcripts by engagement ID or in bulk
How to install communication-history
npx skills add https://github.com/hubspot/agent-cli-skills --skill communication-history- HubSpot CLI installed and authenticated
- Contact, deal, company, or ticket ID for the record to query
How to use communication-history
- 1.Run `hubspot activities list --contact <id>` (or `--deal`, `--company`, `--ticket`) to fetch all activities
- 2.Optionally filter by type with `--type CALL|EMAIL|NOTE|MEETING|TASK` and limit results with `--limit N`
- 3.Pipe output to `jq` to format as compact timeline: `jq -r '"\(.timestamp[0:10]) \(.type) \(.title)"'`
- 4.For pre-call briefs, chain four commands: contact details, associated company, open deals, and recent activity
- 5.Fetch call transcripts with `hubspot activities calls transcript get --call <engagement_id>`
Use cases
- Prepare for a customer call by pulling contact history, company info, and recent interactions
- Export call transcripts for training, compliance, or analysis
- Generate a quick activity timeline to understand relationship history before a meeting
- Retrieve only recent activities (last 30 days) using client-side date filtering
- Dump all call transcripts from the past 100 calls for bulk processing
- Sales representatives preparing for customer calls
- Sales managers reviewing account history
- Customer success teams researching customer context
- Compliance and training teams analyzing call transcripts
communication-history FAQ
The `--limit` parameter has a maximum of 100; pagination with `--after` cursor is not supported. For long histories, use client-side date filtering with `jq` to narrow results.
Use `jq` with ISO 8601 string comparison: `jq -c --arg cutoff "$CUTOFF" 'select(.timestamp > $cutoff)'`. Generate the cutoff date with `date -v-30d +%Y-%m-%dT%H:%M:%SZ` (macOS) or `date -u -d '30 days ago' +%Y-%m-%dT%H:%M:%SZ` (Linux).
Each activity row contains: id, type (CALL|EMAIL|NOTE|MEETING|TASK), timestamp (ISO 8601), title, body, status, and owner_id. Timestamps are ISO 8601; raw Unix millisecond timestamps are available via `hubspot objects get --type calls`.
List all calls with `hubspot objects list --type calls --limit 100`, extract IDs with `jq -r '.id'`, then loop through each with `hubspot activities calls transcript get --call <id>` and redirect to a file.
A pre-call brief combines: contact properties (email, name, phone, job title, lifecycle stage), associated company details (name, domain, industry, revenue), open deals (name, amount, stage, close date), and the 10 most recent activities formatted as a timeline.
Full instructions (SKILL.md)
Source of truth, from hubspot/agent-cli-skills.
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.
Output shape
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.
All activity for a record
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
Client-side date filter
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)'
Compact timeline
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).
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)"'
Transcripts
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.
Constraints
--limitmax 100 and no--aftercursor — long histories can't be paged.bodycan be long; use the compact timeline for skimming.
Related skills
More from hubspot/agent-cli-skills and the wider catalog.

crm-data-quality
Find incomplete records, normalize values in bulk, and dedupe contacts with HubSpot merge operations.

crm-lookup
Find CRM records by ID, email, domain, or name, and traverse associations for complete account context.

custom-object-management
Discover, create, update, and delete custom CRM object schemas in HubSpot.

customer-retention
Identify inactive/at-risk customers and create follow-up tasks at scale via CRM filters.

data-enrichment
Match external records to CRM contacts/companies by email or domain, then upsert enriched data in one pass.

deal-management
Run the full deal lifecycle from CLI — discover pipelines, qualify MQLs, advance/reassign in bulk, hunt stalled deals, and close.