cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
raywoc2
New Member

Deleting Specific Attachment Type from Sharepoint List

Greetings everyone - I am trying to clean up some existing Sharepoint Lists I have to save on storage space.  Each item on this list has a about 5 or 6 attachments, all of different file types.  I am trying to create a flow to cycle through each item to delete the Excel workbook attachment.  Is where a way to alter the File Identifier to only pick up the ".xls" file extensions? 

 

deleteattachment.png

1 ACCEPTED SOLUTION

Accepted Solutions
Caspar_Rubin
Responsive Resident
Responsive Resident

Hey,

 

I think you need to use a Condition action and check if the DisplayName of the attachment contains .xls

 

Something like this:

 

Caspar_Rubin_0-1663865663641.png

 

1. Get items to get all list items

2. Apply to each with Dynamic content value from the Get items action

3. Get attachments with the Id of the looping list item

4. Apply to each 2 with Dynamic content Body from the Get attachments action

5. Condition with DisplayName contains .xls

6. Delete attachment in the If yes section.

 

cheers

View solution in original post

2 REPLIES 2
Caspar_Rubin
Responsive Resident
Responsive Resident

Hey,

 

I think you need to use a Condition action and check if the DisplayName of the attachment contains .xls

 

Something like this:

 

Caspar_Rubin_0-1663865663641.png

 

1. Get items to get all list items

2. Apply to each with Dynamic content value from the Get items action

3. Get attachments with the Id of the looping list item

4. Apply to each 2 with Dynamic content Body from the Get attachments action

5. Condition with DisplayName contains .xls

6. Delete attachment in the If yes section.

 

cheers

raywoc2
New Member

Huzzah, this worked perfectly, thanks! 

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (4,372)