Let's POWER Automate

From no-code to low-code

Menu
  • Expressions
  • Filters
  • General
  • Application specific solutions
    • Dataverse
    • Excel
    • Forms
    • Outlook
    • Planner
    • Power Apps
    • SharePoint
    • Teams
  • Triggers
  • Ready to use solutions
    • Approval Process Template
    • Task Delegation App
    • The Ultimate Power Automate expressions cheat sheet
    • Power Automate HTTP requests to SharePoint cheat sheet
    • Power Automate HTTP requests to Graph API cheat sheet
  • ABOUT ME
  • Get help with your flow
  • POWER PLATFORM SERVICES
Menu

How to get more than 25 emails from a mailbox (Power Automate)

Posted on April 13, 2022February 3, 2024 by Tom

“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.

power automate 25 emails

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 Outlook 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 a specific folder

When getting emails from a specific folder, e.g. Inbox, you’ll always need the folder id.

https://graph.microsoft.com/v1.0/me/mailFolders/<folderId>/messages

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

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/AQMkADE3OTNhNGI1LTYyYjctNDY4OS0543210ZDQ1ODcyMDI1OAAuAAADh0B4vZMJRUuk0KeEgj1abcde_HTm2u9F_0iDdSSR05BZTwABHOBFygAAAA==/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
power automate 25 emails

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.


🚀 Master Power Automate

Join 2,000+ professionals getting actionable Power Automate tutorials, solutions, cheat sheets & tips every week.

No spam. Unsubscribe anytime.

