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?
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.
$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)!
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.