Patterns
Patterns trigger automatic actions when emails match certain criteria. Great for handling recurring noise.
Pattern Structure
{ "id": "billing-receipts", "name": "Billing Receipts", "match_sender": "(stripe|paypal|aws)@", "match_subject": "(receipt|payment|invoice)", "match_body": null, "account_id": null, "suggested_action": "move:billing", "suggested_cc": null, "priority": "low", "auto_apply": true, "tags": ["billing", "noise"]}Field Reference
| Field | Required | Description |
|---|---|---|
id | Yes | Unique identifier for the pattern |
name | Yes | Human-readable description |
match_sender | No | Regex pattern for From address |
match_subject | No | Regex pattern for Subject line |
match_body | No | Regex pattern for email body |
match_all | No | If true, ALL conditions must match. If false, ANY triggers. Default: false |
account_id | No | Limit to specific account (null = all) |
suggested_action | Yes | What to do when matched |
suggested_cc | No | Email addresses to CC |
priority | No | Priority level: high, normal, low |
auto_apply | Yes | Apply automatically or suggest only |
tags | No | Tags for categorization |
Matching Rules
Patterns use regex. All matches are case-insensitive by default. At least one match field (match_sender, match_subject, or match_body) should be specified.
Available Actions
| Action | Description |
|---|---|
move:folder | Move to specified folder |
archive | Archive the email |
use_template:name | Suggest a template response |
delegate:email | CC someone |
priority:high | Mark as high priority |
Auto Apply
When auto_apply is true, the action happens automatically in Phase 3. When false, the AI suggests the action but waits for approval.
Be Careful
Only set
auto_apply: true for patterns you're confident about. Start with false and move to true after the pattern proves reliable.Example Patterns
Billing Noise
{ "id": "billing-receipts", "name": "Billing Receipts", "match_sender": "(stripe|paypal|aws|runware|digitalocean)@", "suggested_action": "move:billing", "auto_apply": true, "tags": ["billing", "noise"]}Newsletter Archive
{ "id": "newsletters", "name": "Newsletters", "match_sender": "(newsletter|digest|noreply)@", "match_subject": "(weekly|digest|update)", "suggested_action": "archive", "auto_apply": true, "tags": ["newsletter", "noise"]}Card Failure Alert
{ "id": "card-failure", "name": "Card Failure", "match_subject": "(failed|declined|expired|update.*card)", "suggested_action": "priority:high", "priority": "high", "auto_apply": false, "tags": ["urgent", "billing"]}Support Ticket Template
{ "id": "techdeals-ticket", "name": "TechDeals Ticket", "match_sender": "[email protected]", "suggested_action": "use_template:techdeals-need-info", "suggested_cc": ["[email protected]"], "auto_apply": false, "tags": ["support", "techdeals"]}File Location
~/.config/pontius/knowledge/patterns/patterns.json