communication-history

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
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.
请先阅读
bulk-operations/SKILL.md
——JSONL管道、批量读取以及
jq
重塑模式(详见
resources/json-patterns.md
)均适用。
hubspot activities list --help
是权威参考来源。

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.
activities list
会返回每条活动对应的一行扁平数据,按最新优先排序:
{id, type, timestamp, title, body, status, owner_id}
timestamp
采用ISO 8601格式;
type
取值为
CALL|EMAIL|NOTE|MEETING|TASK
。这与底层对象中的原始
hs_call_*
/
hs_timestamp
(Unix毫秒)不同——如有需要,可使用
hubspot objects get --type calls
获取原始数据。

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:
bash
hubspot activities list --contact 73235
hubspot activities list --deal 67890 --type CALL
hubspot activities list --contact 73235 --limit 10
必须传入
--contact
--deal
--company
--ticket
中的其中一个参数。使用
--type CALL|EMAIL|NOTE|MEETING|TASK
进行筛选,
--limit N
获取最近N条活动:
bash
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.
bash
CUTOFF=$(date -v-30d +%Y-%m-%dT%H:%M:%SZ)          # macOS
ISO 8601字符串可按字典序比较。
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) # Linux

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)'
undefined
hubspot activities list --contact 73235
| jq -c --arg cutoff "$CUTOFF" 'select(.timestamp > $cutoff)'
undefined

Compact timeline

精简时间线

bash
hubspot activities list --contact 73235 --limit 20 \
| jq -r '"\(.timestamp[0:10])  \(.type)  \(.title)"'
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=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)"'
通过四个管道命令组合:联系人+公司+未结交易+活动。通过标准输入使用批量
objects get
——切勿使用
xargs -I{}
(详见
bulk-operations/SKILL.md
)。
bash
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:
bash
hubspot activities calls transcript get --call 54321
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 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.
通过互动ID获取单个通话的记录:
bash
hubspot activities calls transcript get --call 54321
将所有通话记录导出到文件:
bash
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
输出格式:
{"transcriptId":"...","engagementId":...,"transcriptSource":"...","utterances":[...],"createdAt":...}
utterances
数组包含语音内容;如果未记录或上传通话记录,该数组将为空。

Constraints

限制条件

  • --limit
    max 100 and no
    --after
    cursor — long histories can't be paged.
    body
    can be long; use the compact timeline for skimming.
  • --limit
    的最大值为100,且无
    --after
    游标——无法分页获取长历史记录。
    body
    内容可能较长;可使用精简时间线快速浏览。