cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

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 @Anonymous 

 

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 blog
Power Automate Video Tutorials

View solution in original post

manuelstgomes
Super User
Super User

HI @Anonymous 

 

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 @Anonymous 

 

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 blog
Power Automate Video Tutorials
manuelstgomes
Super User
Super User

HI @Anonymous 

 

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

Helpful resources

Announcements
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.

New Process Advisor Capabilities carousel.png

Read the blog for the latest news

Read the latest about new experiences and capabilities in the Power Automate product blog.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

AI Builder AMA June 7th carousel (up on May 25th, take down June 8th) (1).png

'Ask Microsoft Anything' about AI Builder!

The AI Builder team invite you to ask questions and provide helpful answers at our next AMA.

Users online (1,683)