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.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

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.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,133)