32 thoughts on “How to get more than 25 emails from a mailbox (Power Automate)”

  1. Tran Dac Huy says:
    April 19, 2022 at 6:53 am

    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.

    Reply
    1. Tom says:
      April 23, 2022 at 8:27 pm

      Hello Tran Dac Huy,
      I’m sorry but I don’t see how it’s related to the article.

      Reply
  2. Matt says:
    June 7, 2022 at 7:29 pm

    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?

    Reply
    1. Tom says:
      June 12, 2022 at 8:43 pm

      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.

      Reply
  3. Mark says:
    June 26, 2022 at 10:38 am

    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?

    Reply
    1. Tom says:
      July 6, 2022 at 6:43 pm

      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

      Reply
  4. Jann says:
    August 4, 2022 at 11:29 am

    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

    Reply
    1. Tom says:
      August 14, 2022 at 5:17 pm

      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.

      Reply
  5. Nasser says:
    October 27, 2022 at 10:31 pm

    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

    Reply
  6. Nasser says:
    October 27, 2022 at 11:42 pm

    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.

    Reply
    1. Tom says:
      November 6, 2022 at 8:11 pm

      Hello Nasser,
      thank you for sharing the solution.

      Reply
    2. Eddy says:
      January 22, 2024 at 1:19 pm

      Hey Nasser could you please send me a Screenshot or something else to help me understand what to do?

      Reply
  7. Horea says:
    January 27, 2023 at 1:12 am

    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!

    Reply
    1. Tom says:
      February 9, 2023 at 9:30 pm

      Hello Horea,
      the HTTP request will return among others an array with the emails, you can get them using the Parse JSON action (https://tomriha.com/where-do-i-get-schema-for-the-parse-json-action-in-power-automate/) that’ll parse the output for you or directly with an expression (https://tomriha.com/how-to-get-a-specific-value-from-a-json-object-in-power-automate/).

      Reply
  8. jamie says:
    February 2, 2023 at 11:33 pm

    After retrieving the desired emails using the API call as described is there a way in power automate to then delete them?

    Reply
    1. Tom says:
      February 9, 2023 at 10:05 pm

      Hello Jamie,
      the request will return a JSON with all the emails, you can then extract the array with the emails using the Parse JSON action (https://tomriha.com/where-do-i-get-schema-for-the-parse-json-action-in-power-automate/) or an expression (https://tomriha.com/how-to-get-a-specific-value-from-a-json-object-in-power-automate/), take their IDs and use them to delete the emails.

      Reply
  9. Siddhartha says:
    June 6, 2023 at 12:20 pm

    Hi Tom,

    Can we get the same from Online Archive of Outlook shared mailbox? Can you please suggest.

    Reply
    1. Tom says:
      August 12, 2023 at 10:44 pm

      Hello Siddhartha,
      I don’t know, my customers never needed this.

      Reply
  10. Mark Dininio says:
    July 11, 2023 at 2:54 pm

    Great article! Do you know of a way to extract the email addresses from the sub folders and the sub folders inside that sub folder. For example, Lets POWER Automate/2023 where “2023” is a sub folder under “Lets POWER Automate” sub folder.

    Reply
    1. Tom says:
      August 13, 2023 at 3:15 pm

      Hello Mark,
      I’d try to use the subfolder name in the request, e.g. …/mailFolders(‘2023’)/…

      Reply
  11. cym says:
    July 18, 2023 at 12:06 am

    Can you do this from a shared email inbox?

    Reply
    1. Tom says:
      August 13, 2023 at 8:52 pm

      Hello cym,
      I didn’t try that on a shared mailbox, but I might add it to the list of potential future articles and take a look on it.

      Reply
  12. sada says:
    August 9, 2023 at 12:55 am

    you can try to do adding variable initialize as 1 and then do a while until this is 0, and get 25 by 25 records until nothing is coming

    Reply
  13. Giora says:
    January 18, 2024 at 8:46 am

    Hi, For some reason it didn’t work for me. I’m getting the following error note:
    “URI path is not a valid Graph endpoint, path is neither absolute nor relative or resource/object is not supported for this connector. Resources: groups.”

    What am I missing?

    Reply
    1. Tom says:
      February 3, 2024 at 11:33 am

      Hello Giora,
      there was a change in the action, the functionality was divided into multiple actions depending on the Graph endpoint and also the url is different – I updated the article to use the current one, ‘Send an HTTP request’ from the Office 365 Outlook group of actions.

      Reply
  14. Vlad says:
    June 18, 2024 at 5:41 pm

    It looks like the UI for Power Automate was changed and you can no longer see the FolderID, is there a different way to get this to work?

    Reply
    1. Al says:
      October 14, 2024 at 12:25 pm

      if you toggle the “New Designer” button (top right, just under your initials/picture) off, you get the old view which allows you to get the folder ID as described.

      Reply
  15. JISHNU NATH says:
    August 3, 2024 at 3:41 am

    I am using Get Emails v3 from a folder in Inbox. But Get Emails is not picking up the email responses to the original email. any pointers? i didnt want to add Sent Item, since it could bring the system down

    Reply
  16. Joy says:
    February 10, 2025 at 3:02 pm

    Hi, to add a subject filter just add the parameter $filter like this messages?$select=sender,subject&$filter=subject eq ‘Report results (Daily Pipeline Report)’

    Reply
    1. Tom says:
      February 22, 2025 at 7:43 pm

      Hello Joy,
      thank you for sharing, you’re right that there’re various parameters you can use to extend the request, you can $filter by subject, $search by content of the email, $top to select multiple, $select to return only specific properties… or combine them all together to get only the desired results.

      Reply
  17. Mirko says:
    March 7, 2025 at 12:25 pm

    Thank you for sharing!
    Right now I can access to the email in the folder, but I always get the same email replied for all the elements I have in the root. How can I read all the emails and not just one? Is it linked to a specific parameter?

    (I get Email 1
    Email 1
    Email 1
    …for x times
    I need to get Email 1
    Email 2
    Email 3
    ..)

    Thanks a lot

    Reply
    1. Tom says:
      March 17, 2025 at 9:13 pm

      Hello Mirko,
      that’s strange, I never encountered that. Isn’t the email multiple times in the mailbox?

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

🚀 Master Power Automate

Join 2,000+ professionals getting actionable Power Automate tutorials, solutions, cheat sheets & tips every week.

No spam. Unsubscribe anytime.

Working on an Approval process?

Use the Approval Process Template and the Task Delegation App to skip the hard part and deploy a fully functional approval solution on a SharePoint list in minutes! And then the next one, and the next one...

Approval Template Preview ✨ Learn more ✨

Turn ideas into flows with ease!

Grab the complete Power Automate Cheat Sheet Bundle—everything you need to master expressions, SharePoint HTTP calls, and Graph API in Power Automate.

Cheat Sheet Bundle Preview ✨ Get the Cheat Sheets

Didn't find what you were looking for?
Need to adjust a solution to fit your needs?
Or would you just like to get an assistance from somebody with thousands of hours of experience with Power Automate?

Power Automate blogs worth visiting

Damien Bird
Dennis (Expiscornovus)
Paul Murana

©2025 Let's POWER Automate | Theme by SuperbThemes