cancel
Showing results for 
Search instead for 
Did you mean: 

Send to different Recipients

newblueprism
Level 3
Hi, I am having multiple files. How can I send respective files to respective recipients? 

Example:
FileA send to recipientsA
FileB send to recipientsB
FileC send to recipientsC

------------------------------
new blueprism
------------------------------
2 REPLIES 2

ChandaSuman
Level 2
These steps would work if the file names would have some constant naming convention.

1. Create a collection(at object level preferably) with Filename and Recipients as Fields.
2. Send this collection as an output parameter.
3. Call the Action from the process level to get the collection.
4. Filter collection with a string of the file name and get the desired row.
5. In "TO", use the filtered recipient's name with [Collection.FiledName]

Hope this helps.

------------------------------

ritansh.jatwani
Level 9
Hi,

For sending files to different recipients, please follow the below approach:

1) Create an excel manually and put all the file paths in one column, say, "FilePath" in column A and put the name of all respective recipients in column B, say "Recipient". This approach will be more dynamic approach rather than collection approach and no code changes are required after that.
2) Now create a process to read the data of the excel file by following the below steps:
             a) Create Instance --> Open workbook --> Show --> Get Worksheet as Collection (say MailCollection)
3) Once you have the data in collection, use a loop stage and inside the loop stage, you can use Outlook VBO to send email to different recipients. In the "To" field of Outlook VBO, put  [MailCollection.Recipient] and in the Attachments field, put [MailCollection.FilePath] and it will send the attachment to the concerned recipient.

------------------------------
Ritansh Jatwani
Consultant
EY
Asia/Kolkata
------------------------------