Is your feature or enhancement related to a problem? Please describe.
Automation Rules can currently match on the sender's email address via the contacts.email filter ("email from"), but there is no way to match on the recipient address ("email to") of an incoming email.
This matters for the common setup where multiple addresses are all forwarded into a single Chatwoot email inbox - e.g. support@, billing@, and sales@ all point at one inbox. Today, once the mail lands, Chatwoot treats it identically regardless of which address it was addressed to. The only email-based condition available is the sender's address, which tells you who wrote, not which service they intended to reach.
Related but distinct:
#3006 - Add support for email aliases of an email inbox (inbox-level alias matching / routing)
#15251 - Add "Is Template" / message-type condition (a different filter axis)
Neither covers a recipient-address condition.
Describe the solution you'd like
Add a new filter key for the incoming email's recipient address, mirroring the existing contacts.email filter so it supports the same operators:
equal_to / not_equal_to
contains / does_not_contain
Concretely, this means:
New filter key in lib/filters/filter_keys.yml - e.g. messages.email_to (or a conversation-level received_email_address), with attribute_type: standard and data_type: text_case_insensitive, exposing the four operators above.
Populate the value at ingestion - capture the To: (and, optionally, Cc:) header of the inbound email when the message/conversation is created, so the condition has a stable value to match against.
Expose it in the UI - surface the new field in the Automation Rules condition builder alongside the existing contact/message fields. The existing 'Email' field would need to be renamed to 'Email - From' the new field being something like 'Email - To'.
Example rule: When a message is created and email to contains billing@ → add label "Billing" and assign to Team "Finance".
Describe alternatives you've considered
Separate inbox per address — works, but forces one inbox per address, which defeats the purpose of consolidating into one inbox and complicates reporting.
External filtering (n8n / webhook) - receive all message.created webhooks and filter on the recipient server-side. Works at low volume, but wastes requests and pushes logic that belongs in Chatwoot out to glue code (same complaint raised in #15251).
Custom attribute workaround - no supported way to write the recipient address onto a contact/conversation attribute at ingest time, so this isn't viable today.
Additional context
Useful for anyone running multiple addresses into one inbox: routing, labeling, or team-assignment by intended destination rather than by sender.
It pairs naturally with the existing "email from" condition - one identifies the customer, the new one identifies the channel/service they addressed.
Is your feature or enhancement related to a problem? Please describe.
Automation Rules can currently match on the sender's email address via the contacts.email filter ("email from"), but there is no way to match on the recipient address ("email to") of an incoming email.
This matters for the common setup where multiple addresses are all forwarded into a single Chatwoot email inbox - e.g. support@, billing@, and sales@ all point at one inbox. Today, once the mail lands, Chatwoot treats it identically regardless of which address it was addressed to. The only email-based condition available is the sender's address, which tells you who wrote, not which service they intended to reach.
Related but distinct:
#3006 - Add support for email aliases of an email inbox (inbox-level alias matching / routing)
#15251 - Add "Is Template" / message-type condition (a different filter axis)
Neither covers a recipient-address condition.
Describe the solution you'd like
Add a new filter key for the incoming email's recipient address, mirroring the existing contacts.email filter so it supports the same operators:
equal_to / not_equal_to
contains / does_not_contain
Concretely, this means:
New filter key in lib/filters/filter_keys.yml - e.g. messages.email_to (or a conversation-level received_email_address), with attribute_type: standard and data_type: text_case_insensitive, exposing the four operators above.
Populate the value at ingestion - capture the To: (and, optionally, Cc:) header of the inbound email when the message/conversation is created, so the condition has a stable value to match against.
Expose it in the UI - surface the new field in the Automation Rules condition builder alongside the existing contact/message fields. The existing 'Email' field would need to be renamed to 'Email - From' the new field being something like 'Email - To'.
Example rule: When a message is created and email to contains billing@ → add label "Billing" and assign to Team "Finance".
Describe alternatives you've considered
Separate inbox per address — works, but forces one inbox per address, which defeats the purpose of consolidating into one inbox and complicates reporting.
External filtering (n8n / webhook) - receive all message.created webhooks and filter on the recipient server-side. Works at low volume, but wastes requests and pushes logic that belongs in Chatwoot out to glue code (same complaint raised in #15251).
Custom attribute workaround - no supported way to write the recipient address onto a contact/conversation attribute at ingest time, so this isn't viable today.
Additional context
Useful for anyone running multiple addresses into one inbox: routing, labeling, or team-assignment by intended destination rather than by sender.
It pairs naturally with the existing "email from" condition - one identifies the customer, the new one identifies the channel/service they addressed.