Find all your DIY electronics in the MakerShed. 3D Printing, Kits, Arduino, Raspberry Pi, Books & more!

Gmail added a filter import/export feature recently that allows you to save and load filter data from XML. The cool thing about this is that it allows you to create and manage a whole heap of filters in text format and then import them all at once. Matt Thommes explains the procedure:

Here is the XML structure for a new filter item:

<entry>
<title>Mail Filter</title>
<apps:property name=’from’ value=’[email protected]’/>
<apps:property name=’label’ value=’Web’/>
</entry>

Here we are setting up a filter to capture incoming email from [email protected], and applying a label of “Web.” Just like the Gmail process of setting up new filters, you can apply as many labels as you want, as well as other directives, such as sending directly to Trash:

<apps:property name=’shouldTrash’ value=’true’/>

Check Matt’s blog entry and the Gmail Labs discussion forum for more examples on how to use this.

Maintaining Gmail filters with XML
New in Labs: Filter import/export
Filter Import/Export Discussion Forum


Related
blog comments powered by Disqus

Featured Products from the MakerShed

Follow

Get every new post delivered to your Inbox.

Join 25,508 other followers