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 / Flag message action wi...
Power Automate
Unanswered

Flag message action will flag sent message instead of received message

(0) ShareShare
ReportReport
Posted on by 256

Hello,

I have some automations that monitor received messages of an shared mailbox and depending on some conditions will forward a message to the same mailbox just to include more details of that message.

One final process step is to "Flag" the received messages as "completed" (including the ones that are forwarded to "self"), but instead of flagging the message in the Inbox folder, will flag the message in the "Sent Items" folder.

 

To be more clear, let's assume there are two messages received in Inbox: Message1 and Message2.

 

Now let's say that Message 2 hit the conditions and the original message is moved into another folder, then is redirected from shared mailbox to the same shared mailbox just to include some more information besides the original message and its attachments. And let's call this "self forwarded message" Message2-2.

 

This new Message2-2 will trigger the flow but this time that special condition will no longer be met and the message will remain in Inbox as the Message1.

 

Now, for these two messages Message1 and Message2-2 at the end of the flow there is an action for "Flag email (V2)" with completed status based on the MessageID of the Inbox message.

But for the Message2-2 instead of flagging the Inbox message, will flag the "Sent items" message. And this is strange as the message from a different folder would have an different MessageID.

 

Is there a way to have flagged the Inbox message? Or what am I missing?

 

Kind Regards,

Lucian

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

    Hi Lucian,

    could you show your flow?

  • Verified answer
    Lucian Profile Picture
    256 on at

    Hi @VictorIvanidze ,

     

    Meanwhile I have found the issue, with the help of Microsoft Support.

    Trying to verify why this is happening, they suggested to use "Get emails (v3)" action that will get messages only from one specific folder. So I've use it for "Sent Items" and "Inbox" and surprise: even Microsoft Outlook will not display proper "message header" for "Sent Items", the message have the "Internet Message ID" the same as one received (in Inbox). Fair enough as the message is send from that shared mailbox to the same mailbox just for adding some extra information.

     

    The difference was "Message ID" that was different for the messages in the different folders.

     

    The issue was generated by "Get message" action because using "Internet Message ID" to be able to find the message in whatever folder it is, and this action probably will return the first message found in the Exchange database with that ID, will match in fact the "Sent Items" one.

     

    So, because of some lack of information (because Outlook did not show message ID for the Sent Items and no explanation/notes/warnings for "Get Message") I have always get the wrong email. 😁

     

    The workaround was to delete the sent items message so the "get message" action will found just the one received.

     

    Kind Regards,

    Lucian

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

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard