Go to https://app.pushmetrics.io/reports 

You will find two options: (classic) reports or the new "workflows".

Select create a new workflow.

This will give you two extra options compared to regular reports:

1) "Check SQL condition before execution"

This let's you run a SQL query against your database and only run the report if a certain condition is met.

E.g. you can check for True , False , Empty  or Not Empty  results.

In order to use this feature, you need to create a "saved query" first in SQL Lab (https://app.pushmetrics.io/superset/sqllab) and SAVE it.

You can then reference this saved query in the workflow form.

2) Parameterized Execution (Mail Merge)

This let's you loop through a set of recipients or report parameters and execute many variations of a single report at once. This was previously the "dynamic recipient" feature.

If you select "Parameterized Execution (Mail Merge)" you will be asked to provide parameters in JSON format:


        "email_subject": "Monthly Revenue for John",
        "client_name": "John Doe",
        "email_recipients": "john.doe@pushmetrics.io",
        "slack_recipients": "John Doe (U4FPP5UU8)",
        "filtername": "Region",
        "filtervalue": "Asia"
        "email_subject": "Monthly Revenue for Dave",
        "client_name": "Dave Doe",
        "email_recipients": "dave.doe@pushmetrics.io",
        "slack_recipients": "general (C4FPP5UU8)",
        "filtername": "Region",
        "filtervalue": "North America"

 You have to create one set of variables for each iteration of the report.

In the next step, you use the variables in the report option (filters, recipients, email body, etc.) with double curly brackets, e.g.  {{ email_recipients }} 

Please note that once you have saved a report, it takes 2-3 minutes to fully propagate the new workflow, i.e. the first delivery might take a little longer.

Did this answer your question?