Important! Read this.
We have launched a new documentation website. If you're using Enterpise Edition 10 (or higher) or Express/Business Edition 2.4.1 (or higher), visit this page.
|Variable name||Type||Description||Default value|
|DateTime||the current date to calculate date period|
|String||the path to the Excel template where the data will be saved|
|Table||already filtered data from the site for the latest seven days.|
|DateTime||the press release date from the web page|
|DateTime||the start date required to calculate the period|
|String||the subject of an Outlook email with the attachment to be sent to the recipient|
all the data scraped (Date, Title, Release No, Link) from the last web page
|String||the email to send the Excel file to|
Description: The group of actions is required to calculate period of dates from the current date to seven days before today. The whole group is reusable in other projects.
How To Reuse
To reuse the script, change the text on the 6th row of the script
Period.ofWeeks(1) to the period you would like to calculate. For example:
Period.ofWeeks(2)– calculate the date two weeks before today
Period.ofDays(3)– calculate the date three days before today
|The action saves current date to the |
Groovy script in action 3 calculates the period of date in the variable
Description: The group of actions is required to scrape information from the website https://www.sec.gov/ and then filter it, so only press releases for the latest seven days are saved to the
|Exception handling||The exception handling is added, so the script can be opened in a default browser installed on your machine (Google Chrome, Mozilla Firefox, or Internet Explorer).|
|Open website||Action 7 opens the website from the |
Actions 8-11 save Date, Title, Release Number, and press release URL from the website to the List variables using XPath:
Actions 12-15 add the previously scraped and saved data from List variables to the Table variable
|For Each||All the actions nested in the For Each loop are performed for each row in the Table variable |
|Exception Handling||Exception handling is added as the dates on the website are written in the custom format. |
In order to compare all these dates with the
Action 65 compares the press release dates with the start date (seven days before today). If the press release date is more or equal to the start date, then it pushes the filtered data to the
Description: The group of actions is required to paste the data from the final table results to an Excel spreadsheet and set appropriate values to necessary cells.
Description: The group of actions is required to create a specific subject for Outlook email to be sent.
Actions 75-76 convert DateTime variables
Actions 77-78 join four variables so we get the email subject. Action 34 joins
Action 35 joins the
Description: The group of actions is required to open Outlook and to send the email with the press releases attached. The whole group is reusable in other projects.
How to reuse
To reuse this group, change values of variables:
user_email– change the user email to send to, for example, firstname.lastname@example.org
subject –choose the subject to set into the variable value
file_path –set the right path for the file you want to attach, for example, C:\RPAExpress\invoices.xlsx
Actions 80-84 opens the Run window, types 'Outlook', and then opens Outlook.
With the help of the Window action, the bot switches to the specified window and ignores any random popups.
Actions 85-110 send an email with the specific subject and the attached file to the email from the
The exception handlings are added as some window titles and elements differ in various versions of Outlook. The script below works for Outlook from 2007 to 365:
Description: The group of actions is required to close Outlook when the email is sent. The whole group is reusable in other projects.