I am trying to send a few files within an array. This array ‘email_Files’ is the variable I use to store the paths for the respective files I need to send, however, when I run the process, it will say the file cannot be found. How would I go about solving this issue?
In short, I get the files I need using Directory.GetFiles. Afterwards I would String,Concat the files into a one big string named attachment_Files. Finally I would assign email_Files to Split(attachment_Files).
For now, can you try to set Breakpoint at the SendOutlookMessage activity, then debug run?
Workflow will stop at SendOutlookMailMessage and check if content of email_file is what you expect in Locals panel. If it’s not what you expect, please review your logic.(GetFiles or Split etc)
I used Directory.GetFiles to get 3 files since the naming is different. Then I joined these 3 file paths into 1 collection of string attachment_Files. But when I try to put it into attachmentCollections, the error message will say String cannot be converted to System.Collection.IEnumerable (of string)
Don’t use String.Concat, but Linq concat instead. Say, if you have 3 variables that contain array of files (strings): filesA, filesB, filesC. Then to concat: