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.
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:
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.
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.
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.
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.
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.
Use the HubSpot API again to create a new deal. Include key information such as:
In the same request or a follow-up one, use HubSpot’s association functionality to link the deal to the contact (new or existing).
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.
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:
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.