cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Ammar
New Member

Filter attachments by name

Hello guys, 

I just started using flow this and I'm impressed by how much it will make my life easier.

I've tried to automate attachment fetching, which seems to works fine but having multi attachments in the same email caused a lot of troubles. 

I want to know how to filter the attachment and select the right one before creating a file in sharepoint.

many thanks

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Ammar,

 

Then you only need to determine if the Attachment Name contains a specific string.

Image reference:

37.PNG

Take a try.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

7 REPLIES 7
ScottShearer
Super User III
Super User III

@Ammar:

 

You can use an condition and evaluate the attachment file names in a loop using string expressions.

 

Can you give me an example of how you want to filter the files?

 

Scott

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

@ScottShearer Many thanks Scott, 

I was hoping to do something like regex but not sure how to implement this in flow, currently, I'm doing this in R and it looks like this

"^Daily.*"

Hi @Ammar,

 

Currently MS Flow does not support the use of regular expressions.

Could you provide specific filter condition?

You could filter the files by using the function provided in Expression.

Please provide more details and we would provide proper workaround for you.

 

Best Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you @v-bacao-msft,

I hope to be able to filter any file containing a certain string, for example, the word "daily".

 

many thanks 

 

Hi @Ammar,

 

Then you only need to determine if the Attachment Name contains a specific string.

Image reference:

37.PNG

Take a try.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Many thanks @v-bacao-msft,

 

That worked! 

My mistake is locating the condition at the wrong level.

 

cheers

Ammar

 

KantumRobot
Frequent Visitor

Hi, newbie here
Just wondering if this would work for a whole email received or filter each attachment.
I mean, if there are more than an attachment and condition will save or drop only ones that meets the criteria and does otherwise for the rest? 

Thanks,

Helpful resources

Announcements
MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (36,890)