Write rules in plain English
For AI agents: the docs index is at /llms.txt, and every page is also served as markdown at its URL plus .md.
How rules are written, ordered and previewed, which of the eight actions each plan allows, and how AI labels explain themselves.
A rule is a sentence in plain English. InboxNight turns it into a condition and an ordered list of actions, and the patrol applies it to new mail. This page explains how rules are written, ordered, tested and limited.
Writing a rule
Describe the mail and say what to do with it. One sentence can produce one or more ordered steps.
- "Archive newsletters I never open, but star anything from my accountant."
- "Label invoices and receipts as Finance and mark them as read."
- "Forward anything that mentions a shipping delay to ops@example.com."
These are examples of the style, not built-in rules. Short, specific sentences with a clear condition work best. Name the sender, the topic or the kind of message, then the action. When one sentence holds two ideas, split it into two rules so each can be turned off on its own.
Order, matching and the continue flag
- Rules are evaluated in the order shown, from the top. You can reorder them.
- When a rule matches a message, evaluation stops, unless that rule has the continue flag set.
- With continue set, the next rules still get a look at the same message. Use it for rules that should stack, such as labelling and then archiving.
- A rule can be switched off without deleting it. A disabled rule is skipped.
Scope: one inbox or all
Each rule can target a single connected inbox or all of them. Use the single-inbox scope when work and personal mail need different handling.
Preview on real mail
Before a rule goes live, run a preview. It tests the draft against your recent real messages and shows which would match and what the rule would do. A preview does not change any message and does not appear in the activity log as an action.
The eight actions
- Archive
- Star
- Apply a label
- Forward
- AI-written reply
- Mark as spam
- Mark as read
- Mark as unread
Every action is part of the plan. Plan details are in Plans and limits.
Forward and reply are fixed in advance
- A forward goes to the address written into the rule when you created it. The AI cannot choose or change a recipient.
- An AI-written reply goes only to the original sender of that message.
- InboxNight does not reply to automatic or bulk mail: messages marked as automatic, bulk, list or junk, messages with an unsubscribe header, no-reply senders, your own address, and threads it already replied to are skipped. The number of replies per sender per day is capped.
AI labels and the written reason
You can define labels with a short description, for example "Finance: invoices, receipts and billing notices". For each message the AI judges which of your labels apply and writes a one-line reason. The patrol makes sure the Gmail label exists, applies it, and records the reason in the activity log.
What the AI can and cannot do
- The content of an email is treated as data, never as instructions. Text inside a message cannot change what InboxNight does.
- The AI can only pick among your existing rules and labels. It cannot invent an action, an address or a label name.
- All your rules and labels are judged together in one pass for each message.
When the AI is unsure
If the answer is not clear enough to act on, InboxNight leaves the message exactly as it is and records a second look entry. Those entries appear in the roundup under the second look section, so a person decides.
Examples of well-written rules
| Instead of | Write |
|---|---|
| Clean up my inbox | Archive promotional email from stores, but keep anything that mentions an order number. |
| Important stuff | Star messages from my manager or from anyone at my main client. |
| Handle receipts | Label receipts as Finance and mark them as read. |
| Reply to people | Reply to meeting requests with a short note that I will answer by end of day. |
Habit suggestions
When you keep making the same call by hand, InboxNight can propose a rule for you. See Morning roundup for how suggestions are opened, accepted and dismissed.
Steps in order
- Write the sentence.
- Preview it on recent mail.
- Save it and set its scope.
- Check the first results in the activity log.
- Undo anything you did not want, and adjust the rule.