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 / Get Emails (v3) Passin...
Power Automate
Unanswered

Get Emails (v3) Passing in a dynamic FOLDER value

(0) ShareShare
ReportReport
Posted on by 76

Greetings,

 

I have a shared mailbox which I am using Get emails with Original Mailbox Address param to find the shared one.  I have a list of folders in a SharePoint list I wish to check.  When I pass in ACTIONED from a dynamic value, it doesnt find the folder.  If I click manually on the folder icon in the connector I can select ACTIONED and it will work.  

 

 

NeonThunder_0-1658500234676.png

On peeking the code I noticed there is metadata?  Also, the value passed isnt text (although it displays this) it's the folder ID.  The connector can map this through selection, why can't it take the text value being dynamic?  Also it stores selections in the metadata?  I dont quite understand this part.

 

 

 {
 "inputs": {
 "host": {
 "connectionName": "shared_office365",
 "operationId": "GetEmailsV3",
 "apiId": "/providers/Microsoft.PowerApps/apis/shared_office365"
 },
 "parameters": {
 "folderPath": "Id::HJ8iLTliMDk4YzSJjhBBBSDACiyhjkehjJKHJK-4CBcW_zmAQANbG8-niAfSLQVFBss3esLzADDACSyjSSA=",
 "from": "@items('Apply_to_each')?['EmailFrom']",
 "fetchOnlyUnread": false,
 "mailboxAddress": "hi@sharedmailboxaddress.com;",
 "includeAttachments": true,
 "top": 1,
 "importance": "Any",
 "fetchOnlyWithAttachment": false,
 "subjectFilter": "@items('Apply_to_each')?['Subject']"
 },
 "authentication": {
 "type": "Raw",
 "value": "@json(decodeBase64(triggerOutputs().headers['X-MS-APIM-Tokens']))['$ConnectionKey']"
 }
 },
 "metadata": {
 "Id::AxLWIxZDYtNDRjOS05ZjdiLTliMDk4YzljMWRlNwAuAAAAAACiyJQvpSasR62-4CBcW_zmAQANbG8-niAfSLQVJcd4SsLzAAAABy10SSA=": "Potential Customers",
 "operationMetadataId": "184390286e-8459-453e-8459-4432klnjb11",
 "Id::AAMkWxLWIxZDYtNDRjOS05ZJHbjBJKMWRlNwAuAAAAAACiyJQvpSasR62-4CBcW_zmAQDKKtKrsr4aSocvrTteVABdAAAATVGASSA=": "CBAT",
 "Id::AIxZDYtNDRjOS05ZjdSJKGJKAk4YzljMWRlNwAuAAAAAACiyJQvpSasR62-4CBcW_zmAQANbG8-niAfSLQVJcd4SsLzAAAAAiE2SSA=": "Urgent",
 "Id::AAMxMjYxLWIxZDYtNDRjOS05ZjdAHduAAAAAACiyJQvpSasR62-4CBcW_zmAQANbG8-niAfSLQVJcd4SsLzAAAACSyjSSA=": "Delivered"
 }
 }

 

 

So my question is how can I pass through Folder names or grab the ID's through the folder text box?  I dont have access to the premuim connection Azure AD either.

Categories:
I have the same question (0)
  • VictorIvanidze Profile Picture
    13,073 on at

    You have to pass the folder id, not the folder name.

  • NeonThunder Profile Picture
    76 on at

    How can I get a list of folder ID's based on the name though?  I can't pass the ID if I don't know it.   I can peek code to get the ID, but I dont want to manually do this, I need to have a list of folder names which need to map to the ID.  Any ideas?

  • VictorIvanidze Profile Picture
    13,073 on at

    Use a graph request to get the email folder of the shared mailbox by its display name.

  • NeonThunder Profile Picture
    76 on at

    How can I do this please?

     

    I have tried to use https://graph.microsoft.com/v1.0/me/mailfolders('Inbox') 

     

    But this fetches my own inbox (/me/), I need the shared mailbox

  • Verified answer
    VictorIvanidze Profile Picture
    13,073 on at

    See https://docs.microsoft.com/en-us/graph/api/user-list-mailfolders?view=graph-rest-1.0&tabs=http

    You have to execute GET  https://graph.microsoft.com/v1.0/users/{id | userPrincipalName}/mailFolders/Inbox

     

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 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard