npx skills add ...
npx skills add hubspot/agent-cli-skills --skill sales-execution
Log sales activities — calls, notes, meetings, tasks — against contacts and deals, with the mandatory create-then-associate step that makes them visible in the CRM.
npx skills add hubspot/agent-cli-skills --skill sales-execution
| File | When to use |
|---|---|
resources/activity-properties-reference.md | Property names and enum values for calls/notes/meetings/tasks. Keep open while writing objects create — enum values are not discoverable via hubspot properties get today. |
Read bulk-operations/SKILL.md first — this skill assumes its batching, pipe, and dry-run patterns.
1. Activities are invisible until associated. hubspot objects create --type calls ... alone produces a record nobody can see in the CRM UI. Always follow with hubspot associations create --from calls:<id> --to contacts:<id> (and the deal, if relevant) before stopping.
2. Timestamps differ between write and read.
| Path | Field | Format |
|---|---|---|
objects create --property hs_timestamp=... | hs_timestamp | Unix ms (13 digits) |
objects get --type calls <id> returns | properties.hs_timestamp | Unix ms (string) |
activities list --contact <id> returns | timestamp (flat, top-level) | ISO 8601 (e.g. 2024-01-15T10:00:00Z) |
Current Unix ms: $(date +%s)000 (macOS) or $(date +%s%3N) (Linux). activities list rows are {"id","type","timestamp","title","body","status","owner_id"} — the cross-type timeline read shape, no raw property names.
associations list emits {"id","type"} per row; objects get reads from stdin in one batch call (see bulk-operations/SKILL.md "Read in batch").
The deal ID and the task ID must travel together. Persist the deal payload to a file, create tasks (output order matches input order — see bulk-operations), then zip the two ID lists line-by-line and stream association pairs in one call.
For >100 rows, apply the dry-run / digest / confirm pattern from bulk-operations/SKILL.md.
Activities must be associated immediately or they're invisible in the CRM UI. properties get doesn't return enum option values for activity types — use the reference. No sequences/cadences in the CLI.
hubspot associations list --from contacts:149 --to tasks \
| hubspot objects get --type tasks \
--properties hs_task_subject,hs_task_status,hs_task_priority,hs_timestamp \
| jq -c 'select(.properties.hs_task_status != "COMPLETED")'due=$(( $(date -v+7d +%s) * 1000 ))
# 1. Per-deal payload, deal_id retained alongside the create payload.
hubspot objects search --type deals --filter "dealstage=appointmentscheduled" \
--properties dealname \
| jq -c --argjson due "$due" '{deal_id: .id, payload: {properties: {
hs_task_subject: ("Follow up: " + .properties.dealname),
hs_task_priority: "HIGH", hs_task_status: "NOT_STARTED", hs_task_type: "CALL",
hs_timestamp: ($due|tostring)
}}}' > /tmp/deal_tasks.jsonl
# 2. Create tasks; one CLI call for the whole batch.
jq -c '.payload' /tmp/deal_tasks.jsonl \
| hubspot objects create --type tasks > /tmp/created_tasks.jsonl
# 3. Zip and stream association pairs through stdin.
paste \
<(jq -r '.deal_id' /tmp/deal_tasks.jsonl) \
<(jq -r '.id' /tmp/created_tasks.jsonl) \
| jq -Rc 'split("\t") | {from:("tasks:"+.[1]), to:("deals:"+.[0])}' \
| hubspot associations create