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 III
Super User III

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 II
Super User II

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 III
Super User III

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 II
Super User II

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
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Users online (46,931)