Send segmentations from HubSpot to Synerise

Published August 17, 2023
Modules
Difficulty
Selected Clients
emuca logo

This use case demonstrates the integration between Synerise and HubSpot. The integration allows you to send any data collected in HubSpot to Synerise. In this way, you can supplement the data you collect in Synerise with additional information you gather in HubSpot, unlocking the full potential of your data.

In this use case, we will focus on creating an integration that imports customer’s data from HubSpot into Synerise.

Prerequisites


  • A HubSpot Pro account is required.
  • Your workspace must have API key permission for creating profiles: API_BATCH_CLIENT_CREATE

Process


  1. Create an incoming integration for HubSpot clients data.
  2. Create a workflow for handling incoming data from HubSpot.

Create an incoming integration for HubSpot customer data


In this part of the process, create incoming integrations in Synerise to which you will send customer’s data from Hubspot.

  1. Go to Automation icon Automation > Incoming > New integration.

  2. On the pop-up, select Without authentication.

  3. Enter the name of the webhook.

  4. In the Endpoint section, click Define.

    Important: The URL field is already filled in with the endpoint to which the data from HubSpot will be sent.

  5. Optionally, you can add an icon to this integration.

  6. Confirm by clicking Apply.

    The view of configuration of the Endpoint section
    Configuration of the Endpoint section
  7. In the Incoming data section, click Define.

  8. Click Retrieve data.
    There are two ways of retreving data:

    1. You can send direct cURL request.

      Click to expand the instruction on sending cURL request

      Right after you click the button, send a request to the endpoint in the Endpoint section with the sample of data that will be sent through HubSpot. The system waits for the incoming request for 1 minute and 30 seconds.

      Important: Replace the endpoint URL from the example below with the endpoint URL from step 4.

      An example of cURL request:

       
            curl --location 'https://api.synerise.com/automation-endpoint/endpoints/112ae31f-1a3e-4729-89ae-3b37eb7475f4/trigger' \
        --header 'Content-Type: application/json' \
        --data-raw '{
            "associated-company": {
              "company-id": 43535242,
              "portal-id": 123413,
              "properties": {
                "address": {
                  "value": "NYC 123 Main Street, US"
                },
              
                "city": {
                  "value": "NEW YORK"
                },
                "cliente": {
                  "value": "123413"
                },
                "closedate": {
                  "value": "1519039262794"
                },
                "country": {
                  "value": "USA"
                },
                "createdate": {
                  "value": "1519038967696"
                },
          
                "associated-owner": {
                  "email": "joedoetesthb@example.com",
                  "first-name": "",
                  "hubspot-user-id": 123454321,
                  "last-name": "",
                  "type": "PERSON"
                }   ,
                "canonical-vid": 11
                
              }
            }
          }' 
        

    2. You can send Webhook from HubSpot to the endpoint you created earlier in the process.

      Click to expand the instruction on sending webhook from Hubspot

      Navigate to the Workflows in the HubSpot and create a new workflow that will send a webhook with the selected clients segments to Synerise.

      HubSpot workflow configuration
      HubSpot workflow configuration

      1. Define the workflow trigger, which in our case should be a segment of clients which data will be send to Synerise.
      2. Configure the webhook:
        1. Select POST method.
        2. Enter the webhook URL (the endpoint you created earlier in the process).
        3. Select the appropriate authentification type.
        4. Choose the properties you want to include in the webhook request body.
        Webhook configuration
        Webhook configuration
      3. Test your webhook to see the response and be able to select which fields to output for use later in your workflow.
      4. Save your configuration and finish the workflow.

  9. When the endpoint receives data from the request, verify the list of variables. If the variables include those which are in the payload, click Define. If not, to re-send the request, click Start again, and wait for the results.

    The view of collected variables from the request
    Collected variables from the request
  10. Click Save & publish.

Create a workflow for handling incoming data from HubSpot


As the final part of the process, create a workflow which captures data sent to the incoming integration you created in the previous part of the process and creates customer’s profiles with the attributes defined earlier in the process. The workflow starts with the business event trigger (for customer’s data) that is launched every time the data from HubSpot is sent to Synerise. In response to that, customer’s profiles are created.

  1. Go to Automation icon Automation > Workflows > New workflow.
  2. Enter the name of the workflow.

Define the business event node

  1. As the trigger, select Business Event. In the configuration of the node, select the incoming integration for customer’s data you created as the first part of the process.

  2. Confirm by clicking Apply.

    Business Event node configuration
    Business Event node configuration

Define the Outgoing Integration node

In the Outgoing Integration node, create a webhook that will create a customer’s profile with the selected attributes sent from HubSpot.

  1. From the dropdown list, select the Outgoing Integration node.

  2. Click the node. In the configuration of the node:

    1. Select the Custom webhook.

    2. Enter the name of the webhook.

    3. Select the POST method.

    4. Enter the endpoint URL: https://api.synerise.com/v4/clients/batch

    5. Enter the following headers:

      • set the content-type header to application/json (default),
      • set the api-version header to 4.4
    6. Enter the request body. For the scenario described in this use case, the body is as follows:

              [
        {
      
          "email": "{{request.body['associated-company'].properties['associated-owner'].email }}",
          "city": "{{request.body['associated-company'].properties.city.value}}",
       
          "attributes": {
            "closedDate":"{{request.body['associated-company'].properties.closedate.value}}",
            "createdate": "{{request.body['associated-company'].properties.createdate.value}}"
          },
          "tags": [
            "hubspot integration"
          ]
        }
      ]
              

      Note: This is just an example, you can create JSON according to your business needs. You can use any attribute that comes in the request from HubSpot. You can read more about it here.
    7. In the Authorization section, select By API key.

    8. From the dropdown list, select API key that has permissions to create customer’s profile.

      Tip: You can read more about API keys here and you can find more information about the endpoint and required API key permissions here.

  3. Confirm by clicking Apply.

    Final configuration of the Outgoing Integration node
    Final configuration of the Outgoing Integration node

Add final setting to your workflow


  1. Add the End node.

  2. Launch the workflow by clicking Save&Run.

    Final view of the workflow configuration
    Final view of the workflow configuration

Check the use case set up on the Synerise Demo workspace


You can check the configuration of all steps described in the use case directly in Synerise Demo workspace:

If you don’t have access to the Synerise Demo workspace, please leave your contact details in this form, and our representative will contact you shortly.

😕

We are sorry to hear that

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

😉

Awesome!

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

Close modal icon Placeholder alt for modal to satisfy link checker