web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Avoid multiple apply t...
Power Automate
Unanswered

Avoid multiple apply to each when adding SharePoint list attachment

(1) ShareShare
ReportReport
Posted on by 17
Hello All,
 
I am creating a flow where I need to read SharePoint list items then check if they have attachments, if they have attachments I need to process them. The process that I am using is using Get Items to get list items, then Get attachments to get the attachments in the list item and then get attachment content to get the attachment content. The flow runs slow as it creates nested apply to each, first apply to each in get attachments and 2nd apply to each in get attachment content. Is there a way to optimise it even if it's something related to send http requests it would be fine. Please guide if anyone has come accross this 
Categories:
I have the same question (0)
  • Ravindra Jadhav Profile Picture
    342 Moderator on at
    Hii Hope you are Doing Well,
    To optimize your SharePoint flow where you need to handle list items with attachments,  We Can Do this Process much faster by usinh graph apis,
    You can use below end point to get attchment conntent
     
    GET /drives/{drive-id}/items/{item-id}/content
    GET /groups/{group-id}/drive/items/{item-id}/content
    GET /me/drive/root:/{item-path}:/content
    GET /me/drive/items/{item-id}/content
    GET /shares/{shareIdOrEncodedSharingUrl}/driveItem/content
    GET /sites/{siteId}/drive/items/{item-id}/content
    GET /users/{userId}/drive/items/{item-id}/content
    Reference Documents link URL
    Or
    GET /_api/web/lists/getbytitle('YourListName')/items?$expand=AttachmentFiles
    
     
    If my answer helped resolve your issue, please consider marking it as solved to assist others facing the same problem. Additionally, giving it a like would be greatly appreciated and motivates us to keep helping
     
    Thank You
    Ravindra Jadhav
     
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 250 Super User 2026 Season 1

#2
Expiscornovus Profile Picture

Expiscornovus 222 Most Valuable Professional

#3
Haque Profile Picture

Haque 174

Last 30 days Overall leaderboard