cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Kukiema
Frequent Visitor

Deleting files from sharepoint

 

Hello

I have a flow which saves attachments from mail to my SharePoint folder, it works perfectly, problem starts when I want to delete not needed filesAdnotacja 2020-01-09 080848.png

 

I need only file named "braki na *date*", how to delete rest of them with Automate?

Attachments are being saved from five mails sent simultaneously, and I only want one file from each message

 

This is how flow looks like:

Adnotacja 2020-01-09 081613.png

 
2 ACCEPTED SOLUTIONS

Accepted Solutions
abm
Super User
Super User

Hi @Kukiema 

 

You could check the filename before it saves to SharePoint

 

image.png



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

View solution in original post

manuelstgomes
Super User
Super User

HI @Kukiema 

 

You can do a condition before saving them in SharePoint and then you don't need to delete them. You can use a simple if statement like this:

Screenshot_2020-01-09_at_10_32_42.jpg

 

The formula is the following:

indexOf(items('Apply_to_each')?['name'],'braki')

 

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

Cheers
Manuel

View solution in original post

2 REPLIES 2
abm
Super User
Super User

Hi @Kukiema 

 

You could check the filename before it saves to SharePoint

 

image.png



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

View solution in original post

manuelstgomes
Super User
Super User

HI @Kukiema 

 

You can do a condition before saving them in SharePoint and then you don't need to delete them. You can use a simple if statement like this:

Screenshot_2020-01-09_at_10_32_42.jpg

 

The formula is the following:

indexOf(items('Apply_to_each')?['name'],'braki')

 

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

Cheers
Manuel

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Users online (2,705)