Robot For Periodic Covid19 Status Reports

This bot uses an API to get covid19 current status and write the data to an excel sheet and send email. API Application programming interface) is a connection between computers or between computer programs. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how to build such a connection or interface is called an API specification.

This bot will execute the following steps

Workflow

Working

  • Send HTTP Web Request activity performs HTTP request to the specified Web API https://api.covidtracking.com/v1/us/current.csv. At the end point field in the Input section, we can specify this URL to which we want to make the request. We can specify the request method to be used when calling the API at the request method. The output stores the response received from the HTTP request as the string variable.

  • Write file activity writes the obtained csv data to a file in the user specified format. Here, we can write the data in to a csv file. We have to specify the full path of the file name to be written and the output file encoding method.

  • Read csv file activity reads the specified row entries with specified delimiter from the CSV file which have the current covid19 status report. We have to give the full path of the file to be read or variable that contains CSV data. The output data table of this activity contains the information obtained from the CSV file.

  • Here we have to use open excel activity again in order to write the filtered data table to a new excel sheet. We can select create and open in the open mode in the property panel.

  • Write range activity can be used to write the values from the output of read Csv data activity. We can write the Csv data table which contains the covid 19 status report to the specified range of the excel sheet. We have to specify the starting cell address and the sheet name in which the data is to be written.

  • Close Excel file activity closes the specified excel file in open excel file activity.

  • Finally, we have to use Send SMTP Mail activity to send the email message by using SMTP protocol. In the sender information section, email address and name of the sender can be given. Receiver information can be given at the receiver information section. In the Email configuration section, the email account used to send the message and the password of the mail account used to send the message can be given. In the server configuration section, the email server host that is to be used and port used to send the email message can be specified for e.g., if you are using Gmail, its server is "smtp.gmail.com". Here, we have to add the attachment with the mail message, so we have to specify the attachment in the attachment field in the input section.

Output

Mail Attachment

Last updated