Pragmatic Works Nerd News

Power Automate and HubSpot Integration (Part 2)

Written by Devin Knight | Nov 12, 2023

Introduction

Devin Knight continues his series on HubSpot and Power Automate integration. In this second part, he dives deeper into the Power Automate side of the process after a quick review of HubSpot's documentation. The main focus is on creating a flow that can access HubSpot's API securely and perform actions like searching for contacts based on email addresses. Let's break down the key steps and concepts from his video.


Understanding HubSpot Documentation

Before creating the flow in Power Automate, it's crucial to understand the HubSpot documentation. This documentation provides insights into what kind of information you need to pass into Power Automate for successful integration.

  • Explore the HubSpot documentation, specifically focusing on the API section.
  • Test and validate the documentation using the test call section, which allows you to pass in your API token.
  • Explore parameters, including filters, to customize your integration.


Creating a Flow in Power Automate

Devin Knight demonstrates how to create a flow in Power Automate that connects to HubSpot.

1. Start with a Manual Trigger: For simplicity, he begins with a manual trigger. Later, you can change it to other triggers based on your requirements.

2. Adding an HTTP Action: Devin adds an HTTP action, which is essential for making API calls.

    • Select the Appropriate HTTP Method: Depending on the API call you intend to make, choose the appropriate method (GET, PUT, POST, etc.). In this case, it's a POST method for searching contacts based on email addresses.
    • Specify the URL: The URL is obtained from HubSpot's documentation. It's the endpoint you want to access within HubSpot.

3. Setting Headers: To authenticate and specify the content type, you need to set headers.

    • Authentication: You'll use an access token obtained earlier, following the guidelines from the part one video.
    • Content Type: HubSpot's documentation specifies the content type required for your request.

4. Filtering Contacts Based on Email Addresses: In this specific flow, Devin filters contacts based on email addresses.

    • Initialize a Variable: Create a variable, in this case, a string for the email address you want to filter.
    • Apply Filters: In the body section of the HTTP action, you'll apply a filter to look for contacts with a particular email address. Devin explains the filter structure in detail.

Limit Results: If you only want one result, set a limit to ensure you get a single contact.

5. Using Variables: To pass the email address value into the API call, Devin initializes a variable and uses dynamic content to provide the email address.

Best Practices

Devin mentions the importance of following best practices during flow creation. This includes giving meaningful names to actions and variables to make the flow more understandable and maintainable.

Conclusion

In part two of his HubSpot and Power Automate integration series, Devin Knight provides valuable insights into the Power Automate side of the process. He explains how to create a flow that connects to HubSpot's API securely and filters contacts based on email addresses. Understanding the HubSpot documentation and following best practices for flow creation are essential for a successful integration.

The combination of HubSpot and Power Automate offers a powerful toolset for automating tasks and streamlining your marketing and sales efforts. Stay tuned for more in this series to explore additional capabilities and integrations. And for more on these concepts, sign up for the Pragmatic Works' on-demand learning platform, which offers a wide range of courses, including those related to Microsoft products like Power BI, Power Automate, and Azure.