HubSpot(営業管理ツール)の取引情報、最近のメモ、メール履歴を基に、特定の相手先に向けた個別対応のフォローアップメールや営業メールを下書きします。HubSpotを開いてメールの内容を事前入力し、営業担当者が確認・送信できるようにしたうえで、メール送信の全記録を自動で保存します。取引に関連したメールの場合は、次のステップや取引段階を適切に更新します。 **次のような場合に使用:** - ユーザーが特定の相手先に向けた営業メールやフォローアップメールを作成・送信したいとき - 「○○さんにフォローアップしたい」「△△さん宛のメールを作成したい」「✕✕さんに何か送りたい」「◎◎さんに連絡を取りたい」「□□さんにメッセージを送ってほしい」「[取引名]のフォローアップメールを作成したい」など、相手先や取引に紐付いた営業メール作成のリクエスト全般
Drafts a personalised follow-up or outreach email for a named contact, grounded in HubSpot deal context, recent notes, and email history. Opens HubSpot with the email pre-populated so the rep can review and send with full tracking. If deal-related, updates the next step or deal stage as applicable. ALWAYS use this skill when the user wants to write or send outbound communication to a specific contact — "follow up with X", "draft an email to X", "send something to X", "check in with X", "reach out to X", "ping X", "touch base with X", "I need to reply to X", "draft a follow-up for [deal]", "write to X". Trigger on any request to compose outbound communication tied to a contact or deal.
下記のツール名 はHubSpot MCPコネクタの標準的なツール名です。表示されていない場合は、スキルの更新またはHubSpotツールセットの代替ツールをご確認ください。利用可能なツールは変更される場合があります。
以下を同時に実行:
get_organization_details → portalId、uiDomain を保存search_crm_objects:objectType: contacts、メッセージから抽出した名前でクエリ、properties: firstname、lastname、email、jobtitle、hs_lead_status、lifecyclestage、associatedcompanyid、notes_last_contacted、hs_email_last_send_date複数一致した場合 → 名前・肩書・会社名の選択肢を表示し、確認を待つ。
保存項目:contactId、contactEmail、firstName、companyId。その後、associations.contact = contactId でフィルタしたディール(案件)を検索し、dealId、dealStage、dealPipeline、dealName、currentNextStep を保存。
get_crm_objects contacts、objectId: contactId、associations: deals、notes、tasks を取得。以下を確認:
担当者のメールアドレスを含むスレッドを検索、直近3~5件を取得。以下に注目:
以下を順に検討し、目的が明確になったら次に進む:
1. CRM履歴から推測(最も信頼度が高い)
最近のメモ、通話ログ、メールスレッドを確認し、明確な約束・未解決の質問・次のステップが述べられていないか確認。 例:「来週プライシング情報を送ります」「セキュリティレビューをリクエストされた」「法務承認待ち」
明確な未対応事項や未回答の質問があれば、それが目的。
2. ディール段階から推測(履歴に明確な情報がない場合)
パイプライン(営業段階の流れ)のメタデータを取得し、該当ディールのパイプラインに絞り込む:
get_properties:objectType: deals、propertyNames: ["dealstage", "pipeline"] → すべてのパイプラインの段階選択肢とパイプラインメタデータを取得dealstage のオプションを dealPipeline(パイプラインIDで照合)に属するものだけに絞る。ポータル内に異なる段階セットを持つ複数のパイプラインが存在することが多いため、他のパイプラインの段階は使用しない。displayOrder でソートし、現在の段階位置と次の段階ラベルを特定。hs_next_step も確認。3. ユーザーに確認(目的がまだ不明確な場合)
CRM履歴もディール段階も確信が持てない目的を与えない場合、ドラフト作成前に確認:
「このメールの目的は何ですか?【担当者名】にどのような行動を取ってほしいですか?」
回答を待ってから次に進む。
冒頭:「フォローアップとなりますが」「念のため確認」「お世話になっております」で始めない。最近のメールの件名、メモ、企業情報、以前の約束など、具体的な参照から始める。
トーン:担当者の最近のメールの形式性レベルに合わせる。メール履歴がない場合は、プロフェッショナルで親しみやすい文体を基本とし、かしこまりすぎず、明確で直接的に。
構成:3~5段落の短文、最後に1つの明確な依頼、目的と直結したもの。
フィールド:to(名前+メールアドレス)、subject(具体的で文脈に即した件名。「フォローアップ」ではなく「Re: エンタープライズパイロットの範囲」など)、body(get_user_details で取得した担当者名で署名)。
show_widget でドラフトをインラインで表示 — HubSpotスタイルのメール作成UIを白カードで表示。件名と本文は編集可能フィールドで表示:
フィールドが編集されたら、リアルタイムで深いリンク(ディープリンク)URLを更新し、**「HubSpotで開く」ボタンが常に現在の件名と本文を反映するようにする。
編集可能フィールドの下に、以下の小さい薄いテキストで表示:
「HubSpotで送信すると、メールの開封とリンククリックを追跡できます。」
フォントサイズ:作成ウィジェットはUIクロム(装飾要素)であり、本文ではない — チャットインターフェースと一貫性のあるコンパクトな見た目に。
宛先、件名):12px、color: var(--text-secondary)color: var(--text-muted)CTAボタン:HubSpot MCPアプリのデザインシステムに準拠。主要な橋渡しボタンはソリッドブラック。CSS変数ではなくハードコーディングされた16進数値を使用し、ライト/ダークモード両対応で確実にブラックになるように。CSS変数ベースのアクセントカラー(例:var(--fill-accent))はホストテーマのブルーに解決するため、使用してはいけません。
background: #000;
color: #fff;
border: none;
border-radius: 6px;
padding: 8px 16px;
font-size: 13px;
font-weight: 500;
cursor: pointer;
text-decoration: none;
display: inline-flex;
align-items: center;
gap: 6px;
URLを構築し、HubSpotが担当者レコードを開き、メール作成パネルを事前入力するようにする。
URL形式:
https://[uiDomain]/contacts/[portalId]/contact/[contactId]?interaction=email&initialEmailSubject=[encoded_subject]&initialEmailBody=[encoded_body]
エンコーディングルール:
<p>...</p> でラップ、改行は <br> に。encodeURIComponent に相当)でエンコード:スペースは %20、その他の特殊文字もパーセントエンコード(例:< → %3C、> → %3E、, → %2C、@ → %40)。フォーム形式エンコーディングを使用しない — + でスペースを表現しない。%E3%81%82%E3%82%8A%E3%81%8C%E3%81%A8%E3%81%86%E3%81%94%E3%81%96%E3%81%84%E3%81%BE%E3%81%97%E3%81%9F%E3%80%81%E5%A4%AA%E9%83%8E(UTF-8エンコード後)<p>太郎さんへ</p> → %3Cp%3E%E5%A4%AA%E9%83%8A%E3%81%95%E3%82%93%E3%81%B8%3C%2Fp%3E(UTF-8エンコード後)明確にラベルを付けたボタンとして表示:「HubSpotで開く →」
メモを保存しない。ドラフト本文をHubSpotに保存しない。
ユーザーがHubSpotでメールを開いた後、ディールフィールドを更新するべきかプロアクティブに確認。文脈に基づいて自動的に判断 — 曖昧な場合のみ確認。
次のステップ / タスク:メールが明確な次のアクション示唆する場合(例:「木曜日に提案書を送ります」「週末までに返信してください」)、更新または作成:
manage_crm_objects deals、updateRequest で hs_next_step をディールで更新manage_crm_objects tasks、createRequest — hs_task_subject: 「【担当者名】から返信なし場合はフォローアップ」、hs_task_type: EMAIL、hs_task_status: NOT_STARTED、hs_timestamp: [期限日]、associations: contact + dealディール段階:メールが段階変更を示唆する場合(例:提案書送付 → 「商談可能」、契約書送付 → 「契約送付」)、更新前に確認:
「このメールはディールを【段階名】に移す適切な状態に見えます — 更新してもいいですか?」
ディール段階の変更は確認後に実行。
ディールがない場合:このフェーズはスキップ。デフォルトのメール目的:関係を前に進める。
Tool names below are expected names for the HubSpot MCP connector. If a named tool isn't available, check for updates to the skill and/or alternates in the HubSpot toolset as available tools may change
Run simultaneously:
get_organization_details → store portalId, uiDomainsearch_crm_objects: objectType: contacts, query: name from message, properties: firstname, lastname, email, jobtitle, hs_lead_status, lifecyclestage, associatedcompanyid, notes_last_contacted, hs_email_last_send_dateMultiple matches → disambiguation list (name, title, company), wait for confirmation.
Store: contactId, contactEmail, firstName, companyId. Search deals filtered by associations.contact = contactId — store dealId, dealStage, dealPipeline, dealName, currentNextStep.
get_crm_objects contacts, objectId: contactId, associations: deals, notes, tasks. Retrieve:
Search threads for contact's email, last 3–5. Note: last reply direction, tone, unanswered questions, subject context.
Work through these in order, stopping as soon as the goal is clear:
1. Infer from CRM history (highest signal) Look across recent notes, call logs, and email threads for explicit commitments, open questions, or stated next steps — e.g. "I'll send pricing next week", "They asked for a security review", "Waiting on legal sign-off". If a clear outstanding action or unanswered question exists, that is the goal.
2. Infer from deal stage (if no clear signal from history) Fetch pipeline metadata and filter to the deal's specific pipeline:
get_properties: objectType: deals, propertyNames: ["dealstage", "pipeline"] — returns all stage options across all pipelines, plus pipeline metadata.dealstage options to only those belonging to dealPipeline (matched by pipeline ID). Portals commonly have multiple pipelines with different stage sets — do not use stages from other pipelines.displayOrder and identify the current stage's position and the label of the next stage.hs_next_step on the deal if populated.3. Ask the user (if goal is still unclear) If neither CRM history nor deal stage gives a confident goal, ask before drafting:
"What's the goal of this email — what do you want [firstName] to do?"
Wait for the answer before proceeding.
Fields: to (name + email), subject (specific and contextual — e.g. "Re: Enterprise pilot scope" not "Following up"), body (signed with rep's name via get_user_details).
Show the draft inline via show_widget — white card with a HubSpot-style email compose UI. The subject and body must be rendered as editable fields:
When either field is edited, update the deep link URL in real time so the Open in HubSpot button always reflects the current subject and body.
Below the editable fields render:
Below the CTA, show this microcopy in small muted text:
"Sending via HubSpot lets you track email opens and link clicks."
Font sizes: The compose widget is a UI chrome element, not body text — keep it compact so it feels consistent with the surrounding chat interface:
To, Subject): 12px, color: var(--text-secondary)color: var(--text-muted)CTA button: Per HubSpot's MCP Apps design system, the primary bridge button is solid black. Use hardcoded hex values — not CSS variables — so the button is reliably black in both light and dark mode. CSS variable-based accent colors (e.g. var(--fill-accent)) resolve to the host theme's blue and must not be used here.
background: #000;
color: #fff;
border: none;
border-radius: 6px;
padding: 8px 16px;
font-size: 13px;
font-weight: 500;
cursor: pointer;
text-decoration: none;
display: inline-flex;
align-items: center;
gap: 6px;
Construct the URL so that HubSpot opens the contact record with the email compose panel pre-filled.
URL format:
https://[uiDomain]/contacts/[portalId]/contact/[contactId]?interaction=email&initialEmailSubject=[encoded_subject]&initialEmailBody=[encoded_body]
Encoding rules:
<p>...</p>, line breaks become <br>.encodeURIComponent): spaces become %20, all other special characters percent-encoded (e.g. < → %3C, > → %3E, , → %2C, @ → %40). Do not use form-style encoding — + must not be used to represent spaces.Thanks%20for%20your%20time%2C%20Brian<p>Hi Brian,</p> → %3Cp%3EHi%20Brian%2C%3C%2Fp%3EPresent as a clearly labelled button: "Open in HubSpot →"
Do not save a note. Do not store the draft body in HubSpot.
After the user opens the email in HubSpot, check whether deal fields should be updated. Do this proactively based on context — don't ask unless it's ambiguous.
Next step / task: If the email implies a clear next action (e.g. "I'll send the proposal Thursday", "Let me know by EOW"), update or create accordingly:
hs_next_step on the deal via manage_crm_objects deals, updateRequestmanage_crm_objects tasks, createRequest — hs_task_subject: "Follow up with [firstName] if no reply", hs_task_type: EMAIL, hs_task_status: NOT_STARTED, hs_timestamp: [due date], associations: contact + dealDeal stage: If the email signals a stage change (e.g. sending a proposal → qualifiedtobuy, contract sent → contractsent), ask before updating:
"This looks like it moves the deal to [stage] — want me to update that too?"
Confirm before executing any deal stage change.
No deal: Skip this phase entirely.
原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。