Import of Gmail filters started to silently fail and I am looking for way to fix that. I am using an option on https://mail.google.com/mail/u/0/?hl=pl&shva=1#settings/filters („Import filters”, „Browse” button to select file „Open file” to open the file, „Create filters” to create filters.

enter image description here

In the past it caused all my filters to appear in order in Gmail filters. Nowadays only random subset of my filters appears in random order is imported. In addition Gmail is not reporting problems during upload process.

Hopefully it is not caused by problem with my setup, I tried on a completely different laptop and still 62 filters from 779 silently failed. What worse, some my filter rely on a specifi processing order, and after import order is no longer kept.

In the past it worked correctly. I thought that the problem was caused by ever-increasing number of filters. But I tried importing smaller group of them – that some time ago worked perfectly – and some filters still failed to appear.

Is there a way to upload large number of gmail filters (for example 1000) with all of them appearing in the same order as specified in the xml file? Or at least get an error message once something goes wrong?

enter image description here

After import I sometimes get yellow box with error #102 leading to https://support.google.com/mail/answer/7036382 that recommends to check

So what I can do to at least get an useful error?

  • I started testing Gmail API and order is also not kept there, even for a sequential filter generation. I am unsure whatever API suffers also from silent failure on filter creation. Commented Oct 18, 2018 at 20:21
  • According to github.com/antifuchs/gmail-britta/issues/… reordering of mail filters happens with smaller sets, in this case for 28 filters. Commented Oct 23, 2018 at 8:57

1 Answer 1


For reordering filters part - according to my research there is no viable way to avoid that. Gmail filters must be designed to allow any order of execution, and in many cases it is achievable.

For the silent failure part - currently as a workaround I have test.xml file with desirable filters. I import this filters to Gmail, export created filter to a file that I save as gmail.xml.

After that I run a script that detects filterers present in Gmail, not present in test.xml. Filters not present in Gmail are saved to a file that I import into Gmail again.

If someone would consider such script as useful - let me know in comments and I will publish it on a Github.

  • I have multiple filters that tag my email based on the +whatever string I use on my gmail account. ex. [email protected]. I have a final rule that effectively says 'If there is no tag archive this message'. This ordering means rules appear in my iPhone mail app if sent to the correct email account and spammy-ish email settles into the base gmail account that I occasionally look at. This ordering has kept my gmail account usable on my iPhone until now. Based on the random order, messages may or may not make it to me, making gmail suddenly far less useful to me. Commented Jan 23, 2019 at 17:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.