“Is there a way to overcome the limit of 25 emails that are returned by the ‘Get emails (V3)’ Power Automate action?”
If you extract emails with the ‘Get emails’ action, you’ll notice the ‘Top’ field. This field defines how many emails it’ll retrieve, and the maximum is 25 emails. The action doesn’t allow you to define any higher number, you’ll get 25 emails and that’s it.

But that’s a small limit considering how many emails some people send and receive daily. There can be a hundred, or multiple hundreds of emails waiting for processing.
How do you get all those emails?
Get the emails directly via Graph API
While the ‘Get emails’ action is limited, there’s another way how to get emails from your mailbox – via the Microsoft Graph API. You can imagine it as the ultimate interface to communicate with the Microsoft 365 platform, and although it can get quite complicated for some operations, extracting emails is easy.
The action you’re looking for is the Office 365 Groups action ‘Send an HTTP request’.

This action allows you to send some requests to Graph API, and retrieving emails is one of them.
Get emails from top level folder
To get emails from the top level folder you can reference it by the folder name, e.g. Inbox or SentItems.
https://graph.microsoft.com/v1.0/me/mailFolders('Inbox')/messages
Such HTTP request will give you the emails in the folder including all their data. Which can be a bit more information than you need and it can take a while before it loads everything. Adding the $select parameter will reduce each email information only to some properties, e.g. the sender and the subject in addition to the default email id.
https://graph.microsoft.com/v1.0/me/mailFolders('Inbox')/messages?$select=sender,subject
The last parameter to add is the number of emails. By default it’ll return 10 emails as the ‘Get emails’, but you can add the ‘top’ parameter to increase the number, e.g. to 100 emails.
https://graph.microsoft.com/v1.0/me/mailFolders('Inbox')/messages?$select=sender,subject&top=100

Get emails from subfolders
It gets a bit more complicated with the subfolders. Unlike the top level folders you can’t reference them by their name, you’ll need their ID.
The easiest way to get the folder id is similar to getting id of a folder in a shared mailbox. Add the ‘Get emails’ action, select the folder, and go to ‘Peek code’.

You’ll see the parameter ‘folderPath’ starting with Id:: and following with the folder id.

That’s the ID you need, it might look as below:
AQMkADE3OTNhNGI1LTYyYjctNDY4OS0543210ZDQ1ODcyMDI1OAAuAAADh0B4vZMJRUuk0KeEgj1abcde_HTm2u9F_0iDdSSR05BZTwABHOBFygAAAA==
Take it and use it instead of the folder name in the HTTP request.
https://graph.microsoft.com/v1.0/me/mailFolders('AQMkADE3OTNhNGI1LTYyYjctNDY4OS0543210ZDQ1ODcyMDI1OAAuAAADh0B4vZMJRUuk0KeEgj1abcde_HTm2u9F_0iDdSSR05BZTwABHOBFygAAAA==')/messages?$select=sender,subject&top=100

Using the ID you can reference any folder on any level in your mailbox.
Summary
It’s possible to get more than 25 emails from a mailbox in Power Automate, but not with the default ‘Get emails’ action. The action has a limitation that you can’t bypass, therefore, you must use another approach. And the approach is to ask for the emails via Graph API. Use the Office 365 Groups action ‘Send an HTTP request’, define which folder it should check, and get as many email as you’d like.
Could you show me the way to get many value is modified in sharepoint and summarized them and send all of new value update to mail outlook in once time.
Hello Tran Dac Huy,
I’m sorry but I don’t see how it’s related to the article.
Hi Tom,
how would you add a filter on the email Subject, e.g. “Order#”, extract those emails with that text in the Subject, and then write the Subject and the email date into a excel table?
Hello Matt,
set the subject filter in the trigger action (https://tomriha.com/search-for-multiple-words-in-the-incoming-email-subject-power-automate/) and then just add a new row in the Excel file.
Hi Tom, rather than retrieve my emails I would like to retrieve emails sent to my team in a shared mailbox.
I guess I would change the reference to ‘me’ in the URL https://graph.microsoft.com/v1.0/me/.
Could I used this method to identify a different mailbox?
Hello Mark,
you should be able to access shared mailbox using the call below:
https://graph.microsoft.com/v1.0/users/{sharedmailboxmailaddress}/messages
source: https://docs.microsoft.com/en-us/answers/questions/80006/shared-mailbox-handling-with-microsoft-graph.html
great posting. But i´m having trouble when submitting the “send an http request”. I have a flow where it gets 25 mails untill now 😉 but after “send an http request” i have the “apply to each” where it should forward an mail if it is less than or equal to -5 days. here it seems my flow breaks when their is more than 25 emails in the subfolder, used the Get-email. The above seems to break the flow preferably because it should select an output and suggests “body” but if i chose this i wont be able to forward the mail with its attachment, guessing here. Can´t seem to figure out which 1 to choose here
Hello Jann,
it’ll offer only the body as the dynamic content, but you can extract any information about the email directly from the output JSON as described here: https://tomriha.com/how-to-get-a-specific-value-from-a-json-object-in-power-automate/. I guess you’ll need the email id to forward the email.
Hello Tom,
Thank you for this post.
I have a question, which parameter does includes attachement ? (Like with get emails trigger)
Thank you for your help
Hello Tom,
I finally succeeded to get all the attachements from my mails by using a second http request in an apply to each loop.
https://graph.microsoft.com/v1.0/me/mailFolders('@{variables(‘ID’)}=’)/messages(‘@{items(‘Apply_to_each’)?[‘ID’]}’)/attachments?
Have a good week-end.
Hello Nasser,
thank you for sharing the solution.
Hi Tom,
Thanks for the valuable insight. However, I don’t understand how do I make the flow to repeat the request. I thought I don’t have to put a ‘get emails’ command in the flow. If I only put an Add Row into a tabel, it only yields one email. How do I make them loop? I guess the subject, body and other fields of interest have to be brought in via some JSON commands?
Thanks in advance for any help!