Skip to main content
How-To Guides Last updated: 31 March 2026

How to Create and Manage Inbox Rules

Automate email organisation with rules that move, mark, forward, or filter incoming mail based on sender, subject, body, attachments, and more — with exceptions and dry-run preview.

Set up rules to automatically sort, mark, forward, or filter incoming emails. Rules run server-side — they work even when Outlook is not open.

List Existing Rules

“Show me my inbox rules”

tool: manage-rules
params:
  action: "list"

For full details on conditions, actions, and exceptions:

tool: manage-rules
params:
  action: "list"
  includeDetails: true

Create a Rule

Basic: Sort by Sender

“Create a rule to move GitHub notifications to a GitHub folder”

tool: manage-rules
params:
  action: "create"
  name: "GitHub Notifications"
  fromAddresses: "noreply@github.com, notifications@github.com"
  moveToFolder: "GitHub"
  markAsRead: true

OR Logic: Multiple Subject Keywords

Use comma-separated values to match any of the keywords (OR logic):

“Move emails with invoice, receipt, or payment in the subject to Finance”

tool: manage-rules
params:
  action: "create"
  name: "Finance Documents"
  containsSubject: "invoice, receipt, payment, statement"
  moveToFolder: "Finance"

Combined Conditions

Combine multiple conditions — all must match (AND logic between different condition types):

“Move emails with attachments that mention invoices to my Paperless folder”

tool: manage-rules
params:
  action: "create"
  name: "Paperless — receipts with attachments"
  containsSubject: "invoice, receipt, payment, order confirmation"
  hasAttachments: true
  moveToFolder: "Paperless"
  markAsRead: true

Exceptions: Exclude Specific Senders or Subjects

Exceptions let you skip the rule for certain matches. Use except* parameters:

“Move receipt emails to Paperless, but NOT from my accountant”

tool: manage-rules
params:
  action: "create"
  name: "Paperless — receipts (except accountant)"
  containsSubject: "invoice, receipt, payment"
  hasAttachments: true
  moveToFolder: "Paperless"
  markAsRead: true
  exceptFromAddresses: "tax@withaccounting.com"
  exceptSubjectContains: "tax return, FYI"

Preview with Dry Run

Use dryRun: true to preview a rule without creating it:

tool: manage-rules
params:
  action: "create"
  name: "Test Rule"
  fromAddresses: "alerts@example.com"
  moveToFolder: "Alerts"
  dryRun: true

Forward or Redirect Matching Emails

tool: manage-rules
params:
  action: "create"
  name: "Forward client emails"
  fromAddresses: "client@company.com"
  forwardTo: "team@company.com"
  stopProcessingRules: true

Assign Categories

tool: manage-rules
params:
  action: "create"
  name: "Tag urgent emails"
  importance: "high"
  sentToMe: true
  assignCategories: "Urgent, Follow Up"

Auto-Delete Noise

Move matching emails to Deleted Items (not permanent deletion):

tool: manage-rules
params:
  action: "create"
  name: "Delete marketing noise"
  senderContains: "marketing, promo, newsletter"
  deleteMessage: true

Update an Existing Rule

Modify a rule by name or ID. Conditions and actions use replace semantics — provide all desired values, not just changes.

“Add exceptions to my receipts rule”

tool: manage-rules
params:
  action: "update"
  ruleName: "Paperless — receipts with attachments"
  exceptFromAddresses: "tax@withaccounting.com, admin@company.com"

“Rename and disable a rule”

tool: manage-rules
params:
  action: "update"
  ruleName: "Old Rule Name"
  name: "New Rule Name"
  isEnabled: false

“Preview changes before applying”

tool: manage-rules
params:
  action: "update"
  ruleName: "My Rule"
  containsSubject: "urgent, critical, asap"
  dryRun: true

Reorder Rule Priority

Rules execute in sequence order — lower numbers run first. If two rules conflict, the first one wins.

“Make the GitHub rule run first”

tool: manage-rules
params:
  action: "reorder"
  ruleName: "GitHub Notifications"
  sequence: 1

Delete a Rule

tool: manage-rules
params:
  action: "delete"
  ruleName: "GitHub Notifications"

Available Conditions

All string conditions accept comma-separated values for OR logic.

ParameterWhat it matchesExample
fromAddressesExact sender emails"boss@example.com, ceo@example.com"
sentToAddressesExact recipient emails"team@example.com"
containsSubjectSubject keywords (OR)"invoice, receipt, payment"
bodyContainsBody text keywords (OR)"urgent, action required"
bodyOrSubjectContainsBody OR subject keywords"deadline, overdue"
senderContainsPartial sender match"example.com, noreply"
recipientContainsPartial recipient match"team, support"
hasAttachmentsHas file attachmentstrue
importanceEmail importance level"high", "normal", "low"
sensitivityEmail sensitivity"confidential", "private"
sentToMeI am a recipienttrue
sentOnlyToMeI am the only recipienttrue
sentCcMeI am in CCtrue
isAutomaticReplyAuto-reply/OOO messagetrue

Available Actions

ParameterWhat it doesExample
moveToFolderMove to folder (by name)"Archive"
copyToFolderCopy to folder (by name)"Backup"
markAsReadMark as readtrue
markImportanceSet importance level"high", "low"
forwardToForward to recipients"user@example.com"
redirectToRedirect (appears from original sender)"alias@example.com"
assignCategoriesAssign Outlook categories"Work, Important"
stopProcessingRulesStop evaluating further rulestrue
deleteMessageMove to Deleted Itemstrue

Available Exceptions

Exceptions use the same conditions with except prefix. The rule is skipped when any exception matches.

ParameterExcludes when
exceptFromAddressesSender matches these emails
exceptSubjectContainsSubject contains these keywords
exceptSenderContainsSender partially matches
exceptBodyContainsBody contains these keywords
exceptHasAttachmentsEmail has attachments

Full Parameter Reference

ParameterUsed withDescription
actionAlllist, create, update, reorder, delete
includeDetailslistShow conditions, actions, exceptions
namecreate, updateRule name (required for create, rename for update)
dryRuncreate, updatePreview without committing
isEnabledcreate, updateEnable/disable (default: true)
sequencecreate, reorderExecution order (lower = first)
ruleNameupdate, reorder, deleteIdentify rule by name
ruleIdupdate, deleteIdentify rule by ID
All conditionscreate, updateSee tables above
All actionscreate, updateSee tables above
All exceptionscreate, updateSee tables above

Safety

  • dryRun: Preview rules before creating or updating
  • Rate limiting: Configure via OUTLOOK_MAX_MANAGE_RULES_PER_SESSION
  • Recipient allowlist: forwardTo and redirectTo are checked against OUTLOOK_ALLOWED_RECIPIENTS
  • No permanent delete: deleteMessage moves to Deleted Items (recoverable). Permanent deletion is not available via this tool.
  • Replace semantics on update: When updating conditions or actions, the entire section is replaced. Use dryRun to preview before applying.

Tips

  • Create the destination folder first with the folders tool before creating a rule that targets it
  • Use markAsRead: true for high-volume automated notifications (CI/CD, alerts)
  • Use stopProcessingRules: true on catch-all rules to prevent later rules from overriding
  • Use dryRun: true to preview complex rules before creating
  • Comma-separated string conditions use OR logic — any keyword match triggers the rule
  • Different condition types use AND logic — all conditions must be true
Was this helpful?

Related Articles