cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Ammar
Level: Powered On

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 Team
Community Support Team

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
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
Ammar
Level: Powered On

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 Team
Community Support Team

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.
Ammar
Level: Powered On

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 Team
Community Support Team

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

Ammar
Level: Powered On

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
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 83 members 5,355 guests
Please welcome our newest community members: