Scheduled Bot within a date range

Is there a way to send a scheduled email which includes only the week priors records?

Between Sunday at 18:30pm and the next Sunday at 18:30pm.

0 3 71
3 REPLIES 3

Yes.  I assume you want to somehow summarize those records into a single emailed report?

You will need to implement a template that gathers the rows you wish to be reported on, performs the calculations and then formats the results.  When the Bot runs, it will generate this template into a document that is attached to an email.

You can refer the article on how to Use templates in an automation to get started with creating your template.

The Bot itself is fairly simple.  The Event is set as a Scheduled Bot with the "For each row in a table" setting off.  The Process part of the Bot is set as an Email Task and refer to the template you create to generate and attach the resulting document to an email.  The template does all of the critical work.

This is just one approach but is probably the most common.

I hope it helps!

Thank you for this. Yes into single report.

What template would you recommend, I was considering CSV?

And I was also considering a 'Start' expression, would that be correct?


@Gregorrrry wrote:

What template would you recommend, I was considering CSV?


There are templates and then there are the generated documents.  Templates are created in either Google Docs,  MS Word or MS Excel.  Google Docs are the best supported, in my opinion.

The template is parsed to generate a document- list of types shown below.   Which you choose depends on what kind of report you want to send.  If you are looking for a dump of row data or something easily imported into some other software tool, then a CSV may be the way to go.  Commonly, formatted reports are generated into PDF documents.

NOTE:  There is a CSV action which will perform an export of rows based on the datasource given, table or Slice, into a file.  This may be easier than creating a template... if a CSV file is all you want.  I have not yet used this so I am not certain about where the resulting file is saved and if it can easily be attached to an email, though I think this should be straight forward to do.

Generated Doc Types Supported

Screenshot 2022-12-20 at 8.16.05 AM.png


@Gregorrrry wrote:

And I was also considering a 'Start' expression, would that be correct?


Yes, if your goal is to produce a single file/document from a set of rows, whether it is a CSV or some formatted summarized report, you MUST collect the included rows using a START/END expression inside a template. 

Pro Tip:  There are occasions where you may want a "flexible" reporting system where a user can specify what rows are included through selected criteria and/or user specified Date ranges.  In these cases, you would create a table to house these user selected criterion and setup an automation that sends this "reporting" row to the template.  The template uses the criterion in a START expression to dynamically select the rows to be included in the report/file.

 

Top Labels in this Space