-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathexample.template
20 lines (14 loc) · 991 Bytes
/
example.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{% set avgrating = (rows|sumcolumns(['Rating1', 'Rating2']))/(rows|length)/2 %}
{% for row in rows|sortedby('Rating2') %}
{# you can specify columns by both their name and their index #}
Hello {{ row[0] }} {{ row['Last Name'] }},
The {{ row['State'] }} branch of ACME Corporation would like to publish your comment "{{ row.Comments }}", which you provided in the Google Form in our latest publication, The ACME {{ row['State'] }} Times.
{% if row['Rating1']|int < avgrating %}
Additionally, since you rated us less than the average rating of {{ avgrating }} on the Google Form, we would like to ask for feedback on what factors led to your this rating. This feedback will not be shared publicly.
{% elif row['Rating1']|int >= 9 %}
Additionally, since you gave us a high rating on the Google Form, we would like to ask for feedback on what we did well during your visit. This feedback will not be shared publicly.
{% endif %}
Thanks,
Johnny Cossack
CEO of ACME Corporation
{% endfor %}