cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Karmik
Regular Visitor

When a new email arrives in a shared mailbox - Only collect specific file types

Hi guys, I have created the below flow, sending the attachments to a SP site, but it seems to pull anything as an attachment (signature icons etc). Is there a way to filter on file type, i.e. .xlsx? Struggling to work some of the functions out, and just when I think I have it, I don't.

 

2021-01-28 14_23_41-Edit your flow _ Power Automate.png

1 ACCEPTED SOLUTION

Accepted Solutions
Expiscornovus
Super User
Super User

Hi @Karmik,

 

You could add a condition action within the apply to each (before the create file) to check for the name of the files and use an endswith function.

 

Below is an example which checks for the .csv extension.

 

The left column before the is equal to operator is using the following expression.

 

 

endsWith(items('Apply_to_each')?['name'], '.csv')

 

endswith_condition.png

 

Hope this helps a bit?

View solution in original post

2 REPLIES 2
Expiscornovus
Super User
Super User

Hi @Karmik,

 

You could add a condition action within the apply to each (before the create file) to check for the name of the files and use an endswith function.

 

Below is an example which checks for the .csv extension.

 

The left column before the is equal to operator is using the following expression.

 

 

endsWith(items('Apply_to_each')?['name'], '.csv')

 

endswith_condition.png

 

Hope this helps a bit?

That is perfect, thanks @Expiscornovus 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (2,057)