HubspotA full platform of marketing, sales, customer service, and CRM software
HubSpot offers a full stack of software for marketing, sales, and customer service, with a CRM at its core. They can be used independently or together.
It is possible to use an event in Hubspot as a trigger to commence a Workflow. So you could, for example, trigger a workflow every time a specific type of update is made to a contact.
To use the Hubspot Trigger, you should create a new Workflow and choose Hubspot as your trigger.
Now click on the settings wheel in the top left of the workflow editor:
You can then copy your workflow webhook url:
Note: Make sure to enable your workflow before going any further, otherwise your webhook will fail:
Now go to your Hubspot app developer page at e.g.
Click on the app you wish to receive updates from and then on 'Webhook subscriptions' before entering the webhook url (retreived in step 1) into the Target URL box:
Click on Create Subscription to set up an event trigger:
As you can see, it is possible to fine tune the update event. The above example shows how you can trigger the webhook only if the hubspotscore for a contact is updated.
Once you have created the subscription you will see the test webhook page:
Here you can enter the webhook url (from step 1) again and click Test to send a sample payload to your workflow.
Remember from Step 1 to check that your workflow is enabled. Then click on the Debug tab to look at the logs and you should see the payload from the webhook test:
In a live Workflow environment you could extract data from the webhook payload according to our basic working with data guide and pass it on to other Connectors by using a json path such as
This section will take you through using our main Hubspot connector which allows you to authenticate with your Hubspot account and make use of Hubspot APIs to perform operations which can both update Hubspot data and pull it to transform and push to other third-party service connectors.
When using the Hubspot connector, the first thing you will have to do is click on 'New Authentication' in the step editor:
In the Hubspot authentication dialog you can then set the scopes that are required to access your account and interact with the relevant data sets:
Note that the scopes required will depend on the specific user/app/portal setup of your account. So, for example, if you tick the 'hubdb' box then the user you are authenticating with must have access to a portal with the HubDB tool. A helpful discussion thread on authentication scopes is found here.
So before clicking 'Next' make sure you have only ticked the scope boxes which your account has access to and which are required for the operations you want to carry out.
Create a new workflow with a Manual Trigger, a Hubspot connector, a Loop Collection and a second Hubspot connector:
For the first Hubspot connector, authenticate as above and choose the List Contacts operation.
If you were to run the finished workflow, the log from a successful output would show that this operation returns an array of contacts objects:
Then set the Loop Collection connector to Loop List and enter
$.steps.hubspot-1.contacts as the List in order to grab the above contacts one-by-one:
You will note from the above output that
vid is an output field. So you can then, for each contact that is fed by the loop, grab the
vid for the second Hubspot connector:
The Find contact by ID operation is chosen and
$.steps.loop-1.value.vid gets the
vid of the contact from the Loop connector to enter it as the Contact ID to pull the contact from Hubspot.
Once the workflow is set up, click 'Run Workflow Now' and then click on the Debug tab to look through all the inputs and outputs of a successful run of the workflow:
There are 5 types of engagement activity in Hubspot, Note, Email, Task, Meeting, and Call. The properties for each type is different. To create an engagement, the type needs to be selected from the dropdown. When updating an engagement, the type needs to be known beforehand. This can be obtained from the
Get engagement operation.
In this example we'll create a Call engagement, linking it to a contact within Hubspot.
The input is split into 3 areas, Engagement details, Metadata and Associations. Engagement details are fields that apply to all engagement types, currently these are owner and the timestamp of when the engagement activity occurred.
Metadata consists of the type specific properties for the engagement. In this example, we can see the Call properties consists of From number, To number, Duration, Recording URL and Body (call notes).
The associations allow you to link the engagement to a contact, company or deal. Doing this makes the engagement appear on that particular contact/company view in the Hubspot account UI.
To update an engagement, two things are required, the engagement ID and the type of the engagement (so the correct metadata properties can be chosen).
Important: the correct metadata option must be selected even if not updating any metadata properties e.g. if only updating owner ID.
If not updating any metadata, ensure you are setting the fields to
<no value> and not touching the drop downs to ensure no data gets overwritten with empty strings.