cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AFernandez
Helper II
Helper II

Deleting attachments from SharePoint List Using Flow.

Hi,

 

I am new to power automate and following examples I found on the internet I created my first flow.  The flow sends attachments added to a SharePoint list via a PowerApp application to a SharePoint document library.  The problem is that the way the flow is set at this moment; attachments remain in the SharePoint list after they have been sent to the library, creating duplication of data.

 

I have tried adding an additional step to the flow using information I found on the internet, but no matter what I try I get the warning Actions in this flow may result in an infinite trigger loop.  Please ensure you add appropriate conditional checks to prevent this flow from triggering itself. 

 

Right now, I have the end users manually deleting the attachments from the list after they have been sent to the SharePoint document library, but this is not practical in my scenario.  I want to add an additional step to the flow that automatically delete attachments in the SharePoint list after they have been sent to the SharePoint document library.

 

Attached are the images of how the flow is set up:

1stPartofFlow.jpg

 

2ndPartofFlow.jpg

 

3rdPartofFlow.jpg

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

@AFernandez 

Yep - it is confusing...  See my screen shots below:

image.pngimage.png

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

Scott

View solution in original post

5 REPLIES 5
ScottShearer
Super User
Super User

@AFernandez 

Inside of your Apply to each loop and immediately after the Update file properties, add a SharePoint Delete attachment action.  Let me know if you need additional help.

 

 

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

Scott

Thank you so much for responding so fast! I get the same warning.  Also, I am not sure which ID applies for the *Id and the *File Identifier. 

 

Warning.jpg

 

IdoftheListItemtheFileisAttachedto.jpg

 

FileIdentifierID.jpg

 

@AFernandez 

Yep - it is confusing...  See my screen shots below:

image.pngimage.png

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

Scott
AFernandez
Helper II
Helper II

Thank you so much! It Worked!!  It showed the warning, but the flow was completed successfully and the attachments in the list were deleted.  

Hi, I hope you are well.
I'm with the same question, but in my case it would be to delete the attachment saved in the sharepoint folder. For example I have a sharepoint list where people create items and attach documents. Attached documents are created in the item's folder. Let's suppose the person deletes a document from the list, I need that deleted document to be deleted from the folder as well.

Thank you very much for your attention and help.

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,522)