Wow. Just minutes after expressing my frustrations about being unable to control the order of Gmail filters, I figured out a simple workaround. As it turns out, Gmail Labs has a “Filter import/export” function that makes it all possible.
For context, e-mail filters can be a great tool for sorting incoming messages. The good news for Gmail users is that Google introduced filters (via Gmail Labs) awhile back, and last summer they took the filtering functionality out of beta.
Unfortunately, there’s no way to control the order in which your filters are applied. Rather, they appear in the list in the order in which they were created. If you’re an e-mail filtering ninja, however, you’re likely aware that the order in which filters are applied often matters.
Until now, the only solution I could come up with was to delete and re-create filters whenever I created a new filter that needed to be higher up in the list. But now there is a better way…
Changing the order of your Gmail filters
This isn’t a pretty solution, but it’s quite easy to implement. Start by going into Gmail Labs (Settings/Labs or click the little green beaker in the top right corner of the Gmail page) and enabling the “Filter import/export” functionality. Be sure to save your changes.
Now when you view your filters (Settings/Filters), there will be a checkbox off to the left of each filter. Simply do the following:
- Check the box for all of your filters (or click the “All” link at the bottom)
- Scroll down to the “Export” button (which is greyed out unless filter are selected)
- Click the button and you’ll be able to save a file called
Now simply open up that file in your favorite text or xml editor and modify it to your heart’s content. The filters themselves are wrapped in “entry” tags, like this:
blah blah blah (including category, title, id, updated, etc. fields)
Just move those blocks around to change the order of the filters.
The last step is to re-import your filters.
- Delete your old filters by checking the box next to each and clicking the “Delete” button (next to “Export“)
- Click the “Import filters” link at the very bottom of the filters page
- Click the “Choose File” button, and select your modified
- Click “Open file” and you’ll be presented with a list of filters to import
- Make sure all of the checkboxes are checked and then click “Create filters“
Note that this same procedure work for Google Apps.