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

How to Create and Manage Inbox Rules

Automate email organisation with rules that move, mark, or filter incoming mail based on sender, subject, or attachments.

Set up rules to automatically sort, mark, or filter incoming emails based on sender, subject, or other conditions.

List Existing Rules

“Show me my inbox rules”

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

For full details on conditions and actions:

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

Create a Rule to 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"
  moveToFolder: "GitHub"

Create a Rule Based on Subject

“Move emails with ‘invoice’ in the subject to Finance”

tool: manage-rules
params:
  action: "create"
  name: "Invoices"
  containsSubject: "invoice"
  moveToFolder: "Finance"
  markAsRead: true

Create a Rule for Emails with Attachments

tool: manage-rules
params:
  action: "create"
  name: "Attachments to Review"
  hasAttachments: true
  fromAddresses: "reports@company.com"
  moveToFolder: "Reports"

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

“Delete the GitHub Notifications rule”

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

You can also delete by ID:

tool: manage-rules
params:
  action: "delete"
  ruleId: "rule-id..."

Parameter Reference

ParameterWhat it doesUsed with
actionlist, create, reorder, or deleteAll
includeDetailsShow full conditions/actionslist
nameRule namecreate
fromAddressesSender email addresses (comma-separated)create
containsSubjectSubject must contain this textcreate
hasAttachmentsMatch emails with attachmentscreate
moveToFolderMove matching emails to this foldercreate
markAsReadAuto-mark as readcreate
isEnabledEnable rule after creation (default: true)create
sequenceExecution order — lower runs first (default: 100)create, reorder
ruleNameRule namereorder, delete
ruleIdRule IDdelete

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)
  • Rules run server-side — they work even when Outlook isn’t open
Was this helpful?

Related Articles