Skip to main content

Chat with your HubSpot data

Workflow preview

Workflow preview
100%
Chat with your HubSpot data preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

This n8n template gives you a chat style assistant that can search your HubSpot CRM on demand. Ask natural language questions like “show me leads in Germany” or “what deals close next month,” and t...

Best for

  • CRM automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

@n8n/n8n-nodes-langchain.chattrigger, @n8n/n8n-nodes-langchain.agent, n8n-nodes-base.hubspottool, @n8n/n8n-nodes-langchain.memorybufferwindow, n8n-nodes-base.stickynote, @n8n/n8n-nodes-langchain.lmchatopenai

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Miha.

Original n8n.io source

1.1 Workflow description

Title
Chat with your HubSpot data
Workflow name
Chat with your HubSpot data

This n8n template gives you a chat-style assistant that can search your HubSpot CRM on demand. Ask natural-language questions like “show me leads in Germany” or “what deals close next month,” and the agent translates your request into precise HubSpot searches—then answers in plain English.

Great for founders, AEs, and ops folks who want quick answers without clicking through the CRM.


How it works

  • Chat trigger starts a session from your n8n chat UI or embed.

  • AI Agent (Gemini 2.5 Pro) interprets the message and:

    • Chooses the right HubSpot search (contacts or deals).
    • Fills filter property, operator (EQ, NEQ, GT, GTE, LT, LTE, BETWEEN, IN, NOT_IN), and value(s).
    • Requests specific properties (email, name, lifecycle stage, owner, activity timestamps, etc.).
  • HubSpot tools execute live queries:

    • Contacts: flexible property filter + free-text query.
    • Deals: filters by owner and core deal fields (stage, amount, pipeline, close date).
  • Memory buffer keeps the last turns so you can say “now only show closed won over 10k” and the agent understands context.


How to use

  1. Connect credentials

    • HubSpot OAuth on both HubSpot Tool nodes.
    • Google Gemini API key on the Gemini Chat Model.
  2. Open the chat (the “When chat message received” node).

  3. Ask questions like:

    • “Find contacts named Hans created after Sept 1.”
    • “Deals owned by me in Proposal with amount > 10,000.”
    • “Contacts with lead status = New and no email reply in the last 14 days.”
  4. Refine with follow-ups:

    • “Sort by most recently contacted.”
    • “Only Germany.”
    • “Show top 5 with emails.”

Requirements

  • HubSpot (OAuth2)
  • Google Gemini (API key)

Notes & customization

  • Property/operator control: The contact search node lets the agent set both the property (e.g., email, lifecyclestage, hs_lead_status) and the operator (EQ, IN, BETWEEN in epoch ms for dates, etc.).
  • Owner filtering for deals: Uses hs_all_owner_ids; swap or extend to filter by pipeline/stage ranges.
  • Guardrails: Add allowlists for searchable properties or cap result counts to avoid noisy answers.
  • Display format: Have the agent return concise tables (name, email, stage, last activity, CTA).
  • Handoffs: Add Slack/Email actions—e.g., “post this list to #sales” or “export to CSV.”
  • Telemetry: Log queries for later dashboards (common searches, coverage gaps).

Troubleshooting

  • No results? Loosen operators (use IN lists, broaden dates) or include a free-text query.
  • Date filters: Provide epoch ms for GT/GTE/LT/LTE/BETWEEN on time fields (the agent handles this; keep system time in UTC).
  • Too chatty? Reduce memory window or ask the agent to summarize to bullet points.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - When chat message received

Type / Role
@n8n/n8n-nodes-langchain.chatTrigger - chatTrigger
Config choices
Version 1.3

Block 2 - AI Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2.2

Block 3 - Search contacts in HubSpot

Type / Role
n8n-nodes-base.hubspotTool - hubspotTool
Config choices
Version 2.1

Block 4 - Search for deals in HubSpot

Type / Role
n8n-nodes-base.hubspotTool - hubspotTool
Config choices
Version 2.1

Block 5 - Simple Memory

Type / Role
@n8n/n8n-nodes-langchain.memoryBufferWindow - memoryBufferWindow
Config choices
Version 1.3

Block 6 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 7 - OpenAI Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

3. Summary Table

Workflow Chat with your HubSpot data
Complexity intermediate
Nodes 7
Categories CRM
Author Miha
Published 26 Sept 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/8971/8971.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Chat with your HubSpot data do?

This n8n template gives you a chat style assistant that can search your HubSpot CRM on demand. Ask natural language questions like “show me leads in Germany” or “what deals close next month,” and t...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your CRM use case.