Sending email on multiple bots

Hi All,
I have a situation; where we have a Dispatcher and Performer processes running. Currently 1000 records were processed per day and it is running on one bot. Dispatcher will load all the records form excel input file to queues and Performer will fetch records from queues and create one output excel sheet by updating the records with status as success or failure(with reason) and send this report to business user in an outlook email.
Now my client is adding 2 more vendor data to process, and it will be around 7K to 10K records per day. So we have to add 1 or 2 more bots to run this process. How to handle the updating output excel sheet and send one report in one email? We tried testing 1000 records running on 3 bots, bot1 created output excel with 400records and bot2 created output excel with 350 records and bot3 created output excel with 250records and sent 3 email with 3 separate reports. Can you please help me how to fix this issue?

@NamKrish - make the three bots write to the same excel, just that make them APPEND, instead of (over) write. Be sure the writes are at different times, or the could be file lock or missing data.
Can do this by reading range, adding records, then writing back the whole set back to the excel.

Another option - one excel for each, then which ever bot runs the last, before sending the email out, make it merge the three excels.

Thank you @sumitd… some times excel is getting locked because all 3 bots are tying to update the same excel at the same time… we are thinking to create an output excel with single single record/transaction process and merge all of them at the end, but if 10k records were process then 10k output excels will be created and it can make our process slow. Any other suggestion?

How to check which bot is running last?

Why we didn’t try with the same bot like with current bots processing them as a dispatcher and performer
Because we are going to fetch and assign to queue and get the data back from queue for processing

I hope it won’t take much time process all those in a single file

Or is there any reason behind to split then to different robots

Cheers @NamKrish

Thank you @Palaniyappan :slight_smile:
Our dispatcher is running on 1 bot and its fine to handle loading 10k records to the queues.
Our main logic is in performer and it might take longer than 24hrs to process 10k or more records for that day, so we want to run this performer on 2 or 3 bots based on the volume. And also, our performer is having logic to update output excel report with records processed and its status and send one email to business user with this report. i want to understand, how to handle updating excel report and sending one email to business users if we run this performer on 3 bots?

I think that it is dangerous to process the same Excel with three differents robots.

How about creating another process that will handle Excel generation from Queue items?
Or if you cannot separate Excel generation from your process, then keep it like that and create three differents Excel then have another process merge them into one and send it to business?