By inserting variables in your email you can create dynamic emails based on form responses. Just think of:
- Triggering emails to different email addresses based on the form responses (e.g. send an email to the sales or HR team depending on the contact form response)
- Create dynamic emails by inserting variables in the subject or email body (e.g. sending the result of a quiz or test with a customized message based on the score)
There are 3 types of form blocks that can be inserted into the recipient email address field, subject, or email body of your email:
- Input fields (e.g. email, name)
- Hidden fields (e.g. traffic source)
- Calculated fields (e.g. score of a test or quiz)
Let's say you would like to send an email to the sales, marketing, or HR team depending on a response to your Tally contact form.
- Create a contact form and insert a calculated field. Name it (Recipient email), choose
textas value, and enter an email address as default value (email@example.com).
conditional logicand define when your respondent chooses Sales as the question topic, then assign the text firstname.lastname@example.org to your calculated field (Recipient Email).
- Repeat the same conditional logic for the dropdown options Marketing and Sales.
- Go to form settings, switch on Self email notifications, and type
@to insert the calculated field Recipient Email.
- Add a subject and insert the dropdown field Topic of your question. When the respondent chooses Sales from the dropdown the subject will be: New contact form response for team sales
- Insert input fields as you like to customize the email body
The email notification will look like this when the respondent selects Sales.
In the case of a quiz or a test, you might want to send a customized email based on the score or result of the respondent. Here's how it works:
Create a quiz or get started with this template. Make sure you insert a calculated field to calculate the score of your quiz (as shown in the logic in the template) and an email input field to send the results to the recipient.
- Insert another calculated field and name it (Quiz result). Choose
textas value and enter a message as default value (Congratulations!).
- Insert conditional logic and define when the score is lower than 15 (out of 30 in this example) than assign the text Bummer, try again.
- Go to form settings, switch on Respondent email notifications, and type
@to insert the email input field.
- Add a Reply to email address (optional)
- Add a subject
@to insert the calculated field Quiz message and Score.
This is what the respondent email will look like when the score is higher than 15.