# Dynamically send form submission notifications

**URL:** <https://community.hubspot.com/t/dynamically-send-form-submission-notifications/48148>\
**Category:** Lead Capture Tools\
**Tags:** forms\
**Created:** [December 7, 2021, 5:44pm UTC](https://community.hubspot.com/t/dynamically-send-form-submission-notifications/48148 "2021-12-07T17:44:08Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![amjones2](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/amjones2/32/68963_2.png) [@amjones2](https://community.hubspot.com/u/amjones2)\
**Post date:** [December 7, 2021, 5:44pm UTC](https://community.hubspot.com/t/dynamically-send-form-submission-notifications/48148/1 "2021-12-07T17:44:08Z")

</div>

We use the form embed code to display forms across our site. We are looking to dynamically send form submission notifications based on where the lead came from. The current idea is to use a url string to pre populate potentially a hidden field and then somehow use that to trigger the notification email once submitted.

Is there a way to use onFormSubmit, to alter who receives a form submission notification?

---

<div class="post-metadata">

**Author:** ![karstenkoehler](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/karstenkoehler/32/68554_2.png) [@karstenkoehler](https://community.hubspot.com/u/karstenkoehler)\
**Post date:** [December 8, 2021, 5:49am UTC](https://community.hubspot.com/t/dynamically-send-form-submission-notifications/48148/2 "2021-12-08T05:49:36Z")

</div>

Hi @amjones2,

This was covered in an earlier thread, I believe [this is what you’re looking for](https://community.hubspot.com/t5/APIs-Integrations/How-can-I-collect-current-page-URL-in-form/m-p/239979/highlight/true#M18875).

Hope this helps!

---

<div class="post-metadata">

**Author:** ![amjones2](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/amjones2/32/68963_2.png) [@amjones2](https://community.hubspot.com/u/amjones2)\
**Post date:** [December 8, 2021, 2:59pm UTC](https://community.hubspot.com/t/dynamically-send-form-submission-notifications/48148/3 "2021-12-08T14:59:43Z")

</div>

This isn’t exactly what I am after. This is a good solution to take a value from the url, but what i am after is looking at a url string (lets say something like ?lead=someone@email.com) and taking that email value and sending the form notification email to that email address. This would be a way to send our various business development people any leads their pages generate without having to make a new form for each person.

---

<div class="post-metadata">

**Author:** ![karstenkoehler](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/karstenkoehler/32/68554_2.png) [@karstenkoehler](https://community.hubspot.com/u/karstenkoehler)\
**Post date:** [December 9, 2021, 8:03am UTC](https://community.hubspot.com/t/dynamically-send-form-submission-notifications/48148/4 "2021-12-09T08:03:11Z")

</div>

Hi @amjones2,

You can pass on parameters with the form submission following these steps: [How to pass UTM parameters into a HubSpot form | Align.ly](https://www.align.ly/blog/how-to-pass-utm-parameters-into-a-hubspot-form/)

However, you cannot influence who is being notified based on these parameters directly.

This would require a Professional or Enterprise subscription which is looking at the string/parameter and triggering an internal email send based on that.

Without a Professional subscription and without workflows, this is currently not possible out of the box. It would require more extensive development, more than a few lines of code leveraging the forms API.

Let me know if you have any follow-up questions!

---

<div class="post-metadata">

**Author:** ![amjones2](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/amjones2/32/68963_2.png) [@amjones2](https://community.hubspot.com/u/amjones2)\
**Post date:** [December 9, 2021, 4:25pm UTC](https://community.hubspot.com/t/dynamically-send-form-submission-notifications/48148/5 "2021-12-09T16:25:10Z")

</div>

We do have a professional account. How would I go about doing this? Is there some documentation out there that I could reference?

---

<div class="post-metadata">

**Author:** ![karstenkoehler](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/karstenkoehler/32/68554_2.png) [@karstenkoehler](https://community.hubspot.com/u/karstenkoehler)\
**Post date:** [December 9, 2021, 4:39pm UTC](https://community.hubspot.com/t/dynamically-send-form-submission-notifications/48148/6 "2021-12-09T16:39:35Z")

</div>

Hi @amjones2,

Not specifically but I can outline the steps for you.

First, you need to set up a custom property for the parameter you want to use, as explained in this article: [How to pass UTM parameters into a HubSpot form | Align.ly](https://www.align.ly/blog/how-to-pass-utm-parameters-into-a-hubspot-form/)

For my example in the screenshot below, this property is called (very creatively) “Single-line text”.

You would then create a contact-based workflow which looks like this:

 ![karstenkoehler_0-1639067649109.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/f/c/fc45d2817329ae5873636a82ebec6a4c136ff82b.png)

The enrollment trigger is the submission of the form that you’re setting this up for. When you click on “Contact enrollment trigger”, the right sidebar should pop open. Select the tab “Re-enrollment” and make sure that re-enrollment is enabled for repeated form submissions.

Additionally, I would add the criterion that your custom property from above should be known.

In a next step, you would create an if/then branch which checks the value in your custom property passed on from the form. You will then simply map the value to a user in HubSpot. If the email address is [email1@domain.com](mailto:email1@domain.com), send an internal email to the corresponding user. (In my screenshot it says Contact owner but that’s where you can select any user in your HubSpot portal.)

(It is not possible to have HubSpot read the email address from the property directly and send an email there. It might seem redundant but it’s the only way.)

For each recipient, you would have to create one branch, I stopped at two.

Also, since you’re mapping the property to a recipient, the parameter value doesn’t need to be the email address, it could also be another key.

If you need more info on the workflow actions and what they do, this knowledge base article will help: [Choose your workflow actions](https://knowledge.hubspot.com/workflows/choose-your-workflow-actions)

Let me know if you have any follow-up questions!

---

<div class="post-metadata">

**Author:** ![amjones2](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/amjones2/32/68963_2.png) [@amjones2](https://community.hubspot.com/u/amjones2)\
**Post date:** [December 9, 2021, 4:57pm UTC](https://community.hubspot.com/t/dynamically-send-form-submission-notifications/48148/7 "2021-12-09T16:57:42Z")

</div>

“(It is not possible to have HubSpot read the email address from the property directly and send an email there. It might seem redundant but it’s the only way.)”

This was the ultimate question I was after. Thank you for answering. I did know about the workflow setup but was hoping of a dynamic way to trigger the emails vs setting each one up individually. We have potentially hundreds of people that could generate the leads and I don’t think the workflow setup is tenable and would be problamtic to maintain as people join/leave the company. Thank you for your replies!

---

<div class="post-metadata">

**Author:** ![karstenkoehler](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/karstenkoehler/32/68554_2.png) [@karstenkoehler](https://community.hubspot.com/u/karstenkoehler)\
**Post date:** [December 9, 2021, 5:31pm UTC](https://community.hubspot.com/t/dynamically-send-form-submission-notifications/48148/8 "2021-12-09T17:31:05Z")

</div>

Hi @amjones2,

Agreed, for a potentially long list of email recipients this wouldn’t work. At this stage, this would be the only out-of-the-box solution.

The alternative would be [custom code actions in workflows](https://knowledge.hubspot.com/workflows/use-custom-code-actions-in-workflows), requiring development and an Operation Hub Professional subscription.

If you think my posts were helpful and consider this thread closed, you could accept this post as a solution. I’d appreciate it!

Best regards!
