> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Email filter

> CRMScript event model - Email filter

When you create an email filter you can add a script that should be executed.

The script will be executed with the following variables set (accessible with `getVariable`):

* messageId
* ticketId
* customerId
* customerEmail
* mailBackup
* isNewCustomer (from version 8.1 - R13)

You can also add your own variables using the **Find Regular Expressions** tab in the filter.


## Related topics

- [Email filters](/en/email/admin/mailbox/create-email-filter.md)
- [Service emails](/en/email/admin/mailbox/index.md)
- [ms_filter table](/en/database/tables/ms-filter.md)
- [ms_filter_mail table](/en/database/tables/ms-filter-mail.md)
- [Trigger](/en/automation/trigger/reference/CRMScript.Event.Trigger.md)
- [ms_trashbin table](/en/database/tables/ms-trashbin.md)
