apply-category
Assign or remove Outlook master categories to email messages. Use set to replace all categories, add to append, or remove to delete specific ones. Works on single messages or batch operations.
Instructions
Tag or untag email messages with master categories (those created via manage-category). action=set (default) replaces the message's category set with the supplied categories array. action=add appends categories to whatever's already on the message. action=remove removes only the named categories, leaving the rest. Accepts either messageId (single) or messageIds (batch via Graph $batch). categories are matched by display name — names must already exist in the master list (create via manage-category first). Returns per-message confirmation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | No | set (replace all), add (append), remove (remove specific). Default: set | |
| messageId | No | Single message ID to categorise | |
| categories | Yes | Category display names to apply/remove (required) | |
| messageIds | No | Array of message IDs to categorise (batch operation) |