Loading...
Loading...
Retrieve activity history (calls, emails, notes, meetings, tasks) for a CRM record and assemble pre-call briefs.
npx skill4agent add hubspot/agent-cli-skills communication-historybulk-operations/SKILL.mdjqresources/json-patterns.mdhubspot activities list --helpactivities list{id, type, timestamp, title, body, status, owner_id}timestamptypeCALL|EMAIL|NOTE|MEETING|TASKhs_call_*hs_timestamphubspot objects get --type calls--contact--deal--company--ticket--type CALL|EMAIL|NOTE|MEETING|TASK--limit Nhubspot activities list --contact 73235
hubspot activities list --deal 67890 --type CALL
hubspot activities list --contact 73235 --limit 10CUTOFF=$(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)"'objects getxargs -I{}bulk-operations/SKILL.mdcid=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)"'hubspot activities calls transcript get --call 54321hubspot 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{"transcriptId":"...","engagementId":...,"transcriptSource":"...","utterances":[...],"createdAt":...}utterances--limit--afterbody