Solved

Sending Emails to different recipients at the same time


Badge

Hi, I was just wondering how i would be able to send different attachments to different email within the same bot. So currently the bot splits up 20,000 lines of data into vendor specific excel spreadsheets and these need sending to the specific vendor they are referring to, however each of the new worksheets need to be sent to a different vendor. Any ideas how i would do this? 

icon

Best answer by JMarino 1 June 2023, 21:59

View original

2 replies

Userlevel 5
Badge +14

@elliottsargeson identify all attachments to send from each eamil account.. create a sub task with each email account, in condition check the email account and call respective subtask will solve your issue.

Userlevel 2
Badge +8

Are your list of vendors in a list, data table, excel sheet, or something you can loop through?

If so I’d approach the architecture like this:

  1. Loop through the 20,000 lines of data and use an easy naming convention for the files to easily identify the vendor (something like mm_dd_yyyy_vendorname.xlsx
  2. Loop through your list of vendors and for each loop
    1. Loop through the file folder where you saved the files
    2. Check if the file name ‘contains’ the vendor name and attach the file to an e-mail and SEND
    3. Unless you have multiple files to attach you can exit the file loop early and go on to the next vendor in the outer loop
  3. As a best practice move all the files to an archive and keep the folder for your outputs clean for the next time

Reply