cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
TClark
Level: Powered On

Is the Message ID of an email supposed to change when moving that email to a new Outlook folder

Is the Message ID of an email supposed to change when moving that email from one Outlook folder to another Outlook folder with Flow or PowerApps?

 

I am trying to build a PowerApp to keep incoming emails organized in folders based on a workflow.  The incoming emails must be reviewed, assigned, processed and then saved as originally received.  This was previously performed manually via drag and drop by multiple users with rights to the email account.  This prior approach eventually led to misfiled emails with little accountability for the users.

 

The proposed solution uses Flow to provide a Message ID of an incoming email when it arrives in a folder and then store that Message ID along with other email fields in a SharePoint list via Flow Create Item.  My intent is to have each user review the emails via PowerApps, and then use the PowerApps Office365.Move([Message ID], folderPath) function to move an email from a first folder to a second folder to a third folder, etc... as the message proceeds through the workflow.  The Office365.Move function works fine when moving an email from a first folder to a second folder, but it always fails when trying to move the same email from the second folder to a third folder when using the originally saved Message ID value.  PowerApps will display a 502 error “Request failed. Try again later..” or a 404 error “The specific object was not found in the store…” when the attempt to move the email fails.

The issue is (I think) that whenever you move an email via Flow or PowerApps, the Message ID changes which breaks the reference between my SharePoint list item and the corresponding email. 

 

The issue can be recreated with the following procedure to play a bit of Flow ping-pong:

  1. Create two folders in your Outlook inbox (e.g., TestFolder1, TestFolder2)
  2. Create a Sharepoint List with an “EmailID” field (single line text) and “Direction” field (single line text)
  3. Create a first Flow with three steps:
    1. Trigger on email arrive in TestFolder1
    2. Create Item in your SP list with *Title = [Subject] and EmailID=[Message ID] from the email in the trigger, and add a string in the Direction field to something like “Received in Folder 1”
    3. Move the Email based on the EmailID field to TestFolder2
  4. Create a second Flow with three steps:
    1. Trigger on email arrive in TestFolder2
    2. Create Item in your SP list with *Title = [Subject] and EmailID=[Message ID] from the email in the trigger, and add a string in the Direction field to something like “Received in Folder 2”
    3. Move the Email based on the EmailID field to TestFolder1
  5. Send yourself an email with “Test Email” in the subject line, and then drag that email into TestFolder1.
  6. Let the Flows run until you have a few data points to look at.
  7. Don’t forget to turn the Flows off!

 

When you do that, you can see that the EmailID columns are not exact.  The majority of the characters match, but look at the end of the string.  Here is what my data looked like when I ran the procedure above (I redacted the similar middle parts of the EmailIDs for efficiency of this post):

Title

EmailID

ReceiveTime

FolderDirection

Test Email Ping-Pong

AAM ***** QMbqoAACKHjbgAAA=

12/14/2018 5:10

Received in Folder 1

Test Email Ping-Pong

AAM ***** QMbqoAAD4E8pNAAA=

12/14/2018 5:10

Received in Folder 2

Test Email Ping-Pong

AAM ***** QMbqoAAD4E842AAA=

12/13/2018 21:10

Received in Folder 1

Test Email Ping-Pong

AAM ***** QMbqoAAD4E8pOAAA=

12/13/2018 21:10

Received in Folder 2

Test Email Ping-Pong

AAM ***** QMbqoAAD4E843AAA=

12/13/2018 21:10

Received in Folder 1

Test Email Ping-Pong

AAM ***** QMbqoAAD4E8pPAAA=

12/13/2018 21:10

Received in Folder 2

Test Email Ping-Pong

AAM ***** QMbqoAAD4E844AAA=

12/13/2018 21:10

Received in Folder 1

Test Email Ping-Pong

AAM ***** QMbqoAAD4E8pQAAA=

12/13/2018 21:10

Received in Folder 2

Test Email Ping-Pong

AAM ***** QMbqoAAD4E845AAA=

12/13/2018 21:10

Received in Folder 1

 

If you try to use those EmailID values in a subsequent Flow or PowerApps function (e.g., Office365.GetEmail(EmailID).Subject) they will all fail except the last entry.  That one usually works. 

 

Assuming the above is correct, how can I determine the Message ID after a move operation?  Do we need all of the characters in the Message ID string or can we use a Left(n) operation to use the characters that do not appear to be changed?  Are there any other methods to use Flow and PowerApps to track an email regardless of its folder location?

 

Any assistance with this issue will be greatly appreciated.

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Is the Message ID of an email supposed to change when moving that email to a new Outlook folder

Hi @TClark

 

Yes, as you said, the Message ID of an email would change when moving an email to a new Outlook folder, and I afraid that there is no any way to know the new Message ID of the email in microsoft flow, so you requirement maybe couldn't be achieved within microsoft flow currently.

 

If you would like to know the new Message ID of an moved email or any methods to track an email regardless of its folder location to be added in microsoft, you could submit an idea to microsoft flow idea forum:

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

 

Best regards,

Alice

View solution in original post

1 REPLY 1
Community Support Team
Community Support Team

Re: Is the Message ID of an email supposed to change when moving that email to a new Outlook folder

Hi @TClark

 

Yes, as you said, the Message ID of an email would change when moving an email to a new Outlook folder, and I afraid that there is no any way to know the new Message ID of the email in microsoft flow, so you requirement maybe couldn't be achieved within microsoft flow currently.

 

If you would like to know the new Message ID of an moved email or any methods to track an email regardless of its folder location to be added in microsoft, you could submit an idea to microsoft flow idea forum:

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

 

Best regards,

Alice

View solution in original post

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 276 members 1,856 guests
Please welcome our newest community members: