Determining which form submission triggered a workflow so we can use that in if blocks

We’re looking to create a generic workflow that will handle all form submissions on our site (we have a few dozen of them).
Currently, we set the enrollment trigger to be “form submission” and we check off all of the forms we want to consider. Fine.

The problem is that later in the workflow, we may want to take different actions depending on *which* form triggered the workflow. As far as we can tell, there’s no way in the workflow to determine this. Why is this a problem? Consider this scenario:

  • We’ve got two forms - form A and form B
  • Our workflow trigger is submission of either form
  • For both forms, we’ll perform some common actions - setting contact properties, sending internal emails, etc.
  • Later in the workflow, we have an if block that will:
  • Check if form A was submitted and send a follow up email
  • Check if form B was submitted, send a follow up email and set additional contact properties that we didn’t set for form A

The problem with this model is the “if” block. We can determine that a contact has filled out a form but we don’t know that the running instance of the workflow was triggered as a result of form A or form B. So, if a contact fills out form A and then later fills out form B, the if block will check their form submission history and see that they’ve filled out form A. It will never get to the form B branch.

Now, we’ve worked around this by adding a condition in the if block that checks “last page seen” on the contact record so we can say “did they fill out form A from a particular page” but this isn’t something that’s going to scale as we add more forms. Additionally, “last page seen” isn’t reliable because the contact could have navigated elsewhere on our site so that value won’t line up with the value we want in order to determine which form they submitted.

What we’d really like to see is some sort of variable in the workflow that indicates which form was submitted. If we had that, our if blocks would just check that variable and act accordingly.

How are other people handling this? We know we can create a 1:1 mapping between forms and workflows but that will make maintaining all of this really challenging so we’d prefer to keep the logic in a single workflow, if possible.

Thanks.

- Terence

Hi @tarh33l,

You can use the property Recent conversion for this. This is formatted as the name of the page the form was submitted on, followed by a colon, then the name of the submitted form (i.e., Name of page: Name of form). This allows you to create branches based on “Recent conversion contains any of [form name]”

There still remains the chance, yes, that while a contact is enrolled, they submit another form and any branching based on Recent conversion is incorrect as of that moment. However workflows usually execute fairly fast and it’s an unlikely scenario. You’d have to keep it in mind when working with delays however.

Best regards!

Thanks Karsten. While I think that’s better than using “last page seen” we’d need to check the contents of that string to see if it contains the name of the form. If the form names ever change, the workflows will break.

I was really hoping that HubSpot put some sort of context on the workflow execution that could then be inspected by the workflow tasks. Things like:

  • What thing triggered the workflow (and then any properties of that thing like form name)
  • When was the workflow kicked off
  • Technology used when the workflow was kicked off (was this a form filled out in a browser, what browser, mobile or desktop, etc.)
  • Etc.

All of the above *could* be helpful for us to really tailor workflow actions.

Hi @tarh33l,

100% agree that this would be useful, it’s simply not available (yet?). You could suggest it in the HubSpot Ideas section of the community. The product team evaluates submissions in that section based on popularity.

Best regards!

Did you ever get this sorted? Having the same issue.