cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Minty_99
Frequent Visitor

AMA: Dynamically Choosing an Email Subfolder Problem

I am having great difficulty in dynamically choosing an email subfolder to move emails into automatically.

The connector appears to fall over with "object not found" errors on subfolders in a shared Inbox folder.

Any clues would be really appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisGarty
Microsoft
Microsoft

Hi Minty_99, 

Are you using the "Move email (V2)" action? Office 365 Outlook - Connectors | Microsoft Docs 

What is the specific error you received?

Perhaps work on reading emails from the subfolder, to make sure you have the path correct, using "Get emails (V3)": Office 365 Outlook - Connectors | Microsoft Docs 

 

View solution in original post

4 REPLIES 4
ChrisGarty
Microsoft
Microsoft

Hi Minty_99, 

Are you using the "Move email (V2)" action? Office 365 Outlook - Connectors | Microsoft Docs 

What is the specific error you received?

Perhaps work on reading emails from the subfolder, to make sure you have the path correct, using "Get emails (V3)": Office 365 Outlook - Connectors | Microsoft Docs 

 

Minty_99
Frequent Visitor

  1. I'll describe the process in full: 
    Trigger on "When a new email arrives in a shared mailbox (V2)" - This works
  2. Check the email sender isn't internal via condition - this works.
  3. Execute a stored procedure (V2) This logs the email and returns the name of the subfolder I need in the inbox - This works
  4. Condition - Check the result isn't null - This works
  5. Move Email (V2) - This fails.

Minty_99_0-1647368023532.png

 

Error string: 

"error":{"message":"The specified object was not found in the store., The process failed to get the correct properties.","code":"ErrorItemNotFound","originalMessage":"The specified object was not found in the store., The process failed to get the correct properties."},"source":"office365-we.azconn-we-01.p.azurewebsites.net"}}


I have tried all sorts of syntax's for setting the destination folder.

Inbox/resultset 

Resultset

etc. etc.

Minty_99_1-1647368261620.png

 

I'm hoping it's a simple syntax issue.
I can make it work by using a switch command with a dedicated move for each subfolder and user, but should be able to do it dynamically.

 

 

 

ChrisGarty
Microsoft
Microsoft

@Minty_99 , interesting that the more static folder value works. Did you look at the flow run history to see if there is any difference is between the dynamic and static folder values? I'm assuming there will be some minor difference like way the "/" is represented... maybe it needs a delimiter?

@ChrisGarty  By using the static folder name in the switch condition you actually choose a specific folder in the flow builder dialogue, so it's not dynamic. In fact having picked the folder, in the background it then applies the folder path ID ;

Minty_99_0-1647424316012.png

 

So If I knew what the folder ID was I could store that in the database, return that instead of the folder name and in theory it would work. Not very intuitive though, and I don't know of an easy way to retrieve the folder path ID, short of creating another switch condition in the flow, which is sort of self defeating?

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (3,594)