Hi @somdutt,
Thanks for getting back to me.
If I understand you correctly you are asking what the differences between using our Webhooks API vs using a webhook action within a workflow would be. If that is the case let me explain further. Ultimately both approaches will ensure data is POST from HubSpot to the endpoint of your choosing.
1) Payload Data
If you use the “Webhooks API” the payload will not contain the same level of data as if you were to use the “Webhook action in a workflow”. The payload for a standard webhook implemented using the API would look something like this:
"objectId": 281751 //ID OF OBJECT
"propertyName": "email" //NAME PROPERTY
"propertyValue": "jackcoldrick@hubspot.com" //VALUE OF PROPERTY
"changeSource": "AUTOMATION_PLATFORM" //SOURCE OF CHANGE
"eventId": 3164844479 //UNIQUE ID OF EVENT
"subscriptionId": 213994 // WEBHOOK SUBSCRIPTION ID
"portalId": 2990812 // PORTAL ID
"appId": 204883 // ID OF THE APP
"occurredAt": 1578398232718 // TIMESTAMP CHANGE OCCURRED
"subscriptionType": "contact.propertyChange" //TYPE OF SUBSCRIPTION
"attemptNumber": 0 //ATTEMPT NUMBER X
In contrast if you choose to use the webhook action within a workflow you will receive a much more extensive payload - all of the data relating to the contact that was enrolled in the workflow. More information on the payload you would expect to see using this approach can be found here.
2) HubSpot Subscription
The Webhooks API is available to all HubSpot tiers. The Workflow webhook action is only available to our Enterprise tiers. More information on our APIs and the HubSpot tier required to access can be found here.
3) Objects
The Webhooks API will allow you to subscribe to the creation, deletion and/or property updates occurring on Contacts, Companies and/or Deals. There is no support at present for Tickets. The webhook action in a workflow can be used for Contact, Company, Deal and Ticket based workflows. So there is more flexibility for Service Hub users that might need to avail of webhooks.
4) Properties
The Webhooks API is unable to subscribe to changes occurring for certain properties. These are listed below:
- Contact properties:
- days_to_close
- recent_conversion_event_name
- recent_conversion_date
- first_conversion_event_name
- first_conversion_date
- num_unique_conversion_events
- num_conversion_events
- Deal properties:
However as a webhook triggered from a workflow will send all of the contact data it will include all properties with known values. So depending on what you are trying to do this can often be important to note.
5) Triggers
The Webhooks API simply lets you subscribe to any creation, deletion or updates to Contacts, Companies and Deals. It does not let you trigger webhooks based on more advanced behavior. The workflows tool we provide allows you to create a custom enrollment criteria that an object must meet before triggering the webhook. This could be anything from an activity being logged on a contact record, clicking a link in an email, viewing a particular page or a form being submitted.
I’ve done my best to give my take on the key differences. There may be other members in the community who wish to expand on what I’ve said. From my experience the above is the key differences/considerations. Ultimately the choice is up to you as to what method you want to use.
I hope this helps.
Jack