How to Load Opportunities from Dynamics into HubSpot as Deals using Power Automate Integration
In this tutorial, Devin Knight from Pragmatic Works demonstrates how to create a Power Automate integration that synchronizes sales opportunities from Microsoft Dynamics into HubSpot as deals. This practical walkthrough showcases how to streamline marketing and sales alignment using custom automation instead of relying on HubSpot's native integration, which can have limitations.
Why Integrate Dynamics with HubSpot?
- Gain visibility into how marketing campaigns drive sales.
- Connect closed opportunities to campaign performance data.
- Leverage HubSpot’s CRM tools with data from Dynamics.
Overview of the Integration Flow
The Power Automate flow is built to monitor new or updated opportunities in Microsoft Dynamics and then mirror that data into HubSpot as deals. The high-level steps include:
- Triggering the flow when a new opportunity is added or modified in Dynamics.
- Retrieving the contact associated with the opportunity.
- Searching HubSpot for that contact using the HubSpot API.
- Creating the contact in HubSpot if it does not already exist.
- Creating a deal in HubSpot and associating it with the contact.
Step-by-Step Breakdown
1. Configure the Trigger in Power Automate
Use the Microsoft Dataverse trigger: When a row is added or modified. Set the table to "Opportunities" and the scope to "Organization". This ensures that any new or updated opportunity in Dynamics triggers the flow.
2. Get Contact Information
Add the Get a row by ID action to retrieve the contact record tied to the opportunity. Use the contact ID from the opportunity row to look up contact details in the Dynamics "Contact" table.
3. Search HubSpot for Existing Contact
Use an HTTP action to query the HubSpot API for the contact using their email address. Pass the necessary headers including a bearer token for authorization, and set the content type to application/json.
4. Check if Contact Exists
Add a condition to evaluate if the search returned any results. If the "total" property from the API response equals 0, the contact doesn't exist in HubSpot and needs to be created.
5. Create Contact in HubSpot (If Needed)
If the contact does not exist, use another HTTP action to POST contact details from Dynamics into HubSpot. Capture the returned contact ID for future association with the deal.
6. Create HubSpot Deal
Use the HubSpot API again to create a new deal. Include key information such as:
- Deal name (Opportunity name)
- Amount
- Close date
In the same request or a follow-up one, use HubSpot’s association functionality to link the deal to the contact (new or existing).
7. Save and Test Your Flow
Devin emphasizes best practices like saving frequently, using descriptive step names, and testing the flow thoroughly. Be aware that small issues like UI glitches in Power Automate may require refreshes.
Why This Approach Matters
By building a custom Power Automate flow, users gain full control over how data syncs between systems. This enables smarter marketing analysis and sales alignment, especially when native integrations fall short. The method allows organizations to:
- Ensure accurate, timely data flow between Dynamics and HubSpot
- Automatically maintain up-to-date contact and deal records
- Get better insights into campaign performance and ROI
Final Thoughts
This real-world example illustrates how Power Automate can bridge gaps between CRMs and marketing platforms. By using HTTP actions and the HubSpot API, Devin shows how to design flexible, scalable solutions tailored to your business needs.
Don't forget to check out the Pragmatic Works' on-demand learning platform for more insightful content and training sessions on Power Automate and other Microsoft applications. Be sure to subscribe to the Pragmatic Works YouTube channel to stay up-to-date on the latest tips and tricks.
Sign-up now and get instant access
ABOUT THE AUTHOR
Devin Knight is a Microsoft Data Platform MVP, Microsoft Certified Trainer, and President of Pragmatic Works. He focuses on driving adoption of technology through learning. He is an author of nine Power Platform, Business Intelligence, and SQL Server books. He has been selected as a speaker for conferences like Power Platform Summit, PASS Summit, SQLSaturdays, and Code Camps for many years. Making his home in Jacksonville, FL Devin is a contributing member to several local user groups.
Free Community Plan
On-demand learning
Most Recent
private training

Leave a comment