Routing Rules
Routing rules let you automatically send specific emails to different channels or webhook destinations based on the sender, subject, or recipient. For example, you can route all emails from billing@stripe.com to a #billing channel, or forward support emails to a webhook.
How It Works
- When an email arrives, MailFellow checks your routing rules in priority order (lowest number first)
- The first rule that matches determines where the email goes
- If no rule matches, the email goes to your default channel
Creating a Rule
- Go to Settings > Rules
- Click Add Rule
- Fill in the fields:
- Name:a descriptive name (e.g. "Billing alerts")
- Match type:what part of the email to check
- Match value:the pattern to match against
- Destination:where to route matching emails
- Priority:order of evaluation (lower = checked first)
- Click Save
Match Types
| Type | Checks | Example |
|---|---|---|
| Sender | The sender's email address | billing@stripe.com |
| Subject | The email subject line | Invoice |
| To | The recipient email address | support@yourcompany.com |
Match values are checked as substring matches. If the match value appears anywhere in the field, the rule triggers. For example, a sender match of @stripe.com will match any email from Stripe.
Destinations
A rule can route emails to:
- A different channel:specify a Channel ID to override the default forwarding channel
- A webhook:specify a Webhook URL to forward the email as a JSON payload to any external service
If both a channel and a webhook are set, the email is sent to both.
Priority Order
Rules are evaluated from lowest to highest priority number. The first matching rule wins. If two rules could match the same email, the one with the lower priority number takes precedence.
Example:
| Priority | Name | Match | Destination |
|---|---|---|---|
| 1 | VIP clients | Sender: @bigclient.com | #vip-support |
| 2 | Billing | Subject: invoice | #billing |
| 10 | Catch-all support | To: support@ | #support |
An invoice email from cfo@bigclient.com would match rule 1 (priority 1) and go to #vip-support, not #billing.
Deleting a Rule
- Go to Settings > Rules
- Find the rule in the list
- Click Delete
Deleting a rule takes effect immediately. Emails already forwarded are not affected.