Automated Email Schedules

Introduction

Email Schedules allow admins/analysts to schedule a report/dashboard to be send to a group of recipients via email. The feature can apply to multiple use cases such as:

  • Daily summary metrics email to send to management team every morning
  • Weekly export of data via email to multiple external partners outside of your company (with each partner only see their own data)
  • Email alert so you get email notification when something wrong happens

Sample Email

Managing Email Schedules

You can manage email schedules 2 ways:

  • Individual Report/Dashboard: In report/dashboard view page, click on Settings > Email Schedules
  • All Email Schedules: Click "Email Schedules" on the left navigation

New

Setting Up Email Schedule

To setup email schedule for a report/dashboard, in the report/dashboard view page, click on Settings icon > "Email Schedules"

Select

Then Click on Create, you get the following screen:

New

Here you can set up your email schedule, you need the following info:

  • Title: Optional, will use as the email subject, if left blank it will use the report's title
  • Schedule: select your scheduling here (every X hours, daily, weekly, monthly, etc)
  • Recipients: List of email addresses, one email per line.
  • Filters: Set the filter values for the report. For date filter, you can use relative date (to the scheduled execution time), e.g. "today", "2 days ago", "3 months ago", etc. Fixed date option is also available by clicking on the Calendar icon and choose the required date.

Note:

  • It's likely that the email will not arrive at the exact timing scheduled, this is because they need to wait for the query to execute.
  • We use a reliable third party email service to deliver email. If for some reason when sending the email we cannot reach the 3rd-party service, we retry up to 3 times before raising error.

Setting Up Preferred Timezone

For a more intuitive scheduling experience, you can set your time zone preference by going to the user menu on the top right and click on 'Settings' link. Choose your preferred timezone from "Time Zone" panel and click on "Select" button.

Note: this is your personal timezone and is meant for displaying purpose

Dynamic Variables

We support 2 variables {{$today}}, {{$yesterday}} that you can pass in the email body and subject. This helps you easily keep track the date the email is sent.

Example: A subject like this Sales report for {{$today}} will become Sales report for 2018-05-8 Tue when it is sent

Email Schedule Settings

Setting Sender Name & Email Address

We allow customizing sender name and address of these scheduled email. You can find this in Admin Settings.

Failure Notification

If for some reason, the email schedule fails to run and deliver, the report owner will be notified via email on the failure.

If you want to add your Data team mailing list to the group, you can set the Email Failure Recipients List option (in Admin Settings)

Email Alert

You can setup email alert to notified you with abnormal behaviour. For example the below schedule will check every 15 minutes and send email when there are failed background jobs

Email Alert

The SQL query would look something like:

SELECT * FROM background_jobs
WHERE status = 'failed'
  AND created_at > NOW() - INTERVAL '15 MINUTES'