How can i integrate hubspot rest api linked service in azure synapse.

Abhishek Singh 25 Reputation points
2024-05-30T00:12:02.02+00:00

When i directly integrated husbpot it's not giving me all the data. But when i try to link that with rest api my test connection is failed. I checked the hubspot api endpoint and from postman i can see all the data tables i want but it is not working in azure synapse.

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
4,700 questions
0 comments No comments
{count} votes

Accepted answer
  1. PRADEEPCHEEKATLA-MSFT 85,826 Reputation points Microsoft Employee
    2024-06-04T05:16:52.3533333+00:00

    @Abhishek Singh - I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to accept the answer .

    Ask: How can I integrate HubSpot Rest Api linked service in azure synapse?

    Solution: The issue is resolved in a different way.

    According to the official document, we can copy data from HubSpot using Azure Synapse Analytics or Data Factory, but it does not return all the properties of the data. To get some specific properties use the authentication type as Anonymous instead of OAuth 2.0 (this is the default authentication for HubSpot which is mentioned in the documentation). Create a private app in the HubSpot account with the required scopes you need and get the access token. Use that token in the REST Api linked service with the anonymous authentication type and add the token in header section.

    Then connect that linked service with the data integration of the REST Api in your workspace and below the base URL, add your Api endpoint for that property in relative URL section.

    Save the data integration and make a copy data activity in the pipeline. Load the source data from the data integration REST resource which you made and sink that into Azure Data Lake Gen2 or your SQL server.

    All the properties which match to the URL endpoint will be copied into your server.

    If I missed anything please let me know and I'd be happy to add it to my answer, or feel free to comment below with any additional information.

    If you have any other questions, please let me know. Thank you again for your time and patience throughout this issue.


    Please don’t forget to Accept Answer and Yes for "was this answer helpful" wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. PRADEEPCHEEKATLA-MSFT 85,826 Reputation points Microsoft Employee
    2024-05-30T07:02:10.85+00:00

    @Abhishek Singh - Thanks for the question and using MS Q&A platform.

    According to official documentation: Copy data from HubSpot using Azure Data Factory or Synapse Analytics
    To create a linked service to HubSpot in Azure Synapse, you can follow the steps mentioned below:

    • Browse to the Manage tab in your Azure Synapse workspace and select Linked Services, then click New.
    • Search for HubSpot and select the HubSpot connector.
    • Configure the service details, test the connection, and create the new linked service.

    However, if you are not able to get all the data from HubSpot directly, you can try using the HubSpot REST API to get the data. To do this, you can create a REST linked service in Azure Synapse and use it to call the HubSpot REST API.

    To create a REST linked service, you can follow the steps mentioned below:

    • Browse to the Manage tab in your Azure Synapse workspace and select Linked Services, then click New.
    • Search for REST and select the REST connector.
    • Configure the service details, including the API endpoint and authentication details.
    • Test the connection to ensure that it is working.

    Once you have created the REST linked service, you can use it in your pipeline to call the HubSpot REST API and get the data you need.

    If you are still facing issues with the test connection, you can check the API endpoint and authentication details to ensure that they are correct. You can also try testing the API endpoint using a tool like Postman to ensure that it is working correctly. If you are still facing issues, you can reach out to the HubSpot support team for further assistance.

    Hope this helps. Do let us know if you any further queries.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.


  2. Abhishek Singh 25 Reputation points
    2024-06-03T23:32:53.0233333+00:00

    According to the official document, we can copy data from HubSpot using Azure Synapse Analytics or Data Factory, but it does not return all the properties of the data. To get some specific properties use the authentication type as Anonymous instead of OAuth 2.0 (this is the default authentication for HubSpot which is mentioned in the documentation). Create a private app in the HubSpot account with the required scopes you need and get the access token. Use that token in the REST Api linked service with the anonymous authentication type and add the token in header section.

    Then connect that linked service with the data integration of the REST Api in your workspace and below the base URL, add your Api endpoint for that property in relative URL section.

    Save the data integration and make a copy data activity in the pipeline. Load the source data from the data integration REST resource which you made and sink that into Azure Data Lake Gen2 or your SQL server.

    All the properties which match to the URL endpoint will be copied into your server.