cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Community Support
Community Support

Re: Filter attachments by name

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

6 REPLIES 6
Highlighted
Super User
Super User

Re: Filter attachments by name

@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
Highlighted
New Member

Re: Filter attachments by name

@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.*"
Highlighted
Community Support
Community Support

Re: Filter attachments by name

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.
Highlighted
New Member

Re: Filter attachments by name

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 

 

Community Support
Community Support

Re: Filter attachments by name

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

Highlighted
New Member

Re: Filter attachments by name

Many thanks @v-bacao-msft,

 

That worked! 

My mistake is locating the condition at the wrong level.

 

cheers

Ammar

 

Helpful resources

Announcements
firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Top Kudoed Authors
Users online (11,170)