Integrating HubSpot with Microsoft Dynamics 365 empowers businesses to align marketing and sales data, streamline workflows, and enhance customer experience. This comprehensive guide will walk you through every step, from setting up basic syncs to creating advanced workflows using webhooks and middleware.
Whether you’re syncing contacts, leads, or campaign activity, understanding how these two platforms interact will save your team hours of manual work and eliminate data silos.
Integrating HubSpot with Microsoft Dynamics 365 offers a multitude of advantages that significantly enhance business operations. One of the primary benefits is the unification of customer data across both marketing and sales departments. This integration ensures that all teams have access to the same up-to-date information, fostering better collaboration and more informed decision-making. Additionally, the automation of lifecycle updates and lead qualification syncs streamlines processes, reducing manual effort and minimizing the risk of errors. This automation allows teams to focus on strategic activities rather than administrative tasks. Furthermore, the integration improves reporting and forecasting capabilities by utilizing shared data models. This leads to more accurate insights and predictions, enabling businesses to plan more effectively and respond swiftly to market changes.
There are several typical scenarios where integrating HubSpot with Microsoft Dynamics proves beneficial. One common scenario is syncing HubSpot contacts as leads in Dynamics. This ensures that potential customers identified in marketing efforts are seamlessly transitioned into the sales pipeline, enhancing lead management efficiency. Another scenario involves breaking syncs based on qualification status. This means that once a lead reaches a certain qualification level, the sync can be adjusted to reflect their new status, ensuring that only relevant data is shared between systems. Additionally, the integration facilitates the creation of new leads from the same contact upon lifecycle advancement. As contacts progress through different stages of the customer journey, new leads can be automatically generated, ensuring that sales teams have the most current and actionable information to work with.
In HubSpot, you primarily deal with Contacts. Microsoft Dynamics, however, distinguishes between Leads and Contacts.
A Lead in Dynamics is a potential client or deal in early stages.
A Contact is an individual tied to an Account (Company).
Although you can natively sync both a lead and a contact, issues often arise because HubSpot treats each contact as a single email address within the system. In contrast, MS Dynamics allows the creation of 'duplicate' leads for various interactions, which can result in different opportunities. While these aren't considered duplicates within MS Dynamics, they are perceived as such during integration. If your business operates this way, you'll need to devise a workaround to manage this situation.
Navigate to Settings > Integrations in HubSpot.
Use the Microsoft Dynamics 365 connector.
Authenticate with admin credentials from Dynamics.
One-way sync: Data flows from one system to the other.
Two-way sync: Bi-directional updates for contacts, companies, and deals.
Keep in mind that you can only set the sync direction per object, not per field. So if you have sensitive fields that you need to sync into HubSpot but cannot overwrite, make sure you create a workaround through a workflow for example so you do not risk overwriting the field in CRM.
Start with email-based matching; later, shift to CRM record ID matching for more accuracy.
Create the following custom properties in HubSpot:
Send to CRM
(boolean)
Date of CRM Lead Created
(date)
Create New Lead
(boolean trigger)
These properties help control when a HubSpot contact should sync or stop syncing to a Dynamics record.
Use a one-off trigger to send a lead without matching existing CRM records. Ensure the sync criteria explicitly exclude contacts unless the condition is met.
Use workflows to ensure lifecycle stages such as MQL (Marketing Qualified Lead) and SQL (Sales Qualified Lead) match the appropriate stage in Dynamics.
There is a slight challenge that one lifecycle stage can only be synced to one object. So your MQL's can be leads or contacts, not both.
So, for instance, if you’re syncing a contact as a Lead, you can’t use that same field for Contact sync.
To work around this:
Use a modified lifecycle stage like Marketing Qualified Contact.
Once your lead is qualified, change the lifecycle stage from MQL to Marketing Qualified Contact. I also like using Sales Accepted Lead for this but that comes down the the culture.
When a lead becomes qualified in Dynamics:
Update the lifecycle stage in HubSpot to "Marketing Qualified Contact".
Set Send to CRM = No
to break the sync for that lead.
Optionally, create a new Dynamics Lead from the same contact using a webhook for subsequent conversions.
Trigger when:Lifecycle Stage = MQL
AND Exclude from Lead Sync = True
Set custom property:Lead Creation Status = Queued for new Dynamics Lead
Webhook action setup:
POST Method
URL: Your Azure proxy endpoint
Headers:Content-Type: application/json
JSON body:
{
"firstname": "friend",
"lastname": "",
"email": "",
"company": "",
"lifecycle_stage": "",
"source": "HubSpot"
}
Register a new app in Azure AD.
Grant Dynamics CRM – user_impersonation permission.
Use the OAuth 2.0 Client Credentials Flow to fetch a token:
POST https://login.microsoftonline.com/{tenant-id}/oauth2/v2.0/token
Make sure the Azure Function parses incoming JSON and securely authenticates with Dynamics to submit the payload.
One of the recurring challenges in this integration is unintended name changes. For example, when a lead is qualified in Dynamics, it may overwrite the first or last name of the contact in HubSpot. This typically happens when Dynamics treats the lead and contact as linked records.
Best practice:
Avoid using lead name fields that are dynamically altered post-qualification.
Use workflows to update names intentionally in HubSpot once Dynamics confirms the lead has been created or qualified.
Some fields in HubSpot—such as Client ID or Company Tier—should not sync back if their source of truth is Dynamics. The solution is to:
Change these fields to text fields in HubSpot.
Exclude them from sync mappings in the HubSpot–Dynamics connector.
This avoids accidental overwrites of CRM master data.
To go beyond native integration constraints:
Set up a proxy endpoint using:
Azure Functions
AWS Lambda
Node.js/Express API
The proxy should:
Authenticate using OAuth2.0.
POST contact data to /api/data/v9.2/leads
.
Handle error logging and response parsing.
Use custom properties like:
Exclude from Lead Sync = True
Create New Lead = Yes
These flags allow granular control over who syncs, when they sync, and how often.
If you plan to sync CRM campaigns into HubSpot:
Consider building a custom object in HubSpot.
Link campaign activities to contacts via custom workflows.
Use middleware to map campaign data from Dynamics into HubSpot-friendly formats.
Native integration doesn’t fully support campaign objects.
Custom API usage is needed for comprehensive campaign sync.
When integrating HubSpot with Microsoft Dynamics, it's crucial to map fields that align with your business processes to ensure seamless data flow and operational efficiency. Key fields to consider include Email, First Name, Last Name, Company, and Lifecycle Stage, as these are fundamental for maintaining consistent customer records across both platforms. Additionally, mapping custom fields such as "Create New Lead" and "Send to CRM" can address specific business needs, allowing for tailored data management and process automation. By solving for business processes through strategic field mapping, you can enhance data accuracy, streamline workflows, and ultimately drive better business outcomes.
HubSpot Field | Dynamics Field |
---|---|
Emailaddress1 | |
First Name | Firstname |
Last Name | Lastname |
Company | Companyname |
Lifecycle Stage | Lead Source or Status |
Create New Lead (Custom) | Custom Sync Filter Flag |
Use internal notification emails within workflows to alert your team when a sync action or webhook is triggered.
Create a log object or dashboard in HubSpot to monitor sync statuses.
Double-check that lifecycle stage filters and custom property values are configured exactly as expected in the workflow.
Review integration logs in both HubSpot and Dynamics.
This usually happens when Dynamics auto-updates the contact upon lead qualification.
Prevent this by stopping sync before qualification or using proxy endpoints.
1. Can I sync both contacts and leads from HubSpot to Dynamics?
Yes, the sync will let you connect to both but you need to consider how you separate them
2. How can I create a new lead from an existing contact?
Use a custom property trigger + webhook. This will stop syncing the old lead and create a new one without overwriting data.
3. What if a lead is already linked to a contact in Dynamics?
HubSpot might treat them as one entity. Manually break the link or exclude them using sync filters.
4. Do I need a developer to implement the webhook?
Yes, ideally. While HubSpot can send webhooks, a middleware service (like an Azure Function) is needed to manage OAuth tokens and API calls securely.
5. Is campaign data syncing possible?
Not natively. You’d need to build a custom object and sync campaign data using middleware or a third-party tool.
Integrating HubSpot with Microsoft Dynamics can transform your marketing and sales alignment. From handling duplicate leads to building webhook-driven workflows, the key lies in planning your data flow, using smart filters, and creating secure proxy endpoints for custom API actions.
While the native sync is powerful, leveraging middleware and custom logic gives you the flexibility to adapt this integration to your exact business needs.
For organizations scaling rapidly, this integration isn’t just a convenience—it’s a competitive advantage.
Here’s a checklist to make sure your HubSpot–Dynamics integration runs smoothly:
Connect HubSpot to Microsoft Dynamics 365.
Decide on sync direction (one-way or two-way).
Start syncing based on email address.
Create Send to CRM
property in HubSpot.
Create Create New Lead
flag.
Use lifecycle stage filters (e.g., MQL
only) for lead creation.
Build a contact-based workflow in HubSpot.
Set filters: Lifecycle Stage = MQL AND Exclude from Lead Sync = True.
Add a webhook action to send data to your API endpoint.
Set up Azure AD App for Dynamics API.
Assign permissions (user_impersonation).
Create a backend proxy to handle token requests + API calls.
Do not expose client secrets in HubSpot.
Use a secure middleware (Azure Functions, AWS Lambda, etc.).Log webhook responses and Dynamics errors.
Test contact-to-lead sync with dummy data.
Watch for name or email overwrites.Monitor sync logs and update workflows as needed.