mcpField
C
communication-history

communication-history

github.com/hubspotマーケティング・グロース281.7k 回インストール今日更新
リポジトリ

communication-history について

communication-historyは、HubSpot CLIでCRMのアクティビティや通話・会議の文字起こしを確認するスキルです。タイムラインの作成や記録の絞り込み、関連レコードを使った通話前の要約作成に役立ちます。

主な機能

  1. 01CRMレコード別のアクティビティ一覧
  2. 02種類と日付による絞り込み
  3. 03簡潔なアクティビティタイムライン
  4. 04通話・会議の文字起こし取得
  5. 05文字起こしの補足フィールド指定

活用シーン

  1. 01コンタクトの最近のやり取りを確認
  2. 02営業通話前の要約を準備
  3. 03確認用に通話の文字起こしを収集

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/hubspot/agent-cli-skills --skill communication-history

インストール後、Claude Code で/communication-historyを入力して読み込まれたか確認します。

詳細

まず bulk-operations/SKILL.md を読んでください — JSONL のパイピング、バッチ読み取り、jq による整形パターン(resources/json-patterns.md)が適用されます。hubspot activities list --help が信頼できる情報源です。

出力形式

activities list はアクティビティごとに 1 つのフラットな行を、新しい順に並べて返します:{id, type, timestamp, lastModified, title, body, status, owner_id}。timestamp と lastModified は ISO 8601 です。type は CALL|EMAIL|NOTE|MEETING|TASK です。基盤となるオブジェクト上の生の hs_call_* / hs_timestamp(Unix ミリ秒)とは異なります — それらが必要な場合は hubspot objects get --type calls で取得してください。

時点指定のフィルタリングでは、timestamp(エンゲージメントの作成時刻)ではなく lastModified(hs_lastmodifieddate、本文が最後に編集された時刻)を比較してください — そうしないと、締め切り後に編集されたコンテンツを含めてしまいます。

レコードのすべてのアクティビティ

--contact、--deal、--company、--ticket のいずれか 1 つだけを渡します(その他のオブジェクトタイプには --type <object_type> --record <id> を使用します)。アクティビティの種類でフィルタリングするには --activity-type CALL|EMAIL|NOTE|MEETING|TASK を、直近 N 件には --limit N を使用します。--type は現在オブジェクトタイプのフラグであり、アクティビティの種類のフィルターではないことに注意してください:

hubspot activities list --contact 73235
hubspot activities list --deal 67890 --activity-type CALL
hubspot activities list --type subscriptions --record 45123 --activity-type NOTE
hubspot activities list --contact 73235 --limit 10

クライアント側の日付フィルター

ISO 8601 文字列は辞書順に比較されます。

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)"'

通話前のブリーフ

4 つのパイプされたコマンド:連絡先 + 会社 + 未完了の商談 + アクティビティ。stdin を介したバッチ objects get を使用してください — xargs -I{} は決して使用しないでください(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)"'

トランスクリプト

アクティビティ ID(hubspot activities list から取得)を指定して、単一の通話または会議のトランスクリプトを取得します。デフォルトは CALL です。会議には --activity-type MEETING を渡し、取得するエンリッチメントフィールドを限定するには --fields を渡します:

hubspot activities transcript get 54321
hubspot activities transcript get 54321 --activity-type MEETING
hubspot activities transcript get 54321 --fields recordingUrl,aiSummary

すべての通話トランスクリプトをファイルにダンプします:

hubspot objects list --type calls --limit 100 --properties hs_call_title \
| jq -r '.id' \
| while read -r call_id; do
    hubspot activities transcript get "$call_id"
  done > /tmp/transcripts.jsonl

出力形式:{"transcriptId":"...","activityId":...,"transcriptSource":"...","transcriptStatus":"READY","numUtterances":3,"recordingUrl":"...","aiSummary":"...","transcriptionProvider":null,"utterances":[...],"createdAt":"...","updatedAt":"..."}。transcriptStatus、numUtterances、recordingUrl、aiSummary、transcriptionProvider が 5 つのエンリッチメントフィールドです — エンリッチされたトランスクリプトにのみ存在し、--fields は取得するフィールドを限定します。utterances 配列には発話コンテンツが入ります。トランスクリプトが記録またはアップロードされていない場合は空です。

トランスクリプトの削除は取り消せません:まず hubspot activities transcript delete <id> --dry-run を実行し、その後 --digest/--confirm を付けて再実行してください(プレビュー行から対象名を確認してください)。

制約

  • --limit のデフォルトは 100 で、--after カーソルはありません — 長い履歴はページングできません。body は長くなる可能性があります。ざっと目を通すにはコンパクトなタイムラインを使用してください。

コメント