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.
- Log in to your account and open your application to edit it.
- Select Tasks on the sidebar. This will display the current tasks for this application.
- Create a new task and select Configure… option.
- 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.
- 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.
- Select the SET TABLE VARIABLE. This variable will be used to store the report content in the next step.
- 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.
- Select Actions from the side panel and add the SEND EMAIL block. Enter values for From, To and Subject fields.
- 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.
- Save and enable the application task.
- 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.