Skip to content

Creating Filters

What are filters?

Filters provide a way to, as the name implies, filter what messages are eligible to be starred.

Filter types

There are 4 types of filters, each with their respective purpose:

  1. Age. These are relative to how old the message was when it was starred.

  2. Attachments. Attachment filters dictate whether attachments are required, how many are required, etc.

  3. Content. Content filters control the content of the message, such as the length, or requiring certain text/patterns to be matched.

  4. Date. Date filters require messages to be starred before/after certain dates.

Creating filters

  1. The first thing you need to do is to create a filter.

    Let’s create an attachments filter, that requires messages to have at least 2 attachments:

    /filters create attachments name my first attachment filter min-attachments 2
  2. So far, this filter exists but doesn’t do anything since it hasn’t been added to your server’s settings.

    Let’s change that, by adding it to your settings:

    /filter add filter my first attachment filter settings Server Settings

That’s it! Messages will now have to have at least 2 attachments in order to be starred.