Reports are essential for any type of business. If you are looking for a way to send reports from your applications, you can create Application tasks to perform such a function.

In this article, you will learn how to create an Application task to automatically generate an email with a report of your choice.

Steps to create the email task:

  1. Log in to your account and open your application to edit it.
  2. Select Tasks on the sidebar. This will display the current tasks for this application.
  3. Create a new task and select Configure… option.
  4. Set the Frequency to Daily for a daily report or choose your preferred frequency. Set the time and time zone to schedule the task to run.
  5. Select Variables from the left panel and add a Table Variable. Name the new table variable as Reports.

    Note: Variables are user-defined variables for holding static values or results of calculations. Table variables are used for temporarily storing a set of records to be used as the data source for other Action blocks.

  6. Select the SET TABLE VARIABLE. This variable will be used to store the report content in the next step.
  7. Configure the SELECT block to get your content for the report. In the example below, we used the SELECT to get daily orders from the Orders table for our report.
  8. Select Actions from the side panel and add the SEND EMAIL block. Enter values for FromTo and Subject fields.
  9. Use the picker icon to insert the table variable Reports into the Message field.

    Note: In HTML mode, you can customize the email content by adding your own CSS or HTML in the message area. Click  to use HTML editor to edit your content.

  10. Save and enable the application task.
  11. Your application task is now saved and scheduled for the next run time. A report like this will be sent to the recipient’s email address defined in the above step.