Save Email Attachment activity in side a for each email activity
I receive an error that a file already exists. But per the documentation of this activity, it will create a unique trailing number to the file “example _1.xls”
I have tried creating a new Dynamic Folder to prevent this error, but it still does not work.
Create the folder in outside of the foreach loop and In Save Email Attachements activity check the Overwrite existing option. It will automatically override the existing file.
An error is thrown saying there is another file that already exists.
I need the activity to create a unique naming convention to include both “named” files.
For example
data 04.05.2023.XLS
data 04.05.2023_1.XLS
You can do one thing, first save the attachment and change the name of the file by using “Rename File” activity.
Before saving the attachment we can’t rename.
You have given the wrong source file name in the Rename file activity. You have given the Save Email Attachment activity output, this output is a collection not the file name. In Rename file activity you have to give the file path there.
While you are using “Save Email Attachments” activity. The output datatype of the activity is IEnumerable it Stores the Retrieved file path from mail. Use for each to iterate the output variable. Refer the below image for better understanding.