RPA | Vaccine Availability Bot| A2019 Automation Anywhere - Part-44
A2019 Vaccine Availability Bot - In this blog we will discuss the steps to find the vaccine availability information in your locality using the pin code of your area using A2019 Automation Anywhere which is now known by the name as Automation 360.
The main purpose of this bot creation is to let the people know about the vaccine availability in their area using the pin code. The steps to create the vaccine availability bot are as follows:
- Drag and drop the open action from the Excel Advanced Package. In the properties section select the desktop file tab and browse for the file from the desired folder location, check the sheet contains header checkbox, open the file in read-write mode and lastly provide the session name which will be used during the entire session of the bot creation process.
- From the variables pane click on "+" icon to create list variable and add values to the list variable as per your choice. So in the list variable place your areas pin code.
- Place the loop action from the loop package and select the for each item in the list as the iterator. In the list field pass in the list variable which we have created and select for all items in the list option and assign the current item to the variable to store the output.
- Then use the Get action from the Rest Web Services method . In the properties section give the uniform resource identifier(URI) from which we want to extract the data and assign or store the output in a dictionary variable data type.
- From the Json Object Manager use the initialize action. In the properties section pass in the session name, then provide the Json formatted object string and the output that would be returned will be in the string format so store the output in a string variable data type.
- Then again from the Json object manager package drag and drop the query action to query the Json object using the dot notation. In the properties section pass in the same session name used in the initialize action and in the Json query string pass in sessions.length() which will return the number of elements that will be present in the array and store the output in a string variable data type.
- Then drag and drop the assign action from Number package and assign 0 as the value to this variable.
- Use the string to number action to convert the counter variable which is of string data type i.e. vCounter to number variable data type i.e. vNum_Counter.
- Then again drag and drop the loop action from the loop package and check whether vNumCounter which is of number data type is less than or equal to vNum_Counter.
- Drag and drop query action from Json object manager to extract all the relevant details from the API. so the query would look something like this. To extract center id use the query sessions[$vNumCounter.Number:toString$].center_id.
- So repeat the previous step to extract all the details like dose availability, total doses available etc.
- Then from the excel advanced package use the set cell action to write the extracted data into excel file. In the properties section select specific cell as cell option and pass in A$vExcelCounter.Number:toString$ and in the cell value pass in the center id variable which we created to store the center id and use the same session name which we used to open the excel file.
- Repeat the previous action until all the data is written to the excel file.
- Use the Increment action from the number package to increment the vNumCounter and the vExcelCounter variable.
- Use the Close action from the excel advanced package to close the excel file which was opened to write the extracted data.
After discussing the steps now we will look at the code snippet of the steps that we have discussed so far.
So with that we have come to the end of our blog where we discussed how we can extract the vaccine availability data bot using A2019 Automation Anywhere also known as Automation 360.
Please provide your valuable feedback in the end after going through the blog as the feedback you share matters the most to me.
Comments
Post a Comment
If you have any doubts, please letme know.