I need to implement a Gmail filter that automatically moves a mail to another folder (not the inbox) if the Priority Inbox decided that it's not important. I saw there is an API for developing gadgets (interface elements), and IMAP. Could IMAP be used for this? If not, is there a chance to implement this functionality?

Edit: Let me clarify a bit. The client has Priority Inbox enabled and when using the web interface there is no problem. But when he accesses the mail from his iPhone using the built-in app all messages are treated the same, as if there was no Priority Inbox. He wants something that automatically moves all mails that are not in the Priority Inbox to another folder, so that in the inbox remains only important mail (think of it as an emulation of PI for apps that don't support it).

  • @bw_üezi, 'important'/'not important' refers to a specific feature in gmail. It's perfectly clear if you've used gmail...
    – bdonlan
    Commented Feb 5, 2011 at 10:06
  • Regarding using IMAP, there are ways to update filter rules via IMAP, but they're very new extensions/protocols and I believe that GMail doesn't support them yet. So no dice on the IMAP side.
    – dkarp
    Commented Feb 5, 2011 at 12:14
  • For what it's worth, the Android Gmail app lets you view the Priority Inbox or the regular Inbox.
    – ale
    Commented Feb 5, 2011 at 18:34

3 Answers 3


There is a "not marked as important" condition: in:inbox -is:important

With minus you get the opposite results.
Create a custom filter with in:inbox -is:important in the filed Has the words and skip the inbox and create a new label "not important".

  • This filter won't work. According to Google: "Filter searches containing "label:", "in:", "is:", or stars criteria (i.e. "has:yellow-star") are not recommended as they will never match incoming mail." Commented Oct 3, 2013 at 23:03

whilst viewing a message click 'more action -> filter messages like these'

from this area you can create custom filters.


It can be done with a little trick - apply skip the inbox and also create a new label called Not important. This has the effect you described.

  • This doesn't work for what I want. I would need a field named "Not important", like "Has attachment" currently is.
    – lgratian
    Commented Feb 5, 2011 at 8:42
  • Gmail's filters do not have 'not marked as important' as a condition.
    – bdonlan
    Commented Feb 5, 2011 at 8:52
  • 2
    It can be done with a little trick - apply skip the inbox and also create a new label called Not important. This has the effect you described.
    – shane
    Commented Feb 5, 2011 at 9:01

The trick I use is to create a dummy filter (just use a random string in the "Does not contain" field of the filter) to move everything into the "Not important" label AND tick the "Override filters" option in the Inbox configuration which will force all important messages to appear in the default Inbox.

This seems to work fine via IMAP.

(Of course, "skip the inbox" needs to be enabled for this filter.)

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.