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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

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.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (5,791)