Chris Hough
Chris Hough

Reputation: 3558

Gmail Filter Based on Contact Label

I have a bunch of contacts associated with a label in gmail. I would like to set up a filter to label or delete all messages not associated with those contacts in the label. Has anyone found a way to do this?

Example https://snipboard.io/wLvuZt.jpg

Upvotes: 11

Views: 3183

Answers (2)

FrancoisCam
FrancoisCam

Reputation: 1

My answer may be a little late but I just faced this problem. What I did is I created a folder labeled to automatically put every message that arrived from or sent to my contacts. For this, I need 2 filters for each contact. Then I create another filter to handle each post with the created label. If I have a new contact to add, I would simply redirect the message to this label.

Upvotes: 0

Robert Mikes
Robert Mikes

Reputation: 1431

First create an email to the group (no need to send it) as described here, under "Use groups in Gmail". Then copy-paste the list of emails to create a filter for multiple emails in the format from:{email1, email2, ...}, as described here.

Here's the step-by-step procedure:

  1. In gmail Compose a new message
  2. In the To: field type the name of the Group (aka the label)
  3. Press Tab - this will expand the list of recipients
  4. Press Ctrl-A to select all recipients (or click the first recipient to select it, then Shift-click the last recipient to select all recipients)
  5. Copy the recipients with Ctrl-C
  6. In the Search mail field enter -from:{LIST}, where LIST is the list of emails you copied (you can paste it with Ctrl-V)

The - is because you asked for "all messages not associated with those contacts in the label".

The {...} is an "OR" operator.

Upvotes: 4

Related Questions