Jump to section
01
The lead-leak problem (and what changes when you fix it)
The default lifecycle of a lead from chat at most companies looks like this: the bot asks for an email when a visitor wants something the bot can’t give them. The visitor types the email. The bot says thanks, somebody will be in touch. The conversation ends. A human reads the transcript later, decides the lead is real, and creates a HubSpot contact by hand. Or — more often — the conversation is one of forty that day, the human is busy, and nothing happens.
The cost of “nothing happens” isn’t visible on a single conversation. It’s visible at the cohort level: bots that capture five hundred leads a month, of which fewer than half make it into the CRM in the first 24 hours, of which a meaningful fraction never get worked at all. SDRs blame the source. Marketing blames the SDRs. The truth is that the handoff from chat to CRM was never built — there’s a person standing between two systems that should be talking to each other directly.
When the handoff is automated, the SDR opens HubSpot in the morning and sees a list of new contacts that came in overnight, each tagged with the bot that captured them and each carrying the message the visitor left. They click into the first record, see “asked about pricing for the Pro plan, said they’re a 12-person agency in Austin,” and have everything they need to write a useful first email. The friction between “lead arrived” and “rep takes action” goes from hours of admin to seconds of context.
02
What gets created in HubSpot
The bot fires events as conversations happen, and the HubSpot integration acts on two of them: a lead captured and a conversation escalated. Only lead capture is subscribed when you connect, and it creates or updates a contact. The deal and the escalation ticket are both opt-in — switch deals on and a captured lead also opens a deal associated with that contact; subscribe the escalation event and switch tickets on and an escalation opens a ticket. Here’s what those records actually look like when they land:
On lead captured
Contact created or updated (dedupes on email), carrying the visitor’s message as a property on the record itself.
On escalation
Ticket opened in Service Hub, carrying the bot’s name, the conversation id and a link to it, and the visitor’s last message — or a line naming the loss if that message cannot be fetched. Fixed subject, medium priority, pipeline 0, a NebulaHex Event ID so a retry updates it in place, and no link to a contact record.
On lead capture, with contacts and deals enabled
Deal created in your default pipeline at the appointment-scheduled stage, associated with the contact. Ready for a rep to pick up.
The message the visitor left is the part that saves your reps the most time, and it rides onto the contact itself. NebulaHex creates a property group called NebulaHex on your contacts, with three properties of its own: nebulahex_agent_name, nebulahex_lead_message and nebulahex_lead_captured_at. On a brand-new contact the message lands in HubSpot’s own message property and in nebulahex_lead_message, next to first and last name, the agent’s name and the time the lead was captured. On a contact that already existed, only those three NebulaHex properties are written, so the message replaces whatever an earlier lead left there and the contact’s name stays as it was. A rep can read it in fifteen seconds and know why the visitor got in touch, rather than just their name and email.
03
How to connect
You set up the integration once and then it runs in the background. The OAuth handshake is the only setup step, and refreshes happen automatically. From a clean start it takes under a minute.
Click Connect in the Integrations tab
Open your bot in NebulaHex, go to the Integrations tab, click Connect on the HubSpot card. You’re redirected to HubSpot’s OAuth screen.
Authorize the scopes on HubSpot
Sign in to your HubSpot portal, pick the account you want to connect, review the scopes (read and write contacts, deals and tickets, plus the contact, deal and ticket property schemas), click Authorize.
Configure event mappings
Back in NebulaHex, decide which bot events create which HubSpot records. Contacts from captured leads are on by default; switch on deals or escalation tickets if you want them, or leave them alone and you’re live.
There are two ways in. From inside NebulaHex, open the agent’s Integrations tab and click Connect on the HubSpot card. Or start at nebulahex.com/hubspot/install, the install URL for HubSpot’s Login via partner site install experience: sign in, and the page lists each agent you can connect, each with its own Connect HubSpot button. Either way you connect one agent at a time, with the Owner or Admin role in its organization, and in HubSpot you need to be a Super Admin or have the HubSpot Marketplace Access permission.
NebulaHex connects through its own HubSpot app, built on HubSpot’s developer platform as a project app. The app’s name, its redirect URL and the scopes it asks for live in a project file kept with NebulaHex’s code, and HubSpot reads them from that file when NebulaHex uploads it. NebulaHex’s tests fail if that file and the Connect button ask for different scopes. The app asks for nine scopes that are required at install, and for two optional scopes that HubSpot grants only to a portal that has the matching product. The nine required scopes:
crm.objects.contacts.write— Creates or updates the contact for each captured lead, the test contact the Test button writes, and a contact from the Create Contact tool, which is off by default.crm.objects.contacts.read— Finds a lead’s contact by email before NebulaHex writes to it, and serves the agent’s contact lookup.crm.objects.deals.write— Opens a deal for each captured lead when deals are on, and associates it with the contact.crm.objects.tickets.write— Opens a ticket for each escalated conversation when tickets are on, and a ticket from the Create Ticket tool, which is off by default.crm.objects.deals.read— Not used today: the deal lookup that would read deals is switched off and refused on every call.crm.objects.tickets.read— Not used today: the two ticket lookups that would read tickets are switched off and refused on every call.crm.schemas.deals.write— Creates the nebulahex_event_id property on deals before the first deal, so a retried write updates the deal instead of duplicating it.crm.schemas.tickets.write— Creates the same nebulahex_event_id property on tickets before the first ticket.crm.schemas.contacts.write— Creates the NebulaHex property group on contacts and its three properties.
The two optional scopes are content and cms.knowledge_base.articles.read. Either one lets the agent search your HubSpot knowledge base articles with the Help Articles tool. A portal that is granted neither still connects, and the tool then stays locked. The tool is off until you switch it on, and it reads only the articles HubSpot’s site search returns.
You don’t paste an API key. You don’t generate a private app token. You don’t manage a refresh token. Disconnecting is just as fast — go back to the Integrations tab and click Disconnect. NebulaHex stops sending events to HubSpot, and revokes the refresh token at HubSpot when no other agent, in any organization, is connected to the same HubSpot account. Your contact records, deals and tickets all stay in HubSpot exactly as they were. The integration is a write path, not a sync that owns your data.
NebulaHex holds one refresh token per HubSpot account: HubSpot issues the app one token for each account, however many agents connect to it, and every agent connected to that account uses it. So disconnecting one agent keeps the others connected. Disconnect, and deleting an agent or a whole organization, each ask HubSpot to revoke the token only when no other agent, in any organization, is connected to the same HubSpot account. A revoke ends the token. When no other agent, in any organization, could still be connected to the same HubSpot account, Disconnect and deleting an agent or an organization also ask HubSpot to uninstall the NebulaHex app from that HubSpot account, and HubSpot emails the admins of that account. While another agent is still connected, the app stays installed there; you can remove it inside HubSpot.
04
Real scenarios where this earns its keep
Inbound marketing team running a content site
You publish a steady stream of blog posts and gate the deeper guides behind an email form. The bot lives in the corner of every page. When someone asks for a guide, it collects their email. With contact creation on, a first-time email shows up as a HubSpot contact on the next drain — usually inside a minute — carrying the message the visitor left and the name of the agent that captured them; an email already in your portal gets the message and the agent’s name in NebulaHex’s own contact properties instead. The topic, the source page and the guide they asked for are not written as properties either way — the visitor’s own message is.
B2B SaaS doing self-serve sales
Your trial flow ends with a bot helping new signups configure their first integration. ~10% of those conversations turn into real questions about pricing, multi-seat licensing, or enterprise security. Ask for an email and the lead becomes a HubSpot contact carrying the visitor’s message — and, with deals enabled, an associated deal in your default pipeline for a rep to work.
Digital agency managing client portfolios
You run HubSpot portals for ten clients, each with their own bot on their own marketing site. Each bot is connected to the matching HubSpot portal — leads on the law firm site land in the law firm’s HubSpot, leads on the dental practice site land in the dental practice’s HubSpot. No routing logic to maintain.
Support team rolling out Service Hub
You already use HubSpot for sales and are rolling Service Hub out for support. Your bot handles the easy questions, and a visitor who wants a person taps Talk to a human in your website widget, on a bot with live chat handoff switched on (it is off by default). With tickets switched on and the escalation event ticked, every escalation opens one in Service Hub whose description carries the bot name, the conversation id and a link to it, and the visitor’s last message, so the agent starts from the question rather than from a bare notification — and if that message cannot be fetched, the ticket says so in place of it rather than arriving blank. The ticket stands on its own: it is not linked to a contact record, and its subject, priority and pipeline are the same on every escalation.
05
Where HubSpot fits in the CRM picture
HubSpot is the CRM most small and mid-market companies actually use. Salesforce is bigger across the broader CRM market, but HubSpot dominates the segment where small and growing businesses pick their first or second CRM — the segment NebulaHex is built for. Public reporting puts HubSpot’s customer base near 290,000 by end of 2025, and the company is widely considered the leader in marketing automation by market share.
HubSpot grew up around the inbound marketing thesis — pull customers in with content rather than push them with cold outreach — and the product reflects that. The Marketing Hub is where you run your blog, your forms, your nurture emails. The Sales Hub is where your reps work the leads those activities produce. The Service Hub is where your support team handles tickets. Each Hub shares one underlying CRM database, so the contact your bot creates is the same contact your marketer enrolls is the same contact your salesperson works is the same contact your support agent helps when they email in three months later. That continuity is the thing that makes HubSpot worth integrating against — when you write a contact to HubSpot, you’re writing it to the spine.
06
Why not just build it yourself
You can build this. Anyone can build this. The HubSpot API is well-documented, OAuth is a solved problem, and a junior engineer with a weekend can wire up a webhook listener that creates contacts. The reason most teams don’t is the long tail of edge cases that show up after the happy path is shipped:
NebulaHex ships those edge cases handled. The integration deduplicates on email by default. Outbound calls back off and retry on transient failures. OAuth tokens refresh in the background. Which records get written is a set of toggles in the dashboard rather than a change in code, so a marketing operations person can turn deals or tickets on without filing a ticket with engineering.
07
Trust & security
The HubSpot connection is OAuth 2.0. NebulaHex never sees or stores your HubSpot password. The access tokens we hold on your behalf are encrypted at rest and in transit, and they’re scoped to reading and writing contacts, deals and tickets inside the portal you authorized, plus the contact, deal and ticket property schemas NebulaHex needs to create its own properties. The deal and ticket reads serve lookups that are switched off today.
You can revoke the connection from inside HubSpot at any time, and you can disconnect from the NebulaHex dashboard with Disconnect and a confirm. NebulaHex stops sending events to HubSpot immediately, and revokes the refresh token during the disconnect when no other agent, in any organization, is connected to the same HubSpot account.
Access inside your workspace is role-based. Only members of your organization with the right role can connect, modify, or disconnect an integration — viewers can see that the integration exists but can’t change its configuration. Every change to integration settings is logged so you can see who connected what and when.
Your data is yours. The conversations your bot has with your visitors are not used to train AI models. The contact data that flows from those conversations into HubSpot belongs to your HubSpot portal and is governed by your portal’s data retention and privacy settings. See our privacy policy and terms for the full posture.
08
Connect HubSpot to your bot in minutes
Set the integration up once and your sales, marketing, and support teams stop doing the data-entry work that’s been quietly costing them their best hours of the day. Every lead the bot captures becomes a HubSpot contact carrying the visitor’s message. Subscribe the escalation event and turn tickets on, and every escalation becomes a ticket. Turn deals on and a captured lead also opens a deal a rep can pick up — the deal hangs off the contact, so with contact creation switched off only leads whose email is already in your portal get one.
The bot does the conversation
HubSpot keeps the record. You keep the customer. Your CRM stays the source of truth; your bot becomes a dependable feeder of qualified records.