0

How can I search Gmail for all conversations that satisfy the following criteria:

  1. in the Inbox (e.g. not Archived)
  2. have a specific Label

For example, there's currently a total of 160 conversations in my inbox, and 60 of those are labelled "X" in the message list. I want to be able to search to view only those 60 "X" messages in the inbox.

fourpastmidnight
  • 4,032
  • 1
  • 35
  • 48
ProgrammerGirl
  • 3,157
  • 7
  • 45
  • 82
  • How about this query? ``in:inbox label:X`` This query searches the messages with the label ``X`` in the Inbox. When you want to use several queries as AND, please add them using a space as a delimiter. The document of query is https://support.google.com/mail/answer/7190?hl=en If this was not your solution, I'm sorry. – Tanaike May 17 '18 at 22:21
  • @Tanalke: That doesn't work as it shows less e-mail than are actually in the Inbox with label X. I think my Gmail and/or labels are corrupt. When I search just `in:inbox` I get thousands of messages instead of the 150 or so in my actual inbox. How can I fix this? – ProgrammerGirl May 17 '18 at 22:54
  • I'm sorry for the inconvenience. Can I confirm your situation? When you use ``label:X``, only messages with label ``X`` are displayed? And when you use ``in:inbox``, only messages in Inbox are displayed? – Tanaike May 17 '18 at 22:59
  • And can you try this query? ``label:inbox label:X in:inbox`` – Tanaike May 17 '18 at 23:02
  • Yes, `label:X` only shows conversations with label X. But `in:inbox` or `label:inbox` shows much more than the messages actually in the inbox. And `label:x in:inbox` or `label:x label:inbox` does not show all the label X messages currently in the inbox. Something is very corrupt. How can I get Google to fix this? – ProgrammerGirl May 17 '18 at 23:15
  • Thank you for reporting the results. From your question, I supposes that the messages you want have the labels of both ``inbox`` and ``X``, and also the conversation view of your gmail condition is off. If my understanding is not correct, please tell me. If you want to confirm the labels for a message, you can retrieve it at https://developers.google.com/gmail/api/v1/reference/users/messages/get I'm really sorry for the inconvenience. – Tanaike May 17 '18 at 23:42
  • @Tanaike: That is not correct, conversation view is `on`. Any other ideas? – ProgrammerGirl May 19 '18 at 00:33
  • I'm really sorry for my poor skills. If the conversation view is on, all messages in a thread are the same labels. In your situation, can I think that 60 threads in the 160 threads have the labels of both ``inbox`` and ``X``. But from ``I think my Gmail and/or labels are corrupt.``, I'm not sure whether the contidion of your gmail is the same to normal one. – Tanaike May 19 '18 at 00:43

1 Answers1

0

Unfortunately this isn't possible.

Gmail doesn't automatically add labels to conversations, only to particular messages within a conversation. (A message is a single email and a conversation is a group of emails with the same subject.) Source: "Labels are only added to a message".

The reason Tanaike's suggestion of in:inbox label:X doesn't show all 160 conversations with the label is because the latest message in your conversation doesn't have the label. The reason for this is most likely, you've archived the conversation at one point and the latest messages in the conversation don't have the label (either because the label wasn't automatically applied based off filter criteria or you haven't manually added the label).

Said another way, even if there are one or more messages in the conversation that contain the label, but those messages are not in your inbox anymore, the conversation won't show up with the search in:inbox label:X. This usually happens when someone responds to your archived conversation and that latest message doesn't contain the criteria necessary for your label to be added automatically.

Unfortunately, Gmail's UI shows a label at the top of a conversation (in conversation view) and not per each message so you have to guess which messages have the particular label(s) shown above the conversation.

Patrick
  • 11,552
  • 7
  • 29
  • 41