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

Notifications

Announcements

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:
I have the same question (0)
  • Suggested answer
    Mark Nanneman Profile Picture
    991 Super User 2025 Season 2 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard