I’m trying to create a process listening for `contact.creation` events from a trial request form. What is the best way to filter those events for a specific form?
As it is now, when I get a `contact.creation` event I check the `e_submitted_form` APIs to see if the contact submitted the given event, but there seems to be at least some eventual consistency -- I’ve got to check for `e_submitted_form` a few times before it routinely shows up.
Is there a better way for me to be filtering the `contact.creation` event by a given form? Maybe a hidden field?
Hi @JWilner
To enable a unique identification of form submissions, we recommend adding a hidden field, `form_source`, to your HubSpot form. We suggest setting its value to `‘creation_request_form’`.
This field will be invisible to users but included in the contact properties when the form is submitted.
Additionally, we recommend setting up a workflow or custom code in HubSpot that triggers on the `contact.creation` event.
In this process, please verify the value of the `form_source` property. If it equals `‘creation_request_form’`, proceed with your specific workflow; otherwise, ignore the trigger.
This approach allows for immediate identification of events originating from your specific form without the need for repeated API queries using the `e_submitted_form` API.
I hope this will help you out. Please mark it as Solution Accepted and upvote to help another Community member.
Thanks!