web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Flag message action wi...
Power Automate
Answered

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,079 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 237 Super User 2026 Season 1

#2
David_MA Profile Picture

David_MA 176 Super User 2026 Season 1

#3
Power Platform 1919 Profile Picture

Power Platform 1919 96 Super User 2026 Season 1

Last 30 days Overall leaderboard