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 emails’ from a folder in a shared mailbox with Power Automate

Posted on April 4, 2021April 14, 2021 by Tom

“Any tips on how to select a specific folder in a shared mailbox with the ‘Get emails (V3)’ Power Automate action? I see only folders from my mailbox.”


Most of the email operations in Power Automate can already work with folders in shared mailboxes. If you ‘move email’ or trigger flow ‘when new email arrives’, you can select a specific folder from the mailbox. But ‘Get emails (V3)’ doesn’t offer you the folders. It’ll show your personal folders even if you enter the shared mailbox address into the ‘Original Mailbox Address’ field.

Power Automate get emails shared mailbox folder

How can you select a folder in the shared mailbox when it’s not displayed?

Use the folderPath

If you select any of the available folders and then ‘Peek code’, you’ll see that the ‘Folder’ is represented by ‘folderPath’. Therefore, if you knew the ‘folderPath’, you could ignore the folder selection and enter the ‘folderPath’ directly.

Get emails (v3) peek code folder id

Get the folderPath

To get the ‘folderPath’, you can use any of the existing actions that already works correctly, e.g. ‘Move email’. Add the ‘Move email’ action to your flow, enter the shared mailbox, and select the desired folder.

Again, use the ‘Peek code’ feature under the 3 dots to see the ‘folderPath’. That’s the ‘Folder’ you want to use in the ‘Get emails’ action. Copy the ‘folderPath’ value from the action and store it into a ‘Compose’ action.

It might look as below.

Id::AAMkADU5MjZixxxxmNjLTA0YTQxMzBiMTg0MwAuAAAAxxxxx7aAQCPhb9FaLihQxxxxA0l01MAAA=

Get emails from the folder

Once you have the ‘folderPath’, you can use it as the ‘Folder’ in the ‘Get emails’ action. Just don’t forget to enter also the ‘Original Mailbox Address’ of the shared mailbox.

Power Automate get emails shared mailbox folder

Summary

It seems that the folder selection in ‘Get emails’ was somehow forgotten when the Power Automate team added support for shared mailbox. But it doesn’t have to be a blocker for you, like in many situations before (e.g with missing dynamic content), there’s a workaround.

If you know where to look, and what to look for, you don’t need the folder selection button. The ‘Peek code’ feature will tell you what the action expects, and that allows you to provide the right input. In this situation it’s the ‘folderPath’, the same string as e.g. in the ‘Move file’ action.

In the end that’s exactly what the folder button does, you select a folder and the action will turn it into a ‘folderPath’.


🚀 Master Power Automate

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

No spam. Unsubscribe anytime.

15 thoughts on “How to ‘Get emails’ from a folder in a shared mailbox with Power Automate”

  1. Julien says:
    August 17, 2021 at 9:17 am

    Thanks for sharing this amazing article. Is it possible to read a certain user email ID and fetch all the unread emails of that user?

    Looking forward to your response.

    Thank you!

    Reply
    1. Tom says:
      August 18, 2021 at 8:09 pm

      Hello Julien,
      you can’t read emails of other users, Power Automate will allow you to access only the data you could access without it. If you don’t have access to the other user’s mailbox you can’t access his emails.

      Reply
  2. John says:
    September 30, 2021 at 6:00 pm

    Hello,

    Is there another way to get the folderpath besides using sneak peek on V2?

    Reply
    1. Tom says:
      October 3, 2021 at 7:20 pm

      Hello John,
      I didn’t search for another way once I found this solution, therefore, I can’t answer 100% yes or no.

      Reply
  3. Ondrej says:
    February 25, 2022 at 11:08 am

    Hi,

    amazing article, thanks! Is there a way to then directly get specific email ID?

    Reply
    1. Tom says:
      February 27, 2022 at 8:02 pm

      Hello Ondrej,
      the email IDs will be provided among the dynamic content outputs from this action. But to get specific email ID you’ll probably have to use the $search query parameter (https://docs.microsoft.com/en-us/graph/search-query-parameter#using-search-on-message-collections) or the ‘Subject Filter’ to find that specific email.

      Reply
  4. Esther says:
    April 1, 2022 at 11:20 pm

    Is there a way to obtain an originator’s email address if the email is forwarded to you from a group email address?

    Reply
    1. Tom says:
      April 6, 2022 at 10:16 pm

      Hello Esther,
      you could probably extract it somehow from the email content, but I never did it before and I’m not sure how reliable it would be.

      Reply
  5. Angie says:
    May 10, 2022 at 9:46 pm

    How do you find the code for the folder path for the Shared Mailbox email?

    Reply
    1. Tom says:
      May 15, 2022 at 5:25 pm

      Hello Angie,
      I’m not sure what’s the question, the article describes how to get the folder path for a folder in a shared mailbox.

      Reply
  6. Bhavesh Jain says:
    December 7, 2022 at 9:28 am

    the other way around -> if you keep shared mailbox email id in ‘original mailbox address’ and then click on folder field, you will be able to select folders from shared mailbox. so in that case folder path is not required at all

    Reply
  7. Víctor AG says:
    December 7, 2022 at 4:12 pm

    Thank you very much!!! Very usefull 🙂

    Reply
  8. narendra raj says:
    November 7, 2024 at 8:21 pm

    Is there a way to get a count of emails in each folder in a mailbox?

    Reply
  9. synop says:
    November 20, 2024 at 6:46 pm

    dude thank you. You fixed what Microsoft couldnt.

    Reply
  10. bc says:
    November 29, 2024 at 4:31 pm

    Get Emails V3 returns the same JSON for Message ID item()?[‘id’]

    and for Attachments Attachment ID item()?[‘id’].

    How do you get the correct JSON for Message ID from Get Emails V3?

    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