Configure HubSpot models with Claude
FunnelStory's MCP server lets you configure data models directly from a conversation with Claude. Instead of writing SQL queries and manually filling in mappings, you describe what you want and Claude reads your HubSpot schema, previews the data, and creates the models in the correct order.
This guide walks through configuring the standard HubSpot models — accounts, users, email conversations, and behavioral events — using Claude.
Prerequisites
- A HubSpot connection added in FunnelStory. See HubSpot.
- The FunnelStory MCP server connected to Claude. See MCP Getting Started.
- Your Claude user must have the Admin or Super Admin role in your FunnelStory workspace — model configuration requires admin access.
Step 1: Check your workspace and connection
Start by asking Claude to confirm who you are and to check the HubSpot data:
"Who am I in FunnelStory? Find my HubSpot connection and check that its deals table has rows."
Claude calls who_am_i to confirm your identity and role, and reads file://workspace/profile.json for your workspace's business context. It finds the HubSpot connection's ID by querying the data_connections table with query_semantic_db, then calls preview_data_connection on the deals table. If deals is empty, the HubSpot sync hasn't finished yet: wait for it before configuring anything, because the accounts model is built from deals.
Step 2: Configure the accounts model
The accounts model is the foundation — everything else depends on it. Configure it first.
"Configure a HubSpot accounts model using deals and companies"
Claude will:
- Read
file://data_model/guide.mdfor the correct query pattern. - Call
preview_data_modelto validate the query returns rows with expected fields. - Create the model with
configure_data_model.
What it configures: An accounts model that builds your account list from HubSpot companies that have at least one associated deal. This ensures only active prospects and customers appear as FunnelStory accounts.
FunnelStory uses deals — not just companies — as the source of truth for accounts. A company must have at least one deal to be included. This keeps your account list focused and prevents noise from all your HubSpot contacts' companies appearing as accounts.
Step 3: Configure the users model
After accounts, configure users so FunnelStory can resolve contacts to accounts.
"Configure a HubSpot users model"
Claude creates a users model that:
- Reads HubSpot contacts (
contacts_v2) associated with deal companies - Keeps only contacts whose email domain matches their company's domain, so vendors and personal addresses stay out
- Gives FunnelStory the contact→account mapping that email and behavioral event models use
HubSpot contacts are synced only for companies that have deals, so the accounts model must have refreshed before contacts are available. Configure and refresh accounts, then users, then the email and event models.
Step 4: Configure email conversations
Once accounts and users are in place, configure HubSpot email conversations to bring your team's customer emails into the account timeline with sentiment analysis.
The HubSpot connection has a Sync Emails option. When it's on, FunnelStory already imports HubSpot emails as conversations and groups them into threads, so you don't need this model. Turning the option on and configuring an email conversation model imports every email twice. Use one or the other.
"Configure a HubSpot email conversation model"
Claude creates a conversation model that:
- Queries HubSpot incoming and outgoing emails (
INCOMING_EMAIL,EMAIL) - Resolves
account_idby matching the sender email to a known contact viacontacts_v2 - Passes email body text through FunnelStory's AI analysis pipeline for sentiment scoring, text analysis, and label analysis
- Shows the email subject as the timeline entry title with a link to HubSpot
The HubSpot connection imports email engagements only, so a HubSpot notes model would stay empty. Don't configure HubSpot meetings or calls either: HubSpot doesn't reliably associate them with companies. Use a meeting source such as Zoom or Gong for calls, and FunnelStory's own Notes for account notes. HubSpot tickets are supported: ask Claude for a support ticket model.
Step 5: Configure behavioral event models
HubSpot tracks behavioral events — website visits, form fills, email opens and clicks, link and CTA clicks — for known contacts. Each event type can be a separate non-product activity model on the account timeline.
Configure page views and form submissions:
"Configure HubSpot page view and form submission non-product activity models"
Configure all available event types:
"Configure non-product activity models for all six HubSpot behavioral event types"
The six available event types are: page views, form submissions, marketing email opens, marketing email clicks, link clicks, and CTA clicks.
Behavioral events resolve account_id by matching the visitor email to your users model. Events from visitors whose emails aren't in FunnelStory as users will be excluded. This is intentional — it keeps behavioral data scoped to accounts you actively manage.
Configuring everything at once
If you want to set up all models in a single conversation:
"Configure all standard HubSpot models — accounts, users, email conversations, page views, and form submissions"
Claude will configure them in the correct dependency order, previewing each query before saving. Leave out email conversations if Sync Emails is on.
Refreshing models after configuration
Claude saves each model with draft: false, so it's active immediately, but it needs a data refresh to populate. Either:
- Wait — FunnelStory refreshes models on a schedule (every 6 hours by default). Claude usually sets CRM models to refresh hourly, because deal stages change often.
- Trigger manually — In Configuration → Data Models, open the model and click Refresh.
After the first refresh, open an account that has HubSpot deals and check Adoption → Event Timeline for email conversations and activity events.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| Accounts model shows 0 rows | The HubSpot sync hasn't finished, so deals is empty | Wait for the connection to finish syncing, then preview again. Don't switch the query to companies. |
| Conversations model shows 0 rows | The accounts model hasn't refreshed, so contacts weren't synced | Refresh the accounts model, wait for contacts to sync, then refresh the conversations model |
| Emails appear twice on the timeline | Sync Emails is on and an email conversation model is also configured | Turn off one of them |
| Page views show 0 rows | Visitor emails don't match any FunnelStory users | Confirm HubSpot visitor tracking is identifying visitors after login; check that your users model covers the right contacts |
| Wrong accounts linked to emails | Contact has multiple associatedcompanyid values | Review the contact in HubSpot and confirm the correct primary company association |