HubSpot Forms API: Capturing Leads From Any Website Without Losing Data
The HubSpot Forms API lets a website keep its own form and send each submission to HubSpot the moment it happens, with the tracking cookie needed for attribution and the ...
What we do · Build
HubSpot ImplementationCRM MigrationsGTM EngineeringHubSpot Reporting & AnalyticsWhat we do · Run
HubSpot Managed ServicesGTM as a ServiceRevOps as a ServiceAI & Agent Hub White-Label Partner ProgramInsights
ArticlesCase studiesRevenue Operations guideGTM Engineering guideHubSpot implementation guideB2B sales guideHubSpot migration guideCRM implementation guideHubSpot integrations guideHubSpot consulting guideHubSpot vs SalesforceHubSpot integrations guide
A HubSpot integration connects HubSpot to another system so that data created or changed in one reaches the other without manual work. There are four ways to build one: a native app from the HubSpot App Marketplace, HubSpot’s own Data Sync, an integration platform (iPaaS) or middleware in the middle, or a custom integration on the HubSpot API. The right choice depends on the system on the other side, the volume of data and how specific your business rules are.
Definition
A HubSpot integration is a connection that moves data between HubSpot and another tool automatically, in one or both directions. The most common example in a revenue team is the CRM talking to the ERP: a deal won in HubSpot becomes an order in the ERP, and the invoice and payment status come back to the customer record.
Every good integration answers three questions before anyone builds it:
Without those answers, an integration copies mistakes faster than a person would. For the developer side of the API (authentication, objects and limits), see our HubSpot API guide. This guide covers the full picture: what to integrate, which path to choose, the Salesforce case, and what usually breaks.
What to integrate
Start with the integration that today consumes the most manual work or produces the most errors. In most B2B companies that is one of these six.
Won deals become orders, and orders, invoices and payments flow back to the CRM, so sales and customer success see the financial history without asking finance.
Older systems without a modern API that still hold important data. They need an intermediate layer to talk to HubSpot.
Conversations logged on the contact and the deal, with the history visible to whoever picks up the account next.
Leads from any site or landing page reaching HubSpot with source, consent and the right fields.
Company and contact data completed automatically, so leads can be segmented, routed and prioritized.
HubSpot data joined with data from other systems in one place, for analysis the CRM cannot do on its own.
If you are replacing a CRM rather than connecting to one that stays, you need a migration, not an integration. The HubSpot migration guide covers that path.
Native apps
Native integrations are ready-made connectors listed on the HubSpot App Marketplace that you install and configure without code. They are the fastest path when the other tool is popular and your needs match the standard field mapping the connector offers.
The marketplace lists thousands of apps, from Gmail, Outlook, Zoom, Slack and DocuSign to Stripe, Shopify, QuickBooks and Zendesk, covering email and calendar, video calls, e-signature, accounting, e-commerce, support and many more categories. Some are built and maintained by HubSpot; most are built by the vendor of the other tool.
What to check before you install one:
A native app typically runs in hours or days. Its limits are the fields and rules the connector offers.
Data Sync
Data Sync is HubSpot’s own two-way sync engine for a set of popular apps, managed inside HubSpot rather than by a third-party connector. It is a good fit when the other tool is on the supported list and you need field mappings and filters that a basic connector does not give you.
HubSpot renamed Operations Hub to Data Hub. The data tools in that hub matter for integrations in three ways:
Data Sync is a strong middle option. It still covers a defined list of apps and standard patterns. When the other system is not on the list, or the rules are specific to your business, you move to middleware or a custom API integration.
Custom API
A custom integration is code that calls the HubSpot API and the API of the other system, built for your exact data and rules. It is the right path when no connector exists, when business rules are too specific for an app, or when the volume of data requires control over limits, batches and retries that generic tools do not offer. When the path is the API, these are the fundamentals that decide whether the integration survives daily use.
Private or public app, OAuth, scopes and tokens. Getting scopes right from the start avoids blocked calls later.
Objects, properties and associations, and how to keep another system current with HubSpot.
The Search API to find records by filter and fetch only what changed since the last run.
Going through large volumes of records without skipping or duplicating any.
Receiving HubSpot events in real time, with signature validation and safe handling of retries.
Custom-coded actions in workflows for rules that native automation does not cover.
A custom integration takes weeks, with scope and testing, and needs engineering to build and to maintain. In exchange, it does exactly what the business needs. This is the work our GTM engineering team does every day; for a broader view of the role, read What is GTM engineering.
Middleware
Middleware is software that sits between two or more systems, receiving, transforming and delivering data between them. An iPaaS (integration platform as a service) is a hosted version of that idea, with visual flows and prebuilt connectors.
They help when systems cannot talk to each other directly, when the same data must go to several destinations, or when you want a single place to see every sync.
At Insight Sales, integrations run on our own middleware, Insight Connect, so every sync is queued, retried, monitored and logged, and field mappings can change without redeploying code. Whatever tool you choose, ask the same question: when a sync fails at 2 a.m., who finds out, and how do you replay it?
How to choose
There is no single right path. The choice depends on the system on the other side, the data volume and how specific your rules are. Use this table as a starting point.
| Native app | Data Sync | iPaaS or middleware | Custom API integration | |
|---|---|---|---|---|
| How it works | Ready-made connector from the App Marketplace | HubSpot’s own two-way sync for supported apps | A platform in the middle receives, transforms and sends data | Your own code calling the HubSpot API and the other system’s API |
| Best for | Popular tools with standard mapping | Supported apps that need field mapping and filters | Several systems, transformations and moderate rules | Specific business rules, high volume or systems with no connector |
| Time to run | Hours or days | Days | Days or weeks | Weeks, with scope and testing |
| Main limit | Fields and rules the connector offers | The list of supported apps | Cost per execution; complex logic is hard to maintain | Needs engineering to build and maintain |
| Who maintains it | The app vendor | HubSpot, configured by your admin | The team that configured the flows | The engineering team responsible |
A practical rule: try the native app first, move to Data Sync or middleware when you hit its limits, and go custom when the integration is critical to revenue and no tool expresses your rules.
Salesforce
HubSpot has a native, two-way Salesforce integration. It is used by companies that keep Salesforce as the sales CRM while marketing runs on HubSpot, and by companies in the middle of moving from one platform to the other.
What to know before you connect them:
When the native connector cannot express your rules, a middleware or API integration between the two platforms takes over. And if the plan is to leave Salesforce, a planned CRM migration keeps history and associations that a sync was never designed to carry. For the cost side of that decision, see HubSpot vs Salesforce: total cost of ownership.
Planning
Most integration problems start in planning, not in the code. These five steps come before the first line is written.
01 · Mapping
List which objects move between systems and the matching field on each side, with format and accepted values.
Result: a field map both teams approve.
02 · Ownership
For each field, decide which system owns it. Without this rule, a two-way sync overwrites good data with old data.
Result: no field with two owners.
03 · Direction
One way or two ways; real time through webhooks or scheduled batches. Real time only where the process needs it.
Result: a sync sized to the need.
04 · Build
Native app, Data Sync, middleware or custom API, with authentication, pagination, rate limits and retries handled from the first version.
Result: an integration that holds up under real volume.
05 · Run
Alerts on failures, a log of what synced and documentation of the field map.
Result: errors seen before they become a sales problem.
Common failures
Most broken HubSpot integrations fall into one of six cases. Each has a known cause and a known fix.
The app lacks the permission the call requires, even after reinstalling. Fix: review the scopes the app requests against every endpoint it calls, then reauthorize.
Too many calls in a short period. Fix: pace requests, use batch endpoints and retry with backoff.
The access token stops renewing and the integration stops without warning. Fix: handle token refresh explicitly and alert on authentication failures.
Retried events create duplicate records or tasks when the receiver does not handle repetition. Fix: make the receiver idempotent, so the same event processed twice has one effect.
A sync fetches only part of the changed records, usually because of pagination or search limits, and the other system drifts out of date. Fix: paginate correctly and reconcile counts on a schedule.
Nobody receives the alert when it fails, and the team learns about it from a customer. Fix: name an owner, send alerts to a channel someone reads and keep the documentation current.
Checklist
Use this list before you call an integration done. Every item should have a name next to it.
From the blog
The HubSpot Forms API lets a website keep its own form and send each submission to HubSpot the moment it happens, with the tracking cookie needed for attribution and the ...
A HubSpot invalid refresh token error (BAD_REFRESH_TOKEN, invalid_grant) means HubSpot has revoked or no longer recognizes the OAuth refresh token, usually after an app ...
Running HubSpot webhooks in production requires validating the v3 HMAC SHA-256 signature, making handlers idempotent because delivery is at-least-once and unordered, and ...
HubSpot custom code actions run Node.js or Python inside workflows within a hard 20-second limit and 128 MB of memory, read credentials from secrets selected in each ...
Integrating HubSpot with n8n reliably means storing the credential in n8n's credential manager, using a service key or OAuth2 for the HubSpot node and a developer API ...
A HubSpot API 403 missing scopes error means the token lacks the scope the endpoint requires; on a private app or service key, save the exact scope on the right app, and ...
Common questions
Four: a native app from the HubSpot App Marketplace, HubSpot’s Data Sync for supported apps, an iPaaS or middleware between the systems, or a custom integration built on the HubSpot API. Most companies use more than one, depending on the system.
Yes. HubSpot has a native two-way Salesforce integration for HubSpot Professional and Enterprise subscriptions and Salesforce editions with API access. Plan the inclusion list, field ownership and API call budget before you turn it on.
When there is no ready-made connector, when your business rules are too specific for an app, or when the data volume requires control over limits, batches and retries that a generic tool does not provide.
Only when both systems need to edit the same data. In that case, define which system is the source of truth for each field. In most cases each field has one owner, and a one-way sync is simpler and safer.
Software that sits between HubSpot and other systems, receiving, transforming and delivering data. It helps when systems do not talk directly, when the same data goes to several places, or when you need queues, retries and a log for critical syncs.
Integrate when the other system stays in use, such as an ERP. Migrate when HubSpot replaces the current system, such as an older CRM. The HubSpot migration guide explains the migration path.
If a connector does not exist, a workflow cannot express the logic, or a sync keeps breaking, our engineers can scope it with you. Tell us which systems need to talk to HubSpot and you will get a written approach and data contract before anything is built.