Outlook Immutable Id

My use case:

To save email resume properly, i need immutable id to reference original email of the resume. This allow me to build a system where every single new email is resume like :
“X person ask X person if there is a possibility to do X in comparaison of original X”

This remove more than 80% of useless token and simplify the context for smaller llm to understand a long email conversation with many ping pong and person inside. I use it to create draft prefill with the good knowledge + compact history of the conversation with each mail resume :blush:

Any resources to support this?

Are you willing to work on this?

It’s already done, check out here and feel free to ask me ANYTHING that could increase the speed for a merge, i think this feature is very light but very important when you realise how microsoft manage by default id that can change for no technical reason… :grin:

Nice use case. Until this is merged, a workaround that works today:

  1. Use the HTTP Request node instead of the Outlook node, with Authentication = Predefined Credential Type → Microsoft Outlook OAuth2 API (your existing credential).
  2. Add the header Prefer: IdType="ImmutableId"
  3. Call Graph directly, for example GET https://graph.microsoft.com/v1.0/me/messages?$top=10

With that header, the id you get back is the immutable ID, so it stays the same when the email is moved between folders.

For IDs you already stored, you can convert them with POST https://graph.microsoft.com/v1.0/me/translateExchangeIds and body:

{
  "inputIds": ["<old id>"],
  "sourceIdType": "restId",
  "targetIdType": "restImmutableEntryId"
}

Docs: Obtain immutable identifiers for Outlook resources - Microsoft Graph | Microsoft Learn

Hello Ahmad,

it’s exactly what is use today but for such a small setup i think it’s time to be a native feature :grinning_face_with_smiling_eyes:

Until the PR lands, one thing you can use today without the header: the Message-ID. Microsoft’s message resource documents internetMessageId as “the message ID in the format specified by RFC2822” (learn.microsoft.com, Graph message resource). Unlike id, the header-based Message-ID doesn’t change when the item is moved between folders, so storing it next to your resume summary gives you a stable key for the original email.

Two checks before you rely on it. First, confirm it’s populated on the mail you actually process. Second, if you want to look a message up by it, test a $filter on internetMessageId on your own mailbox first, because I haven’t confirmed that filter works in your setup.

If you need the Graph id itself to survive moves, Ahmad’s Prefer: IdType="ImmutableId" route is still the way to get it.