I have more than 20 filters, how can I easily reorder them?
Go to Settings > Filters.
This will result in an xml file. You could edit the xml file to move the order of the filters, and then reverse the process and import them.
Any time you save a filter, it goes to the bottom of the list. Once you know what order you want your filters in, open each one in order, and just click Save without changing anything. When you get to the last one, the filters are all in order.
Of course, you would have to repeat this if you ever really did have to change a filter.
- Export all filters
- Delete all filters
- Edit XML in text editor to reorder filters
- Import XML
Editing the XML sounds like it is more complicated than it is in reality.
As of this writing, if you are using the new GMail UI then the export/import approach to re-ordering rules no longer seems to work. I tried all of the options listed in all of the comments on this thread and my rules appear in random order.
I also tried every trick I could think of in the XML file and could not seem to enforce any order. The top line
<id> tag seems to imply an order but also only seems to apply the order downloaded.
For anyone needing ordering of rules processing in your gmail box, please use the GMail feedback feature and copy a link to this Stack Exchange conversation into your feeback response. It might be slightly abusing SO but if you also upvote this answer it might indicate to the GMail team how much interest there is in ordering rules.
In my case I include a
+whatever suffix on any person or entity that I give my email address to and a corresponding rule to apply the
whatever label. At the end I have a rule that says
archive this message if it has no labels. Until today when I export/imported rules to add a new label, this has performed swimmingly to keep known, valuable email in my inbox and everything else relegated to the
whenever I care to review it archived folder.
Gmail folks, I think this is a swing and a miss on rules processing. Please restore control to me and predictability to how I sort my mail. I understand Gmail is free. I hope you understand how valuable this feature is. I believe this is a case where real intelligence is still more accurate than the artificial kind.
April of 2019 I found a fix. Make a "new" filter exactly as it was before, with one exception. In the "To:" field put an address that is different from before. Doesn't matter what it is, just has to be different, everything else has to be the same as the "old" filter.
The filter should save at the bottom of the list as it is a "new" unique filter with the same specifications as the "old" filter. Once the "new" filter is saved, go back and edit the filter with the proper address and save it. It should stay at the bottom of the list, at least it did for me.
Hope this helps others as I was having issues sorting all the marketing stuff from my wanted email. This should work for other filters as well, although it is much more labor intensive.
I just put a number as prefix & then it sorts automatically:
01_MyTopIssues 02_MyOtherIssues 03_Anything else 04_...
Both the answers from Pål Børsting and from AndyDan did worked for me. But the original question was for those who have more than 20 filters, and i have 98. Obsviously, i prefer the solution to edit a XML file, as it is much more simple and scalable once we are familiar with this. Sorry, i can not vote neither comment your answers without the necessary points.
But the answer from Rebecca Chernoff did not worked for me. I think it should not be accepted as an answer to the question how can I easily reorder them, or it should be completed to work correctly. To reorder the filter rules, it was necessary to 'delete all filters' before to 'import XML', as it was correctly answered by Pål Børsting.
If a XML filter file is imported without previously deleting the rules, a changed rule filter will be at the end, as noted AndyDan. Although this behavior could be confortably acceptable by most users, the rules order DO modify the semantic effect of the filters (like mine) that have an equivalent of a stop matching next rules like in this example:
RULE 1: Matches: (-label:zLabelToStopActions subject:EMERGENCY -subject:DGV) Do this: Skip Inbox, Apply label "noc" RULE 2: Matches: (-label:zLabelToStopActions subject:EMERGENCY -subject:DGV) Do this: Apply label "zLabelToStopActions" RULE 3: Matches: -label:zLabelToStopActions subject:EMERGENCY Do this: Skip Inbox, Apply label "dgv", Mark it as important
This auxiliary label zLabelToStopActions was used just to give me the effect of a stop matching next rules. Without it, and if the ORDER is not exactly as shown above, the resulting logic for this filter can easily become unpredictable. For example, all messages with subject:EMERGENCY could match all 3 rules above, and do all these correspoding actions:
rule 1: Skip Inbox, Apply label "noc"
rule 2: Apply label "zLabelToStopActions"
rule 3: Skip Inbox, Apply label "dgv", Mark it as important
But the latest actions was expected to be done only for the messages that have not the word DGV in their subject.
As a final remark, if Pål Børsting agree, i suggest to invert the order 2 and 3 of his answer and, this way, to delete all filters only we are really ready to import them.