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 / Downloading attachment...
Power Automate
Suggested Answer

Downloading attachments from all emails, not limited to 25 iterations

(0) ShareShare
ReportReport
Posted on by
Hi all,
 
I'm trying to download attachment from a set of prior emails via power automate but I am restricted to only 25 iterations. ChatGPT shows I should enable Pagination but I can't find any such setting. Anyone have options on how to run the download attachments across more than 25 emails?
 
Thanks,
Categories:
  • Suggested answer
    Mark Nanneman Profile Picture
    993 Moderator on at
    Pagination isn't available on the "Get Emails (v3)" action. 
     
    Try using the "Send an HTTP Request" Outlook action.


    Set it up like this.

    And put select the fields you want and set the number of records you want with parameters in the endpoint uri.  You can also add a filter to return only emails with attachments.

    E.g.
    https://graph.microsoft.com/v1.0/me/mailfolders/inbox/messages?$top=40&$count=true&$select=id,receivedDateTime,sentDateTime,internetMessageId,subject,conversationId,sender,from,toRecipients,hasAttachments&$filter=hasAttachments%20eq%20true
    $top=40 will return the top 40 emails that match the filter

    $select isn't necessary, but it can make the size of the returned array smaller by dropping the body property and others that aren't needed.
     
    $filter=hasAttachments%20eq%20true filters for emails with attachments.
     
    To get the attachments of each you'd need to do some nested loops
     

    You could also set up your own psuedo pagination method by creating an array of different sent or recieved dates, and then you loop through that and filter a subset of your emails based on certain dates or between certain dates--I've done this in the past with the standard "Get Emails" action.

    If this helped you, please click "Does this answer your question" and give it a like to help others in the community (+ close the ticket)!

    Power Platform Developer | LinkedIn: Mark Nanneman | Blog: Power Stuff  | YouTube: Mark's Power Stuff  |

     
     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 414

#2
11manish Profile Picture

11manish 331 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 274

Last 30 days Overall leaderboard