This program, in the form of a configuration script and a main script, allows for complicated Gmail search queries to be used as filters. It also lets you do more advanced stuff you can't do with ordinary filters, like label based on whether an email contains a specific kind of attachment.
- Go to script.google.com.
- Go to File > New > Script File, and type
Main
as the title for the new script. This will be for the main script. - Delete any pre-filled text in the script file, and copy
main.gs
from this gist to that file. - Go to File > New > Script File again, and type
Config
as the title for the new script. This will be for configuration.