---
title: "Give Claude Code your HubSpot sales context through Markdown exports"
description: "Export HubSpot segments, pipeline definitions, email templates, and your sales playbook to Markdown, so Claude Code drafts and reviews deals in context."
canonical: "https://scalewithsearch.com/articles/claude-code-with-hubspot"
date: "2026-01-28"
modified: "2026-09-25"
---
## Site navigation

- [Scale With Search](https://scalewithsearch.com/)
- Real estate
  - Real estate
    - [Real estate](https://scalewithsearch.com/for/real-estate)
- Work
  - Start here
    - [Send your brief](https://scalewithsearch.com/work#send-your-brief)
    - [Prepare your six-question brief](https://scalewithsearch.com/work#prepare-your-six-question-brief)
  - Build
    - [Site build, content library with SEO, signal desk](https://scalewithsearch.com/work)
- For your business
  - Trades and home services
    - [Auto body and collision shops](https://scalewithsearch.com/for/auto-body-and-collision-shops)
    - [Foundation and home repair contractors](https://scalewithsearch.com/for/foundation-and-home-repair)
    - [Garage door and fencing contractors](https://scalewithsearch.com/for/garage-door-and-fencing-contractors)
    - [HVAC contractors](https://scalewithsearch.com/for/hvac-contractors)
    - [Janitorial and commercial cleaning companies](https://scalewithsearch.com/for/janitorial-and-commercial-cleaning)
    - [Locksmiths](https://scalewithsearch.com/for/locksmiths)
    - [Moving companies](https://scalewithsearch.com/for/moving-companies)
    - [Pest control companies](https://scalewithsearch.com/for/pest-control-companies)
    - [Plumbing and electrical contractors](https://scalewithsearch.com/for/plumbing-and-electrical-contractors)
    - [Restoration and water or fire damage companies](https://scalewithsearch.com/for/restoration-and-water-fire-damage)
    - [Roofing companies](https://scalewithsearch.com/for/roofing-companies)
    - [Towing companies](https://scalewithsearch.com/for/towing-companies)
    - [Tree services and landscaping companies](https://scalewithsearch.com/for/tree-services-and-landscaping)
    - [Solar installers](https://scalewithsearch.com/for/solar-installation)
    - [General contractors](https://scalewithsearch.com/for/general-contractors-and-construction)
    - [Paving, concrete, and flooring contractors](https://scalewithsearch.com/for/paving)
  - Practices and professional services
    - [Bookkeeping and tax practices](https://scalewithsearch.com/for/bookkeeping-and-tax-practices)
    - [Dental practices](https://scalewithsearch.com/for/dental-practices)
    - [Family and criminal defense law firms](https://scalewithsearch.com/for/family-and-criminal-defense-law-firms)
    - [Med spas and aesthetics practices](https://scalewithsearch.com/for/med-spas-and-aesthetics)
    - [Personal injury law firms](https://scalewithsearch.com/for/personal-injury-law-firms)
    - [Veterinary clinics](https://scalewithsearch.com/for/veterinary-clinics)
    - [Gyms and fitness studios](https://scalewithsearch.com/for/fitness)
    - [Therapy and outpatient health practices](https://scalewithsearch.com/for/therapy-and-outpatient-health)
    - [Medical billing companies](https://scalewithsearch.com/for/medical-billing)
    - [Insurance agencies](https://scalewithsearch.com/for/insurance-agencies)
    - [Financial advisors](https://scalewithsearch.com/for/financial-advisors)
    - [Property management companies](https://scalewithsearch.com/for/property-management)
    - [Recruiting and staffing agencies](https://scalewithsearch.com/for/recruiting-and-staffing)
    - [Architects and interior designers](https://scalewithsearch.com/for/architects-and-interior-designers)
    - [Logistics and supply chain companies](https://scalewithsearch.com/for/logistics-and-supply-chain)
  - Agencies, MSPs, and manufacturing
    - [IT and managed service providers](https://scalewithsearch.com/for/it-and-managed-service-providers)
    - [Machine shops and precision manufacturers](https://scalewithsearch.com/for/machine-shops-and-precision-manufacturing)
    - [Marketing agencies and freelancers](https://scalewithsearch.com/for/marketing-agencies-and-freelancers)
    - [SEO agencies and consultants](https://scalewithsearch.com/for/seo-agencies-and-consultants)
    - [Small manufacturers and fabricators](https://scalewithsearch.com/for/small-manufacturers-and-fabricators)
  - Restaurants, shops, studios, and nonprofits
    - [Restaurants and hospitality businesses](https://scalewithsearch.com/for/restaurants-and-hospitality)
    - [Retail stores and ecommerce sellers](https://scalewithsearch.com/for/retail-and-ecommerce)
    - [Photographers, event planners, and travel agents](https://scalewithsearch.com/for/photographers)
    - [Churches and nonprofits](https://scalewithsearch.com/for/churches-and-nonprofits)
  - [All industries](https://scalewithsearch.com/for/)
- Learn
  - For your office
    - [Office job guides](https://scalewithsearch.com/guides/)
    - [Browser calculators](https://scalewithsearch.com/tools/)
  - Start here
    - [How it works](https://scalewithsearch.com/how-it-works)
    - [Free Starter Kit](https://scalewithsearch.com/kit/business-memory-starter-kit.zip)
    - [Synthetic specimen](https://scalewithsearch.com/specimen/working-session-specimen.zip)
  - Guides
    - [The Complete Guide to Business Memory for AI Agents](https://scalewithsearch.com/articles/business-memory-for-ai-agents-guide)
    - [The Complete Small-Business Guide to AI Agent Governance](https://scalewithsearch.com/articles/ai-agent-governance-guide-small-business)
    - [The Complete Guide to Leaving Vendor AI Memory](https://scalewithsearch.com/articles/leaving-vendor-ai-memory-guide)
  - Articles by cluster
    - [Business memory](https://scalewithsearch.com/articles/business-memory-for-ai-agents-guide)
    - [Agent governance](https://scalewithsearch.com/articles/ai-agent-governance-guide-small-business)
    - [Migration and ownership](https://scalewithsearch.com/articles/leaving-vendor-ai-memory-guide)
  - For machines
    - [llms.txt](https://scalewithsearch.com/llms.txt)
    - [llms-full.txt](https://scalewithsearch.com/llms-full.txt)
    - [Machine view](https://scalewithsearch.com/?view=machine)
- Company
  - Evidence
    - [Proof](https://scalewithsearch.com/proof)
  - Company
    - [About](https://scalewithsearch.com/about)

# Give Claude Code your HubSpot sales context through Markdown exports.

HubSpot has AI features: a content assistant, conversation intelligence, and predictive lead scoring. None of them know your sales process.

They do not know that your enterprise deals take 90 days and need three demos. They do not know that you discount when a buyer commits to an annual term. They do not know your own numbers, such as a referral close rate of 60 percent against 8 percent for cold outreach. HubSpot's AI sees the fields you filled in, so it treats every lead alike.

Claude Code could apply that context, but it cannot see your HubSpot data. Each follow-up email or pipeline review starts with you explaining what the CRM already holds. This article builds a Markdown context layer that closes the gap.

## Know what Claude Code is missing

Your CRM holds what you know about selling: contact history, deal stages, email sequences, and win and loss patterns. That knowledge stays inside HubSpot's interface.

When Claude Code drafts an email, it does not know:

- the prospect's industry, company size, or problems;
- the prospect's stage in your pipeline;
- past conversations or objections;
- which email templates work for that segment;
- your standard pricing approach, objection handling, or closing method.

When Claude Code reviews deals, it does not know:

- your pipeline stages and what each one means;
- which deal traits predict a close;
- where deals usually stall;
- your team's activity benchmarks.

HubSpot holds the data. Claude Code can reason over it. The two need a bridge.

## Build the bridge in four steps

1. Export the key HubSpot data: contact lists, the pipeline, email templates, and sales playbooks.
2. Convert the exports to Markdown and store them in an Obsidian vault.
3. Write a `CLAUDE.md` that documents your sales process and the vault structure.
4. Start Claude Code in the vault, so it reads the CRM context when it needs it.

HubSpot stays your CRM and system of record. The vault becomes the AI's memory.

Contact records are personal data. Export only the fields a job needs, keep the vault access-controlled, and read [what client data belongs in agent memory](/articles/client-data-in-ai-agent-memory) before the first export.

## Choose what to export

Export the context Claude Code needs to understand your sales process, not the whole database:

| Export | Contents |
|---|---|
| Contact segments | Active prospects, past customers, and referral sources, with key details |
| Pipeline structure | Stage definitions, average time in each stage, what moves a deal forward |
| Email templates | Your best sequences for each stage and segment |
| Sales playbook | How you qualify, demo, handle objections, and close |
| Product and service descriptions | What you sell, your tiers, typical use cases |
| Win and loss patterns | What closes deals and what kills them |

Export lists as CSV. Copy templates as text. Write the process documents in Markdown.

## Export the contact segments

In HubSpot, create filtered views for your key segments: active opportunities, high-value prospects, referral sources, and past customers. Export each view as CSV. Ask Claude Code to convert each CSV to a Markdown table with the key columns:

```
| Company | Contact role | Industry | Stage | Deal size | Last touch | Notes |
|---------|--------------|----------|-------|-----------|------------|-------|
| Acme Corp | Operations director | Manufacturing | Demo Scheduled | Enterprise | 2026-01-20 | Referral from a current customer. Needs Q1 start. |
| Beta Inc | Head of marketing | SaaS | Proposal Sent | SMB | 2026-01-18 | Price-sensitive. Asked about monthly billing. |
```

Export active deals and reference contacts only. Update the files each month, or after a significant change.

## Document the pipeline

HubSpot shows the deal stages. It does not explain what each stage means or how a deal moves through it. Write a Markdown file that records four facts for each stage:

- what qualifies a deal for the stage;
- the typical time in the stage;
- the action that moves the deal forward;
- the common sticking points.

The file looks like this:

```
## Pipeline Stages

### 1. Qualified Lead
- **Definition:** Expressed interest, matches ICP, has budget authority
- **Avg time:** 7 days
- **Next action:** Schedule discovery call
- **Exit criteria:** Confirmed pain point + budget

### 2. Discovery Call
- **Definition:** Initial conversation completed
- **Avg time:** 3 days
- **Next action:** Send proposal or schedule demo
- **Exit criteria:** They agree to next step or they decline

### 3. Demo Scheduled
- **Definition:** They agreed to product demonstration
- **Avg time:** 10 days
- **Next action:** Complete demo, send follow-up
- **Red flags:** Rescheduling multiple times, vague about timeline
```

With this file, Claude Code can tell where a deal is and what should happen next.

## Export the email templates

Your HubSpot templates hold language that has worked. Export each one as a Markdown file with its name and purpose, when to use it, the template text, and its performance notes:

```
---
template: post-demo-followup
stage: Demo Complete
segment: Enterprise
response-rate: 68%
---

# Post-Demo Follow-Up (Enterprise)

**Subject:** Next steps after today's demo

Hi [First Name],

Thanks for taking the time to walk through [Product] with me today. Based on our conversation, it sounds like [specific pain point] is the top priority.

Here's what I recommend:

[Customized next steps based on demo discussion]

I've attached a proposal that includes [specific features discussed] with pricing for [size/tier discussed].

How does [specific date one week out] look for a follow-up call to answer any questions?

[Your Name]
```

Claude Code uses these as the model for new drafts. It follows language that already works instead of generic copy.

## Write down the sales playbook

The playbook is your accumulated sales knowledge. It is probably in your head, in scattered training documents, or in HubSpot notes. Write it in Markdown, one file per topic:

- **Lead qualification:** what makes a good prospect.
- **Discovery questions:** what you always ask, and why.
- **Objection handling:** common objections and the responses that work.
- **Closing:** what works at each deal size.
- **Pricing strategy:** when to discount, when to hold, and how to present tiers.

With the playbook, Claude Code can help you think through a deal, not only draft an email.

## Organize the vault

```
/CRM/
  /Contacts/
    active-opportunities.md
    past-customers.md
    referral-sources.md
  /Pipeline/
    pipeline-structure.md
    deal-stage-definitions.md
    win-loss-analysis.md
  /Templates/
    /Email/
      discovery-outreach.md
      post-demo-followup.md
      proposal-delivery.md
    /Proposals/
      enterprise-proposal-template.md
      smb-proposal-template.md
  /Playbook/
    lead-qualification.md
    objection-handling.md
    pricing-strategy.md
    closing-tactics.md
  /Product/
    service-descriptions.md
    pricing-tiers.md
    use-cases.md
```

Contacts change weekly. The pipeline, templates, and playbook change monthly or less. The folder split lets you update each on its own schedule.

## Write the CLAUDE.md index

`CLAUDE.md` tells Claude Code how to use the CRM files. Give it five sections: a process overview, a map of where each record lives, an active deal index, a template guide, and key sales patterns.

```
## Sales Process

Average deal cycle: 60-90 days for enterprise, 30-45 days for SMB.

Pipeline stages defined in `/CRM/Pipeline/pipeline-structure.md`.

### Active Opportunities

All active deals tracked in `/CRM/Contacts/active-opportunities.md`. Updated weekly.

High-priority deals this month:
- Acme Corp: enterprise deal, demo scheduled, referral from a current customer
- Beta Inc: SMB deal, proposal sent, price-sensitive

### Email Templates

All templates in `/CRM/Templates/Email/`. Choose based on:
- **Discovery stage** → Use `discovery-outreach.md`
- **Post-demo** → Use `post-demo-followup.md` (enterprise) or `post-demo-simple.md` (SMB)
- **Proposal sent** → Use `proposal-delivery.md`

Response rates tracked in each template file. Stick to proven language.
```

Add one rule to the file: Claude Code drafts, and a person sends. The [approval article](/articles/who-approves-what-an-ai-agent-sends) explains how to assign that step.

## Worked example: four jobs before and after

**Follow-up email.** Before, you ask Claude Code for a follow-up to the demo, and it writes generic copy. After, it reads the contact file and sees Acme Corp in the Demo Scheduled stage. It checks the post-demo template and the note about a Q1 start. The draft reads like a message from someone who was on the call.

**Stuck deals.** Before, you review each deal by hand and try to recall why it stalled. After, you ask, "Why are three deals stuck in the proposal stage?" Claude Code reads the pipeline definitions and the deal notes. It finds the pattern: all three are price-sensitive SMB buyers who need monthly billing.

**Call preparation.** Before, you skim HubSpot minutes before the call and miss context. After, you ask Claude Code to prepare you for the Acme call. It reads the contact file, past interactions, and deal stage. It returns five key points: a customer referral, manual reporting as the main problem, a Q1 start, a confirmed budget, and a likely procurement review.

**New rep training.** Before, a new rep shadows calls, reads scattered documents, and asks you the same questions. After, the rep asks Claude Code. It explains the qualification criteria, objection handling, and closing approach from your playbook, not generic sales advice.

Each "after" depends on current files. A deal note that is two months old gives a confident draft built on stale facts. The [customer conversation memory article](/articles/customer-conversation-memory-across-tools) covers how to keep account history current across tools.

## Keep the exports current

**Each week,** export the active opportunity list and add notes from significant calls or deal changes.

**Each month,** review win and loss patterns, update templates when new language works better, and refresh the pipeline analysis.

**Each quarter,** audit the playbook. Record what changed and what works, and revise it.

The weekly routine takes about 20 minutes.

## Know the limits of the export route

The route is not a HubSpot API integration. It does not sync data in real time or add custom apps. It does not replace the CRM: your team still works in HubSpot, and the vault is Claude Code's memory. It is not automatic: you export by hand when the data changes in a way that matters.

HubSpot holds the data. The vault gives Claude Code the context to use it. If you are new to the tools, Claude Code installs with one terminal command, and Obsidian stores notes as plain Markdown files. You can keep Notion or Google Docs for daily work and use the vault only for agent context.


## Related: AI memory

- [How to Move ChatGPT Memory to Claude Without Importing Old Mistakes](/articles/move-chatgpt-memory-to-claude)
- [How to Keep Context Across ChatGPT, Claude, Cursor, and Other AI Tools](/articles/persistent-context-across-ai-tools)
- [How to Switch AI Models Without Losing Business Context](/articles/switch-ai-models-without-losing-context)

----

```text
                  .|########||.                                       .|########||.                                       .|########||.
               |##||.      .||##|.                                 |##||.      .||##|.                                 |##||.      .||##|.
             |#|.              .|#|.                             |#|.              .|#|.                             |#|.              .|#|.
           |#|                    |#|                          |#|                    |#|                          |#|                    |#|
         .#|                        |#.                      .#|                        |#.                      .#|                        |#.
        .#.                          .#|                    .#.                          .#|                    .#.                          .#|
       |#.                            .#|                  |#.                            .#|                  |#.                            .#|
      |#             ......             #|                |#             ......             #|                |#             ......             #|
     .#           ||#########|           #|              .#           ||#########|           #|              .#           ||#########|           #|
    .#.         |######||######|.        .#.            .#.         |######||######|.        .#.            .#.         |######||######|.        .#.
    #.        .##|###|##|#|######|        .#            #.        .##|###|##|#|######|        .#            #.        .##|###|##|#|######|        .#
   ||        |##|#||||||||||||#||#|        ||          ||        |##|#||||||||||||#||#|        ||          ||        |##|#||||||||||||#||#|        ||
   #        |#||||||||||||||||||||#|        #.         #        |#||||||||||||||||||||#|        #.         #        |#||||||||||||||||||||#|        #.
  ||       |#||||||||||||||||||||||#|       ||        ||       |#||||||||||||||||||||||#|       ||        ||       |#||||||||||||||||||||||#|       ||
  #       .#||||||||||||||||||||||||#|       #        #       .#||||||||||||||||||||||||#|       #        #       .#||||||||||||||||||||||||#|       #
 ||   ....|||#||||||##|#|||#|#||##||||....|. ||      ||   ....|||#||||||##|#|||#|#||##||||....|. ||      ||   ....|||#||||||##|#|||#|#||##||||....|. ||
 #.  .  ....|#  ....#|||   ||| .#|||  ....#. .#      #.  .  ....|#  ....#|||   ||| .#|||  ....#. .#      #.  .  ....|#  ....#|||   ||| .#|||  ....#. .#
 #   .  ||||#| .#####||  . .#| .#|||  ||||#   #.     #   .  ||||#| .#####||  . .#| .#|||  ||||#   #.     #   .  ||||#| .#####||  . .#| .#|||  ||||#   #.
.|   |||||  #. |#|||||. ||  #. |#||. .|||||   ||    .|   |||||  #. |#|||||. ||  #. |#||. .|||||   ||    .|   |||||  #. |#|||||. ||  #. |#||. .|||||   ||
||   |....  #. ....|#.      |. ...|. ....||   ||    ||   |....  #. ....|#.      |. ...|. ....||   ||    ||   |....  #. ....|#.      |. ...|. ....||   ||
#.  .||||||##||||||##||####|||||||#||||||#|   .#    #.  .||||||##||||||##||####|||||||#||||||#|   .#    #.  .||||||##||||||##||####|||||||#||||||#|   .#
#    .||####|###########################|.     #    #    .||####|###########################|.     #    #    .||####|###########################|.     #
#      .#||||||.#.|| # |. ..# #| #|||||#|      #    #      .#||||||.#.|| # |. ..# #| #|||||#|      #    #      .#||||||.#.|| # |. ..# #| #|||||#|      #
#      .#|||||| ..  |# ## |#| ...#|#|||#|      #    #      .#|||||| ..  |# ## |#| ...#|#|||#|      #    #      .#|||||| ..  |# ## |#| ...#|#|||#|      #
#      .#|||#|# .# .#| #| ##|.#..#|||||#|      #    #      .#|||#|# .# .#| #| ##|.#..#|||||#|      #    #      .#|||#|# .# .#| #| ##|.#..#|||||#|      #
#      .#||||||############|######|||||#|      #    #      .#||||||############|######|||||#|      #    #      .#||||||############|######|||||#|      #
#   |...||#||||||#||||#|#||||||#|||||#||| |.|  #    #   |...||#||||||#||||#|#||||||#|||||#||| |.|  #    #   |...||#||||||#||||#|#||||||#|||||#||| |.|  #
#. .. ||||# .|||##|.  |#| .|| || .|||#. #|  # .#    #. .. ||||# .|||##|.  |#| .|| || .|||#. #|  # .#    #. .. ||||# .|||##|.  |#| .|| || .|||#. #|  # .#
|| |  ...||  ...##| |  #| .|. |. #####  .. .| ||    || |  ...||  ...##| |  #| .|. |. #####  .. .| ||    || |  ...||  ...##| |  #| .|. |. #####  .. .| ||
|| ||||| || ||||#|  .  |. |. |#. ||||| |#| || ||    || ||||| || ||||#|  .  |. |. |#. ||||| |#| || ||    || ||||| || ||||#|  .  |. |. |#. ||||| |#| || ||
.# |.....#|....|#.||||.|||##.|#|....||.#||.#. #.    .# |.....#|....|#.||||.|||##.|#|....||.#||.#. #.    .# |.....#|....|#.||||.|||##.|#|....||.#||.#. #.
 #.|||||||#############################| ||| .#      #.|||||||#############################| ||| .#      #.|||||||#############################| ||| .#
 ||       ##||#||#||||||#||#||#||#||##.      ||      ||       ##||#||#||||||#||#||#||#||##.      ||      ||       ##||#||#||||||#||#||#||#||##.      ||
  #       .#|||||||||#||#|||||||||||#|       #        #       .#|||||||||#||#|||||||||||#|       #        #       .#|||||||||#||#|||||||||||#|       #
  ||       |#||||||||||||||||||||||#|       ||        ||       |#||||||||||||||||||||||#|       ||        ||       |#||||||||||||||||||||||#|       ||
  .#        |#||||||||||||||||||||#|        #.        .#        |#||||||||||||||||||||#|        #.        .#        |#||||||||||||||||||||#|        #.
   ||        |#||||||||||||||||||#|        ||          ||        |#||||||||||||||||||#|        ||          ||        |#||||||||||||||||||#|        ||
    #.        .######|#|#########|        .#            #.        .######|#|#########|        .#            #.        .######|#|#########|        .#
    .#.         |#####||||#####|         .#.            .#.         |#####||||#####|         .#.            .#.         |#####||||#####|         .#.
     |#           ||########||           #.              |#           ||########||           #.              |#           ||########||           #.
      |#             ......             #|                |#             ......             #|                |#             ......             #|
       |#.                            .#|                  |#.                            .#|                  |#.                            .#|
        |#.                          .#.                    |#.                          .#.                    |#.                          .#.
         .#|                        |#.                      .#|                        |#.                      .#|                        |#.
           |#|                    |#|                          |#|                    |#|                          |#|                    |#|
            .|#|.              .|#|.                            .|#|.              .|#|.                            .|#|.              .|#|.
               |##||.      .||##|                                  |##||.      .||##|                                  |##||.      .||##|
                 .||########||.                                      .||########||.                                      .||########||.

Scale With Search  2026  [scalewithsearch.com](https://scalewithsearch.com)
```
