By default, an action sends everything. Every question, every answer.
Want something neater? Write your own message and drop the answers in with placeholders.
Where you can use them
- Send Email: To, Subject and Body.
- Webhook: URL, Headers and Body.
Leave Body empty and you get the full submission, nicely laid out.
Placeholders
Wrap a question’s name in double curly brackets: {{ email }}.
The name is the question in lower case, with spaces and symbols turned into underscores:
- “Email address” becomes
{{ email_address }}. - “Best Time to Call” becomes
{{ best_time_to_call }}. - “utm_campaign” stays
{{ utm_campaign }}.
Not sure of a name? Send a test from the preview and look at it in Submissions.
A few extras:
{{ widget.title }}is your widget’s name. Works in Send Email and Webhook.{{ ctx }}is the whole submission at once.
Examples
An email subject:
New callback request from {{ your_name }}
A Telegram message:
{{ your_name }} wants a call: {{ best_time_to_call }}
Phone: {{ phone_number }}
A webhook body:
{"email": "{{ email }}", "source": "{{ widget.title }}"}
A bit more power
If you’ve written a template before, these work too:
- If:
{% if what_is_it_about %}About: {{ what_is_it_about }}{% endif %}skips empty answers. - Loops:
{% for k, v in ctx.items %}{{ k }}: {{ v }}{% endfor %}lists everything. - Filters:
{{ your_name|upper }},{{ notes|default:"No notes" }},{{ message|truncatechars:100 }}.
Safe by design
For your safety and ours, templates can’t run arbitrary code. Anything that tries simply doesn’t work.
A typo, like a name that doesn’t exist, comes out empty instead of breaking the action.