On this page
Sommatic Docs
Open portal

Outlook - Message Category

Apply Outlook categories (labels) to messages via the Microsoft Graph API.

View as Markdown
Open in
Connectors Available connectors.microsoft.outlook.message.category Version 1.0.0 Execution: async

Applies Outlook categories (labels) to a message without removing the existing ones, and can create them in the mailbox's master category list with a color. It works on one mailbox by message id, or fans out across several mailboxes by Internet Message ID or conversation.

Categories live in the user master list and can be applied to messages with a merge-safe PATCH that preserves categories already set by humans or other automations.

Operations:

  • apply: Apply one or more categories to an existing message. Merges with existing categories (does not overwrite).
  • ensure_master_category: Create one or more categories in the user master list. Idempotent: returns success if the category already exists.
  • apply_with_ensure: Combination of the two. Recommended for workflows that should self-bootstrap their categories.

How it works

  1. Resolves the node config, requires connection_id and gets a Graph token (app-only with client_id, client_secret, tenant_id, or the stored token / access_token). Every request asks for immutable ids (Prefer: IdType="ImmutableId").
  2. Normalizes categories from a comma-separated string, an array of names or an array of { name, color }; items without a color use category_color.
  3. Single-mailbox mode applies when there is one mailbox (or mailbox_mode is token_owner) and neither internet_message_id nor conversation_id is set: it works on message_id directly.
  4. Otherwise it fans out over mailbox_email (array or comma-separated list). With internet_message_id and match_scope: conversation it first probes the mailboxes for the conversation id; then, in parallel per mailbox, it resolves the local messages (the conversation's messages, up to 50, or with match_scope: message only the exact Internet Message ID copies, up to 10), retrying resolve_max_attempts times with resolve_wait_ms between attempts.
  5. ensure_master_category creates each category in the master list; an existing one is accepted and its color is corrected when it differs. apply reads the message's categories, merges the new ones without duplicates and PATCHes them, retrying 412 (change key), 429 (honouring Retry-After) and 404 up to patch_max_attempts. apply_with_ensure runs both.
  6. With mark_read, marks the resolved messages as read (best effort). Chooses error when every mailbox failed, or when require_apply is set and nothing was labeled; otherwise out.

In a workflow

The node as it appears in a workflow file (draft_nodes[]), and the envelope of a successful run.

{
  "node_id": "node-label-processed",
  "label": "Label as processed",
  "operator_slug": "connectors.microsoft.outlook.message.category",
  "operator_version": "1.0.0",
  "config": {
    "connection_id": "pi-credential-xxxx",
    "mailbox_mode": "other",
    "mailbox_email": "support@example.com",
    "operation": "apply_with_ensure",
    "message_id": "{{ $json.id }}",
    "categories": [
      {
        "name": "Processed",
        "color": "preset4"
      }
    ],
    "category_color": "preset8"
  }
}

Configuration

connection_id string Required

Credential for Microsoft Graph API access. Requires `Mail.ReadWrite` (for PATCH /messages/{id}) and `MailboxSettings.ReadWrite` (for POST /outlook/masterCategories). Accepts credentials of type `oauth2` (access + refresh token), `service-account` (tenant id + client id + client secret), or `object` (advanced Graph config).

mailbox_mode string Optional

Token owner: uses the mailbox of the account that generated the credential. Other mailbox: specify an email address (requires Application permissions in Azure AD).

Default: token_owner

Allowed values: token_ownerother

mailbox_email any Optional Accepts expressions

Single email or array/comma-separated list of mailboxes to operate on. When more than one is provided, the worker fans out and applies the categories in every mailbox that contains the same message (matched by internetMessageId).

Shown when: mailbox_mode = other

internet_message_id string Optional Accepts expressions

RFC-5322 Internet Message ID of the email (e.g., <BL0PR16MB...@outlook.com>). Required for multi-mailbox mode: the worker uses it to find the local message id in each mailbox via $filter=internetMessageId eq. When omitted and a single mailbox is provided, the worker falls back to the legacy single-mailbox flow using `message_id` directly.

Shown when: operation = apply | apply_with_ensure

operation string Required

apply: apply categories to an existing message (merge-safe). ensure_master_category: create categories in the user master list (idempotent). apply_with_ensure: ensure + apply in one call (recommended).

Default: apply_with_ensure

Allowed values: applyensure_master_categoryapply_with_ensure

message_id string Optional Accepts expressions

Graph message ID of the email to categorize.

Shown when: operation = apply | apply_with_ensure

categories array<string | object> Optional Accepts expressions

Categories to apply or ensure. Accepts: an array of display-name strings, a comma-separated string, OR an array of { name, color } objects to set a distinct color per category (e.g. [{name:"Recibido por IA - Sommatic",color:"preset8"},{name:"Asignado DAUITA",color:"preset4"}]). When an item has no color, the node-level category_color is used.

category_color string Optional

Outlook category color preset. Required for ensure_master_category and apply_with_ensure (ignored by apply). Common values: preset0 (Red), preset8 (Purple), preset23 (Dark Purple - closest to Sommatic AI corporate #2A213B). Use "none" for no color.

Allowed values: preset0preset1preset2preset3preset4preset5preset6preset7preset8preset9preset10preset11preset12preset13preset14preset15preset16preset17preset18preset19preset20preset21preset22preset23preset24none

Shown when: operation = ensure_master_category | apply_with_ensure

match_scope string Optional

conversation (default): an internet_message_id is probed and expanded to the WHOLE thread (labels original + replies/forwards). message: resolve ONLY the exact internet_message_id matches (the reply/forward copy) — never expand to the conversation. Use "message" to label/mark-read a specific IA-generated copy without touching the citizen original.

Default: conversation

Allowed values: conversationmessage

Shown when: operation = apply | apply_with_ensure

mark_read boolean Optional

After labeling, PATCH { isRead:true } on every resolved message. Scope it to IA-generated copies only (via match_scope:"message" or by targeting the forward_recipient mailbox); never point a mark_read node at the citizen original, which must stay unread.

Default: false

Shown when: operation = apply | apply_with_ensure

resolve_max_attempts number Optional

Bounded retry on the message-resolution query. Absorbs Graph indexing latency of a just-sent reply/forward copy (a "success that resolved 0 messages" does not re-fire the node retry). Use e.g. 6 for IA-copy nodes; leave 1 for legacy calls.

Default: 1

Shown when: operation = apply | apply_with_ensure

resolve_wait_ms number Optional

Delay between resolution attempts in milliseconds (e.g. 1500). Only relevant when resolve_max_attempts > 1.

Default: 0

Shown when: operation = apply | apply_with_ensure

require_apply boolean Optional

When true, emit port:"error" if nothing was labeled after all retries (instead of a silent success). Lets the caller drive a fallback branch (e.g. a notice + human task).

Default: false

Shown when: operation = apply | apply_with_ensure

Its configuration shows the shared execution settings, but this node does not apply retries (retryOnFail, maxTries) yet. continueOnFail is not applied by any node.

Behaviour in the code

What the implementation does with these keys beyond what the schema says.

patch_max_attempts Read by the code, not declared
Undeclared. Attempts for each category PATCH (default 4, minimum 1). patch_wait_ms (undeclared, default 500) is multiplied by the attempt number between tries, unless Graph sends Retry-After.
conversation_id Read by the code, not declared
Undeclared in the config schema (only in the input contract). When set, it is used directly as the thread to label and the probe by Internet Message ID is skipped; it also switches to multi mode.
mailbox_email
Read only when mailbox_mode is other. Accepts one address, an array or a comma-separated list; more than one address switches to multi mode.
category_color
Outlook preset (preset0…preset24) or none. Ignored by apply. A per-item color in categories takes precedence.
mark_read
In single mode it marks message_id as read; in multi mode every resolved message. With match_scope: conversation that includes the whole thread, so use match_scope: message to mark only one copy.

Output ports

out default

Single mode: the categories were applied or already present. Multi mode: at least one mailbox did not fail; the output is then { result: { operation, mode: "multi_mailbox", conversation_id_resolved, mailboxes_total, applied_in, messages_per_mailbox, messages_read_by_mailbox, not_found_in, permission_denied_in, errored_in, conflict_in, any_applied, any_conflict } }.

Data
{
  "result": {
    "operation": "apply_with_ensure",
    "message_id": "AAkALgAAAAAAHYQDEapmEc2byACqAC-EWg0A",
    "applied": [
      "Processed"
    ],
    "preserved": [
      "Customer"
    ],
    "final_categories": [
      "Customer",
      "Processed"
    ],
    "master_category_ensured": true,
    "ensured": [],
    "already_existed": [
      "Processed"
    ],
    "permission_denied": []
  }
}
error

A validation failed (the output is the envelope { ok, errors, port }), a Graph call failed in single mode ({ error, response }), or in multi mode every mailbox failed or require_apply found nothing labeled (the multi-mailbox result).

Data
{
  "ok": false,
  "errors": [
    "At least one category is required for apply operation"
  ],
  "port": "error"
}

In expressions

What a later node can read from this node's output with $("Outlook - Message Category").item.json.<path> (write your node's label instead of Outlook - Message Category). Editor marks the paths the workflow editor suggests under Previous Nodes (the output contract); Worker marks the paths the worker really returns through out, from the output shown in Ports.

ExpressionEditorWorker
$("Outlook - Message Category").item.json.resultobject= {…}
$("Outlook - Message Category").item.json.result.operationstring= "apply_with_ensure"
$("Outlook - Message Category").item.json.result.message_idstring= "AAkALgAAAAAAHYQDEapmEc2byACqAC-EWg0A"
$("Outlook - Message Category").item.json.result.appliedarray= […] (1)Categories newly added to the message.
$("Outlook - Message Category").item.json.result.preservedarray= […] (1)Categories that were already on the message and were preserved.
$("Outlook - Message Category").item.json.result.final_categoriesarray= […] (2)Final categories on the message after the operation.
$("Outlook - Message Category").item.json.result.ensuredarray= […] (0)Categories created in the master list.
$("Outlook - Message Category").item.json.result.already_existedarray= […] (1)Categories that already existed in the master list.
$("Outlook - Message Category").item.json.result.master_category_ensuredboolean= true
$("Outlook - Message Category").item.json.result.conversation_id_resolvedstringThe worker does not return it: reads as undefinedThread id used to resolve messages (multi-mailbox mode). —
$("Outlook - Message Category").item.json.result.messages_per_mailboxobjectThe worker does not return it: reads as undefinedCount of messages labeled per mailbox. —
$("Outlook - Message Category").item.json.result.messages_read_by_mailboxobjectThe worker does not return it: reads as undefinedCount of messages marked read (isRead:true) per mailbox, when mark_read is set. —
$("Outlook - Message Category").item.json.result.permission_deniedarrayNot suggested by the editor= […] (0)—

— Editor: The editor suggests it, but the worker does not return it: it reads as undefined.

— Worker: The worker returns it but the editor does not suggest it: write it by hand. Keys inside objects can depend on your data or configuration (for example one key per label).

Errors

Message Port Cause and fix
Microsoft 365 credential is required error connection_id is empty.
Failed to resolve Microsoft 365 access token error The credential could not be resolved or the token request failed.
Message ID is required for apply operation error Single mode without message_id.
At least one category is required for apply operation error categories is empty. For ensure_master_category the message is At least one category displayName is required.
Failed to ensure master category '<name>': <Graph message> error Creating the category failed for a reason other than "already exists" or a permission error.
Unknown operation: <operation> error operation is not apply, ensure_master_category or apply_with_ensure (single mode).
No messages could be labeled in this mailbox: <reason> error Multi mode: reported per mailbox inside errored_in (or conflict_in for change-key conflicts that survived the retries).

Input contract

connection_id string Required
operation string Required
message_id string Optional
internet_message_id string Optional
conversation_id string Optional
categories array<string> Optional
category_color string Optional
match_scope string Optional

Allowed values: conversationmessage

mark_read boolean Optional
resolve_max_attempts number Optional
resolve_wait_ms number Optional
require_apply boolean Optional

Output contract

result object Optional
operation string Optional
message_id string Optional
applied array<string> Optional

Categories newly added to the message.

preserved array<string> Optional

Categories that were already on the message and were preserved.

final_categories array<string> Optional

Final categories on the message after the operation.

ensured array<string> Optional

Categories created in the master list.

already_existed array<string> Optional

Categories that already existed in the master list.

master_category_ensured boolean Optional
conversation_id_resolved string Optional

Thread id used to resolve messages (multi-mailbox mode).

messages_per_mailbox object Optional

Count of messages labeled per mailbox.

messages_read_by_mailbox object Optional

Count of messages marked read (isRead:true) per mailbox, when mark_read is set.

Contracts (JSON Schema)

The definition exactly as the orchestrator declares it. All is the whole *.definition.js; compare it with the sections above to spot differences between the documentation and the schema. Use it to validate a node before you publish.

{
  "slug": "connectors.microsoft.outlook.message.category",
  "name": "Outlook - Message Category",
  "category": "integrations",
  "version": "1.0.0",
  "description": "Apply Outlook categories (labels) to messages via the Microsoft Graph API.\n\n  Categories live in the user master list and can be applied to messages with a merge-safe PATCH that preserves categories already set by humans or other automations.\n\n  **Operations:**\n  - **apply:** Apply one or more categories to an existing message. Merges with existing categories (does not overwrite).\n  - **ensure_master_category:** Create one or more categories in the user master list. Idempotent: returns success if the category already exists.\n  - **apply_with_ensure:** Combination of the two. Recommended for workflows that should self-bootstrap their categories.",
  "capabilities": [
    "email",
    "microsoft",
    "outlook",
    "office365",
    "graph-api",
    "category",
    "label"
  ],
  "group": [
    {
      "key": "microsoft",
      "name": "Microsoft",
      "icon_url": "/icons/integrations/microsoft/microsoft.svg"
    },
    {
      "key": "microsoft365",
      "name": "Microsoft 365",
      "icon_url": "/icons/integrations/microsoft/microsoft365.svg"
    }
  ],
  "icon_url": "/icons/integrations/microsoft/outlook.svg",
  "config_schema": {
    "type": "object",
    "properties": {
      "connection_id": {
        "type": "string",
        "title": "Microsoft 365 Credential",
        "description": "Credential for Microsoft Graph API access. Requires `Mail.ReadWrite` (for PATCH /messages/{id}) and `MailboxSettings.ReadWrite` (for POST /outlook/masterCategories). Accepts credentials of type `oauth2` (access + refresh token), `service-account` (tenant id + client id + client secret), or `object` (advanced Graph config).",
        "ui_widget": "connection_picker",
        "ui_options": {
          "credential_types": [
            "oauth2",
            "service-account",
            "object"
          ],
          "types": [
            "outlook",
            "microsoft365",
            "oauth2"
          ]
        }
      },
      "mailbox_mode": {
        "type": "string",
        "title": "Mailbox",
        "enum": [
          "token_owner",
          "other"
        ],
        "default": "token_owner",
        "description": "Token owner: uses the mailbox of the account that generated the credential. Other mailbox: specify an email address (requires Application permissions in Azure AD)."
      },
      "mailbox_email": {
        "title": "Mailbox Email(s)",
        "description": "Single email or array/comma-separated list of mailboxes to operate on. When more than one is provided, the worker fans out and applies the categories in every mailbox that contains the same message (matched by internetMessageId).",
        "format": "expression",
        "displayOptions": {
          "show": {
            "mailbox_mode": [
              "other"
            ]
          }
        }
      },
      "internet_message_id": {
        "type": "string",
        "title": "Internet Message ID",
        "description": "RFC-5322 Internet Message ID of the email (e.g., <BL0PR16MB...@outlook.com>). Required for multi-mailbox mode: the worker uses it to find the local message id in each mailbox via $filter=internetMessageId eq. When omitted and a single mailbox is provided, the worker falls back to the legacy single-mailbox flow using `message_id` directly.",
        "format": "expression",
        "displayOptions": {
          "show": {
            "operation": [
              "apply",
              "apply_with_ensure"
            ]
          }
        }
      },
      "operation": {
        "type": "string",
        "title": "Operation",
        "enum": [
          "apply",
          "ensure_master_category",
          "apply_with_ensure"
        ],
        "default": "apply_with_ensure",
        "description": "apply: apply categories to an existing message (merge-safe). ensure_master_category: create categories in the user master list (idempotent). apply_with_ensure: ensure + apply in one call (recommended)."
      },
      "message_id": {
        "type": "string",
        "title": "Message ID",
        "description": "Graph message ID of the email to categorize.",
        "format": "expression",
        "displayOptions": {
          "show": {
            "operation": [
              "apply",
              "apply_with_ensure"
            ]
          }
        }
      },
      "categories": {
        "type": "array",
        "title": "Categories",
        "items": {
          "type": [
            "string",
            "object"
          ]
        },
        "description": "Categories to apply or ensure. Accepts: an array of display-name strings, a comma-separated string, OR an array of { name, color } objects to set a distinct color per category (e.g. [{name:\"Recibido por IA - Sommatic\",color:\"preset8\"},{name:\"Asignado DAUITA\",color:\"preset4\"}]). When an item has no color, the node-level category_color is used.",
        "format": "expression"
      },
      "category_color": {
        "type": "string",
        "title": "Category Color",
        "enum": [
          "preset0",
          "preset1",
          "preset2",
          "preset3",
          "preset4",
          "preset5",
          "preset6",
          "preset7",
          "preset8",
          "preset9",
          "preset10",
          "preset11",
          "preset12",
          "preset13",
          "preset14",
          "preset15",
          "preset16",
          "preset17",
          "preset18",
          "preset19",
          "preset20",
          "preset21",
          "preset22",
          "preset23",
          "preset24",
          "none"
        ],
        "description": "Outlook category color preset. Required for ensure_master_category and apply_with_ensure (ignored by apply). Common values: preset0 (Red), preset8 (Purple), preset23 (Dark Purple - closest to Sommatic AI corporate #2A213B). Use \"none\" for no color.",
        "displayOptions": {
          "show": {
            "operation": [
              "ensure_master_category",
              "apply_with_ensure"
            ]
          }
        }
      },
      "match_scope": {
        "type": "string",
        "title": "Match Scope",
        "enum": [
          "conversation",
          "message"
        ],
        "default": "conversation",
        "description": "conversation (default): an internet_message_id is probed and expanded to the WHOLE thread (labels original + replies/forwards). message: resolve ONLY the exact internet_message_id matches (the reply/forward copy) — never expand to the conversation. Use \"message\" to label/mark-read a specific IA-generated copy without touching the citizen original.",
        "displayOptions": {
          "show": {
            "operation": [
              "apply",
              "apply_with_ensure"
            ]
          }
        }
      },
      "mark_read": {
        "type": "boolean",
        "title": "Mark as Read",
        "default": false,
        "description": "After labeling, PATCH { isRead:true } on every resolved message. Scope it to IA-generated copies only (via match_scope:\"message\" or by targeting the forward_recipient mailbox); never point a mark_read node at the citizen original, which must stay unread.",
        "displayOptions": {
          "show": {
            "operation": [
              "apply",
              "apply_with_ensure"
            ]
          }
        }
      },
      "resolve_max_attempts": {
        "type": "number",
        "title": "Resolve Max Attempts",
        "default": 1,
        "description": "Bounded retry on the message-resolution query. Absorbs Graph indexing latency of a just-sent reply/forward copy (a \"success that resolved 0 messages\" does not re-fire the node retry). Use e.g. 6 for IA-copy nodes; leave 1 for legacy calls.",
        "displayOptions": {
          "show": {
            "operation": [
              "apply",
              "apply_with_ensure"
            ]
          }
        }
      },
      "resolve_wait_ms": {
        "type": "number",
        "title": "Resolve Wait (ms)",
        "default": 0,
        "description": "Delay between resolution attempts in milliseconds (e.g. 1500). Only relevant when resolve_max_attempts > 1.",
        "displayOptions": {
          "show": {
            "operation": [
              "apply",
              "apply_with_ensure"
            ]
          }
        }
      },
      "require_apply": {
        "type": "boolean",
        "title": "Require Apply",
        "default": false,
        "description": "When true, emit port:\"error\" if nothing was labeled after all retries (instead of a silent success). Lets the caller drive a fallback branch (e.g. a notice + human task).",
        "displayOptions": {
          "show": {
            "operation": [
              "apply",
              "apply_with_ensure"
            ]
          }
        }
      },
      "execution": {
        "type": "object",
        "title": "Execution Settings",
        "properties": {
          "alwaysOutputData": {
            "type": "boolean",
            "title": "Always Output Data",
            "description": "Always output data, even on error (if configured).",
            "default": false
          },
          "retryOnFail": {
            "type": "boolean",
            "title": "Retry On Fail",
            "description": "Retry the execution if it fails.",
            "default": false
          },
          "maxTries": {
            "type": "integer",
            "title": "Max Retries",
            "description": "Number of retries.",
            "default": 3,
            "displayOptions": {
              "show": {
                "retryOnFail": [
                  true
                ]
              }
            }
          },
          "waitBetweenTries": {
            "type": "integer",
            "title": "Wait Between Retries (ms)",
            "default": 1000,
            "displayOptions": {
              "show": {
                "retryOnFail": [
                  true
                ]
              }
            }
          },
          "continueOnFail": {
            "type": "boolean",
            "title": "Continue On Fail",
            "description": "Do not crash workflow on error.",
            "default": false
          },
          "timeout_ms": {
            "type": "integer",
            "title": "Timeout (ms)",
            "description": "Max execution time for this node before it is killed, in milliseconds. Honored by long-running operators (e.g. OCR/extraction, inline code). Default 300000 (5 min).",
            "default": 300000
          }
        }
      }
    },
    "required": [
      "connection_id",
      "operation"
    ]
  },
  "input_contract_schema": {
    "type": "object",
    "properties": {
      "connection_id": {
        "type": "string"
      },
      "operation": {
        "type": "string"
      },
      "message_id": {
        "type": "string"
      },
      "internet_message_id": {
        "type": "string"
      },
      "conversation_id": {
        "type": "string"
      },
      "categories": {
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "category_color": {
        "type": "string"
      },
      "match_scope": {
        "type": "string",
        "enum": [
          "conversation",
          "message"
        ]
      },
      "mark_read": {
        "type": "boolean"
      },
      "resolve_max_attempts": {
        "type": "number"
      },
      "resolve_wait_ms": {
        "type": "number"
      },
      "require_apply": {
        "type": "boolean"
      }
    },
    "required": [
      "connection_id",
      "operation"
    ]
  },
  "output_contract_schema": {
    "type": "object",
    "properties": {
      "result": {
        "type": "object",
        "properties": {
          "operation": {
            "type": "string"
          },
          "message_id": {
            "type": "string"
          },
          "applied": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Categories newly added to the message."
          },
          "preserved": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Categories that were already on the message and were preserved."
          },
          "final_categories": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Final categories on the message after the operation."
          },
          "ensured": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Categories created in the master list."
          },
          "already_existed": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Categories that already existed in the master list."
          },
          "master_category_ensured": {
            "type": "boolean"
          },
          "conversation_id_resolved": {
            "type": "string",
            "description": "Thread id used to resolve messages (multi-mailbox mode)."
          },
          "messages_per_mailbox": {
            "type": "object",
            "description": "Count of messages labeled per mailbox."
          },
          "messages_read_by_mailbox": {
            "type": "object",
            "description": "Count of messages marked read (isRead:true) per mailbox, when mark_read is set."
          }
        }
      }
    }
  },
  "ports": [
    {
      "port_id": "out",
      "label": "Success",
      "description": "Category operation completed successfully.",
      "is_default": true,
      "supports_condition": true
    },
    {
      "port_id": "error",
      "label": "Error",
      "description": "Operation failed (auth error, invalid message ID, API error).",
      "is_default": false,
      "supports_condition": true
    }
  ],
  "execution_mode": "async",
  "required_resources": [],
  "compatible_worker_pools": [
    "standard-io",
    "cloud-io"
  ],
  "tags": [
    "email",
    "microsoft",
    "outlook",
    "office365",
    "category",
    "label",
    "connector"
  ],
  "is_stateful": false,
  "publisher": {
    "identity": "org_sommatic_ai",
    "profile": {
      "name": "Sommatic AI",
      "verified": true,
      "url": "https://me.veripass.com/sommatic",
      "logo_url": null
    }
  }
}

Execution

Execution
async
Stateful
No
Retries (retryOnFail)
No
Credentials
Resolved on the server from connection_id; the secret never reaches the workflow.
Capabilities
emailmicrosoftoutlookoffice365graph-apicategorylabel
Tags
emailmicrosoftoutlookoffice365categorylabelconnector

Notes and limits

  • Applying is merge-safe and idempotent: existing categories are preserved and a category already present returns reason: "already_present" with skipped.
  • Without MailboxSettings.ReadWrite, apply_with_ensure still labels the message and returns master_category_ensured: false with a warning; the category may show without color.
  • In multi mode, a 401/403 in a mailbox is counted in permission_denied_in, not as an error. Conversation ids differ per mailbox, so when a thread lookup returns nothing the worker re-derives the local thread from internet_message_id.
  • Multi mode writes one [label-trace] summary line to the logs per run, plus one line per mailbox where the label did not land.

Reviewed against the orchestrator code · 31e874b · 2026-11-26

Install agent tools

Give your coding agent the official Sommatic AI docs: skills, the docs MCP server and Markdown pages, so it never has to scrape the site.

Skills only. They do not update by themselves; run it again to refresh.

npx skills add https://docs.sommatic.ai
How agents read these docs