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

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

Re: Deleting files from sharepoint

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!



View solution in original post

Super User
Super User

Re: Deleting files from sharepoint

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

Re: Deleting files from sharepoint

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!



View solution in original post

Super User
Super User

Re: Deleting files from sharepoint

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
firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,546)