Is there any workaround or way to filter or search for messages that have no subject line?

I can see there is no way to filter messages when some field is "missing".

  • 1
    did you try "subject:(no subject)"
    – Umair Ashraf
    Commented Jun 27, 2011 at 12:00
  • 5
    yes, it doesn't give any results
    – eigenein
    Commented Jun 27, 2011 at 12:21
  • I have found this suggestion: google.com/support/forum/p/gmail/… but it did not work in my case. Give it a go Commented Jun 27, 2011 at 13:03
  • This suggestion doesn't work too. I've found that this subject with '' value is simply ignored/removed from filter.
    – eigenein
    Commented Jun 27, 2011 at 19:45
  • they might have patched up that hole then Commented Jun 28, 2011 at 0:21

5 Answers 5


Currently there is no way to filter by email that is missing x (subject,labels etc)

You could however suggest it via link

MY REF: link


You can consider writing a Google Script that will extract all emails with blank attachments. The script will be something like this:

 var thread = GmailApp.getInboxThreads(0,1)[0]; 
 var message = thread.getMessages()[0]; 
 if (message.getSubject() == "") {

I tried to do this through the Google Script, but it can only process letters from the Inbox folder. And most likely there is a limit of 500 letters.

function findNoSubject() {
  var labelName = "nosubject";
  var label = GmailApp.createLabel(labelName);
  var threads = GmailApp.getInboxThreads();
  for (var i = 0; i < threads.length; i++) {
    var message = threads[i].getMessages()[0];
    if (message.getSubject() == "") {

subject:(subject:"") does the trick for me

  • 1
    That simply returns all messages with the word "subject" in the title, including those that say "no subject", but also those with "test subjects needed".
    – gerrit
    Commented Feb 13, 2013 at 17:03

under Has Words Column write:


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