Does child MailFolders work in Office 365 scope for Get Mail?

Hi All,

Just a technical question regarding the office 365 scope for outlook using the ‘get mail’ activity. Has anyone successfully used a filter on ‘MailFolder’ to retrieve emails from a child folder within O365 Outlook? For example ‘Inbox\TEST’.

I’m assuming that there may be an issue that needs fixing within the Office 365 package.

Reading the Graph API docs, this only appears to support well-known folder names like “Inbox” and “Sent Items” etc or the actual folder ID. All the examples provided only mention those top level folders e.g. move your mail from “Inbox” to “Deleted Items”.

In theory it should work if you provide the mailfolderId. I tried using Graph Explorer to query the mailfolders resource e.g. https://graph.microsoft.com/v1.0/me/mailFolders/Inbox/childFolders to get the folder Ids, e.g:

"id": "AAMkADU1NzA5YjBmLTM2YjMtNDI3OS04ZTljL...AAA=",
"displayName": "Subfolder",

But pasting that ID into the MailFolder input still returns the same not found error. It does mention name and spelling so it’s likely not using the API in the expected way behind the scenes.

Invalid mail folder name. Please ensure that this folder exists and that its name is spelled correctly.

@DeanMauro same here, subfolders cannot be accessed - only top level folders - inbox, sent items etc. Checked with our security, no issues there.

Hi Gents,

We’ve added support for subfolders and will release the fix on Monday with v1.2.0. Format will be “ParentFolder/Subfolder/AnotherSubfolder”.

All the best!

3 Likes

@DeanMauro I’ve tested and confirmed fix is working in my workflow. :partying_face:

Worth highlighting that the MailFolder path separator character is forward slash only, in case someone gets tripped up by this. I see the docs have been updated already.

2 Likes

@DeanMauro and @Iroos. Thanks for the tip. You guys saved hours of work. The forward slash works for me. I agree that this information should be provided in the documentation.