Save attachment activity filtering is not working properly when it gets special character

Hi All,

I am facing issue while applying attachment name in Save attachment activity filtering.

My logic is to download each and every attachment in the loop and then move it to somewhere. Since i have used For each loop for email attachments downloading and given attachment name in the ‘Save attachment’ activity to avoid whole attachment downloading.

In the loop it was downloaded all the attachment except that when it gets special character like ‘(’ or ‘)’. I am not sure what else. Also not all special char.

is there any solution for it?

Thanks in advance!

Regards,
Prabakaran

Can you share your wrokflows?

Hi,

Thank you for the quick review on my issue.

For security reason i can’t share the script now, and instead i will share my screenshot.

Thanks & Regards,
Prabakaran S

try
for each mail in mails(List messege)
then use “IF condition” mail.Attachments.Any
then for each attachmnt in mail.Attachments

In body↓
Path.GetExtension(attachmnt.Name)

1 Like

hi @prabakaran.s,

So Basically we want to Omit all the Special chracters from the Attachment Name.

We can make use of regular Expression here to get only Integers and Anpalbets and remove all extra characters , post that we pass the result .

-
Mukesh

1 Like

Hy,

Use the formula below to remove special caracters from your string

System.Text.RegularExpressions.Regex.Replace(MyText, “[^a-z A-Z 0-9]”, “”)

2 Likes