Hi,
Is there a way to add a new custom property as trigger for webhooks?
I noticed there are only a handfull of them listed in the Create Subscription(property change).
Thank you!
Hi,
Is there a way to add a new custom property as trigger for webhooks?
I noticed there are only a handfull of them listed in the Create Subscription(property change).
Thank you!
Hey @sync2sys!
This is a great question.
To solve this, I’ve created a service that checks for new properties every day and add the Webhooks subscriptions that are missing.
1) List all properties for a specific object
curl --request GET \
--url ‘https://api.hubapi.com/crm/v3/properties/{OBJECT_TYPE}?archived=false’ \
--header ‘authorization: Bearer YOUR_ACCESS_TOKEN’
(at this point you will need a Developer API Key to fetch information from your OAuth app)
2) Get all active Webhook subscriptions
curl --request GET \
--url ’
https://api.hubapi.com/webhooks/v3/{HUBSPOT\_DEVELOPER\_APP\_ID}/subscriptions?
hapikey={HUBSPOT_DEVELOPER_API_KEY}’
3) Diff existing properties from already active Webhook subscriptions
4) Create new subscriptions for missing properties
curl --request POST \
--url ‘https://api.hubapi.com/webhooks/v3/{HUBSPOT\_DEVELOPER\_APP\_ID}/subscriptions?hapikey={HUBSPOT\_DEVELOPER\_API\_KEY}’ \
--data '{“active”: true, “eventType”: “{OBJECT_TYPE}.propertyChange”, “propertyName”: “{PROPERTY_NAME}” }’