Send data to and get them from HubSpot straight into your workflow.
crm.objects.deals.read
In Next Matter select the workflow that should integrate with HubSpot, and add a new integration step to get deal details.
Click Settings and enter the following details:Tip: Get a HubSpot Deal ID. You can find the ID of a deal on the deal record itself under the property Deal ID.
Headers: Content-Type: application/json
Headers: Authorization: Bearer HUBSPOT_API_KEY
Create a variable for the deal name with the value of: $.properties.dealname
and for the contact association ID with the value of $.associations.contacts.results[0].id
Save your changes.
Create a new integration step to get contact details.
Click Settings and enter the following details:
Method: POST
URL: https://api.hubapi.com/crm/v3/objects/contacts/{2. Get Deal - Integration step - contact_association_id (plain)}
The {VALUE} is a data reference to the Next Matter variable.
Headers: Content-Type: application/json
Headers: Authorization: Bearer HUBSPOT_API_KEY
Create a variable for the contact ID with the value of: $.id
and for the contact email with the value of $.properties.email
, and for the contact’s first name with the value of $.properties.firstname
.
Save your changes.
In Next Matter select the workflow that should integrate with HubSpot, and add a new integration step.
Click Settings and enter the following details:
You can also have a step that searches HubSport for a deal by property. In this case, make a call to https://api.hubapi.com/crm/v3/objects/deals/search
Headers: Content-Type: application/json
Headers: Authorization: Bearer HUBSPOT_API_KEY
Body:
Method: POST
Create a variable for the contact ID with the value of $.results[0].id
.
If you search for a deal, create a variable for deal ID with the value of $.results[0].id
.
Save your changes.
In Next Matter, select the process that should integrate with HubSpot, and add a new integration step to get deal details.
Click Settings and enter the following details:
Method: POST
Headers: Content-Type: application/json
Headers: Authorization: Bearer HUBSPOT_API_KEY
Body:
Create a variable for the ticketID
with the value of: $.id
.
Save your changes.
To push the ticket to the next stage, create a new integration step.
Click Settings and enter the following details:
Find HubSpot owner ID
Click the Settings cog in the main menu in HubSpot.
In the left-hand menu, click Properties.
Under Contact properties, type Owner in the search bar.
Hover over Contact owner and click View.
At the bottom of the next page, your HubSpot Owner IDs are listed in the Dropdown options table in the Internal Value column.
Method: PATCH
URL: https://api.hubapi.com/crm/v3/objects/tickets/{2.Create Ticket - Integration Step - TicketID(plain)}?hapikey=KEY
The {VALUE} is a data reference to the Next Matter variable. Make sure to replace the KEY variable with your HubSpot API key.
Headers: Content-Type: application/json
Headers: Authorization: Bearer HUBSPOT_API_KEY
Body:
Save your changes.