Easily loop over SQL Query results and send an email for each iteration. Combine this with an IF statement to create a full-fledged, data-loaded email alert.
In Query.me Notebooks you can now use executable blocks and combine them using IF/ELSE
and FOR-LOOPS
to create sript-like workflows that automate everything.
1) Create or Edit the SQL-block in the Template:
Every column returned by your query can become an Email. The data avaiable in each row will be available as variables.
2) Create or Edit the FOR
loop in the Template.
Reference the query you would like to loop over using query_1.data()
.
Feel free to combine IF
statements to make emails conditional.
3) Create or Edit the Email-block in the Template:
Design your message and simply reference data using JINJA
.
E.g.: {{ row['column_name'] }}
5) Test your design: Press play ▶️
Click Actions in the Navigation and choose Execute Page to run your workflow.
Make sure to adjust your email recipients before you test-run.
INSERT
statement to Google SheetsEasily loop over SQL Query results and send an email for each iteration. Combine this with an IF statement to create a full-fledged, data-loaded email alert.
Sign up and start using Query.me for free.
Or schedule a demo and talk to us.