I have a flow on a shared mailbox using the “When a new email arrives in a shared mailbox (V2)” trigger. It fetches the message through Graph, passes the text to some Copilot Studio agents, and creates a reply draft in the thread. None of the agents have an Outlook tool or any mailbox access; all mailbox actions happen in the flow itself.
The draft is created like this:
POST https://graph.microsoft.com/v1.0/users/(EmailAddress)/messages/(MessageId FX)/createReply
then PATCH https://graph.microsoft.com/v1.0/users/(EmailAddress)/messages/(Body FX) to fill in the body.
The problem: one incoming email starts the flow twice. Run 1 works fine and creates a correct draft. Run 2 starts about 3.5 minutes later and fails when fetching the message, because the item no longer exists.
Comparing the trigger outputs, both runs come from the same trigger, mailbox and folder, but they have different message ids. Everything else is identical: internetMessageId, conversationId, subject, sender and received time. The item behind run 2 was created in the Inbox minutes after the original arrived, with its inline images recreated and the body HTML structured differently. There is only one copy of the email in the Inbox, so it looks like a temporary rebuilt copy appears briefly, gets picked up by the trigger, and then disappears.
My suspicion is the createReply call: maybe in a shared mailbox it briefly recreates the original message in the Inbox. I can’t prove it, though, since createReply should only touch Drafts.
For now I dedupe on internetMessageId in a SharePoint list, so run 2 terminates right away. I’d still like to fix the cause.
So: what is triggering that second run? Has anyone seen createReply or the PATCH do this, or know what else could create a copy with a new id but the same internetMessageId? Any tips on tracing it in the audit log are welcome too.