Re: Filter action: remove label

3,523 views
Skip to first unread message

MarkB.

unread,
Feb 28, 2009, 10:20:10 AM2/28/09
to Suggest a Labs feature
Why not just use a filter to apply a label forwarded messages EXCEPT
when it matches certain criteria? That does exactly what you all want,
but simpler.

On Feb 27, 6:42 pm, asbjornu wrote:
> +1 from me as well! I use POP3 to retrieve external e-mail and being
> able to remove the account-applied label when filtering messages
> downloaded from a given account would be awesome.

Unrealshade

unread,
Mar 24, 2009, 2:29:13 PM3/24/09
to Suggest a Labs feature
+1 to the remove-label-filter-feature, i would like to have this to
remove my label "need to answer".

to MarkB.:
i don't understand how that would help me with my case. it would be
cool if you answered! :)

Prohorov Victor

unread,
Apr 1, 2009, 2:18:51 PM4/1/09
to Suggest a Labs feature
On 28 фев, 18:20, MarkB. wrote:
> Why not just use a filter to apply alabelforwarded messages EXCEPT
> when it matches certain criteria? That does exactly what you all want,
> but simpler.
No it isn't simpler because when the gmail mail downloder checks for
new email it may add labels - it isn't a filter. But ok, lets consider
that we'll leave that function turned off, but now how can I filter
out what mail came from which account? My address might even not be in
the mail's headder, I could be cc'd etc. There are always cases that
make those filters ineficient at looking what mail came from which
account. More over. I'll get subscribed to a new mailng-list. What I
want is to add a new rule saying that messages from that mail-list
shouldn't go where all the messages go but rather send'em in that
directory (mail clients treat labels as directories, and I use a mail
client usually). And what you're sugesting is that you add a new rule
(the same as before) and also must remember to edit the old rule
saying about all the messages from an account, and add that mailing-
list to it as an exeption (btw how do you specify an OR condition?).
So whose way would be simpler? Your way where you have to create 2
rules whenever I subscribe to a new mailing-list, and my way where you
need to create a single rule for a mailing-list.
So I require a way of removing labels by filtering means. (It won't
hurt for the filters to be more flexible, to have more actions and
filtering conditions)

idesune

unread,
Apr 5, 2009, 11:18:56 AM4/5/09
to Suggest a Labs feature
Is anyone alive here, cause the topic seams really dead, it also
doesn't look that the devs are doing anything on this matter and there
is no way for me to write it on my own (that is a shame) but just of
wouldn't it be nice to be able to script out our boxes. Well something
like a simple scripting language so that the users might add features
to their boxes without touching the whole system. I mean like adding
some event handlers to different inbox events and some hard to gui
filter on that event or even well don't even know what might do with
that (maybe adding an another game to the mailbox i.e. tetris). The
only why you'd like not to implement anything like that is that it
might later give a great impact on your servers (imagine processing
all that) allthough V9 might help with that and make it rather
effective and flexible feature. It might also solve a lot of feature
problems and the current regarding the removal of labels from filters.

Unrealshade

unread,
Apr 5, 2009, 12:12:28 PM4/5/09
to Suggest a Labs feature
what do you mean by alive? there are thousands of topics that have not
been active for some months, but that does not mean there are no
people interested in that topic. that just means that there are no
news. i am definitely interested in this topic and probably the other
users as well who have written here. otherwise they might just have
answered here how they solved their "problem(s)" or issue(s).
however, there is a way to develop scripts. i don't know if you could
make it any simpler than that and i don't even know if it is already
simple. you could suggest this as a feature in a different topic, so
people can comment on your idea.
regards! :)

idesune

unread,
Apr 5, 2009, 6:29:44 PM4/5/09
to Suggest a Labs feature
Well ok, for now all I've found about scripting is the support to add
your own controls to the page just by URL (in the settings tab of your
mailbox) but what I was speaking about was scripting that would run
server side, and I think it should belong to this topic as its main
purpose would be as a very flexible filtering tool for email and other
things (for example a smart answering machine that would answer
differntially depending on whos writing, what is writting, etc.) well
anyway, just glad that there are persons that still follow this topic,
though would prefer that gdevs would write here something too, or have
they allready?

Robin Mitra

unread,
May 3, 2009, 11:28:56 AM5/3/09
to Suggest a Labs feature
Yes please add this feature! its so easy to create a filter and label
thousands of emails..but theres no way to undo this effect if someone
needs to like in my case.

THD

unread,
May 6, 2009, 4:54:18 AM5/6/09
to Suggest a Labs feature
+1 vote (24 vote total)

This is essential for structuring e-mail from different POP
accounts...
Only once this feature is added I will migrate all my e-mail to GMail.

MplsTechie

unread,
May 11, 2009, 11:53:46 PM5/11/09
to Suggest a Labs feature
+1 as well! What if I mark a thread as completed. And then some
replies back? Then the label is no longer valid, so I would like it
removed.

Thanks

Unrealshade

unread,
May 12, 2009, 6:08:19 AM5/12/09
to Suggest a Labs feature
hi again idesune =)

i don't know anything about the possibility of serverside scripting...
but surely you can do what suggested here if you sign up for the
"gmail labs" so you can create scripts on your own...?

hm, i still think you better open a new thread, because the name of
this thread here is "filter action: remove label" and that's what
people here are responding to, most of them don't read what users type
here, so to get any attention you better create a new thread! ;) this
thread is mostly about joining in to the request of adding this
feature and listing problems or examples where you need it... so the
problem is there is no discussion about your feature/ request/ idea.
however maybe you don't need to create this thread since you can join
the "gmail labs".

i don't know who is a gmail dev or how you recognize them here, but i
can't remember reading something from them in this thread. as probably
everyone here, i am waiting for a response or reaction from the gmail
dev team.

MarkusLechner

unread,
May 12, 2009, 3:21:15 PM5/12/09
to Suggest a Labs feature
i agree also with this!
and i think its easy to make?

Korkoro

unread,
May 13, 2009, 8:56:00 PM5/13/09
to Suggest a Labs feature
That is such a good idea! Man, I wish I had thought of that! LOL^_^

krugster

unread,
May 19, 2009, 7:18:08 PM5/19/09
to Suggest a Labs feature
+1

What they said...

Matthew Sigal

unread,
Jun 13, 2009, 6:37:50 PM6/13/09
to Suggest a Labs feature
yeah, keeping the pressure on for this one. this would make my life
MUCH easier.

hopefully we'll get this added soon?!

Unrealshade

unread,
Jun 13, 2009, 7:56:00 PM6/13/09
to Suggest a Labs feature
i have a feeling that we won't get this added soon. they are probably
wating for some person to write that script for them, it can't even be
so difficult... so someone join the labs team!!! ;)

antechno777

unread,
Jun 17, 2009, 1:30:56 AM6/17/09
to Suggest a Labs feature
+1... that's 27

teamofemus

unread,
Jun 25, 2009, 11:50:07 AM6/25/09
to Suggest a Labs feature
+1, but i guess this is dead anyway...

Unrealshade

unread,
Jun 25, 2009, 11:57:17 AM6/25/09
to Suggest a Labs feature
what do you mean "this is dead"? people are still writing that they
want this feature. dunno if google devs do anything about but if
people continue requesting this feature maybe they (or someone else)
will. i heard it helps if you star this topic so google devs can see
what topic is most starred maybe...
don't give up! =)

orisweb

unread,
Jul 7, 2009, 1:30:15 PM7/7/09
to Suggest a Labs feature
+1000 ... I'm surprised this wasn't a part of the original spec for
filtering.
Message has been deleted

orisweb

unread,
Jul 7, 2009, 1:45:35 PM7/7/09
to Suggest a Labs feature
Use case: I'm looking to use gmail as an issue tracking system.
Requests come into a central gmail account (e.g. centralAccount@) and
get rerouted to team members' individual gmail accounts via filters.
When individual team members reply-all, the central account gets cc'ed
(thanks to the forward). They can then edit that cc'ed address, adding
labels via the +label method (e.g. centralAccount+fixThisBug@). The
central account adds the 'fixThisBug' label to the thread.

But what happens when it's time to close the ticket? We can add a new
label - centralAccount+completed@ - but fixThisBug remains as a label.
I'd like to set up a filter such that messages labeled as 'completed'
get all other status labels removed.

You might say it's not necessary to remove the old status labels,
since you can always find all messages with or without a 'completed'
label. However, in another example, this wouldn't work - setting
priority. Suppose my initial reaction is to set priority on a message
to 3 - centralAccount+p/3@. Later on, I reevaluate and decide it
should be moved up to a priority 1 - centralAccount+p/1@. Now when I
do a search, it's going to show up as both priorities. I should have
been able to filter the message to remove the p/3 label when I added
the p/1 label.

Hope that all makes sense.

Jim Taylor

unread,
Aug 11, 2009, 1:40:39 PM8/11/09
to Suggest a Labs feature
Another vote for this feature. Like others I use gMail to aggregate
mail from 4 other POP accounts. When I filter certain messages I want
them to have only the new label, not also show up under the POP
account label. This is especially important since I use Outlook 2007
(w/IMAP) as my primary mail reader and I don't want the message
duplicated in multiple folders in Outlook. Just a simple "Remove all
other labels" option would do it.

copycentre

unread,
Aug 14, 2009, 8:38:22 AM8/14/09
to Suggest a Labs feature
I agree too. Sometimes we miss new emails when they arrive, because
they arrive in the inbox already 'decorated' with labels from previous
conversations.
If we could create a filter to remove all labels from incoming mails,
it would be great.

Thanks,
Michael



On Aug 11, 6:40 pm, Jim Taylor wrote:
> Another vote for this feature. Like others I use gMail to aggregate
> mail from 4 other POP accounts. When Ifiltercertain messages I want
> them to have only the newlabel, not also show up under the POP
> accountlabel. This is especially important since I use Outlook 2007

copycentre

unread,
Aug 17, 2009, 11:17:05 AM8/17/09
to Suggest a Labs feature
Just as an extra note, this is becoming more of an issue for us.
As a business with a lot of repeat customers, people do often reply to
old emails from us rather than send us a new one. Therefore a new
order arrives in our inbox already labelled and categorised (eg
'Done') as it was on the old order.

It makes new orders very hard to discern from old ones, and we'd
prefer all incoming messages to not automatically be labelled.



On Aug 14, 1:38 pm, copycentre wrote:
> I agree too. Sometimes we miss new emails when they arrive, because
> they arrive in the inbox already 'decorated' withlabelsfrom previous
> conversations.
> If we could create a filter toremovealllabelsfrom incoming mails,

DrScheme

unread,
May 10, 2011, 2:50:46 PM5/10/11
to gmail-labs-sugge...@googlegroups.com
+1 from me as well

HNKelley

unread,
May 13, 2011, 11:52:31 AM5/13/11
to Suggest a Labs feature
I definitely second this! I'm really surprised it isn't there by
default since it should have been (in my non-programmer opinion) easy
to include. In building a filter, there is a part where we add
labels. Perhaps it should be a list with check-boxes where any item
not checked is not applied and, if that label was already in use for
that message, then it is removed. If the label IS checked, then it is
kept or applied. Simple?

You devs at Google come up with some great stuff - a lot of which I
use daily. And I know you're all kept busy. But we really do need
this. Including it should have been automatic. PLEASE PLEASE PLEASE
give us this simple request! We've been asking since Oct 2008, over
2.5 years.

As I began planning my email re-org, I found this remove-label feature
missing and now I cannot continue! :P~ The business case has been
made over and over again before my addition to this request. How long
before we get this?

catatonia.today

unread,
Jun 16, 2011, 8:31:23 AM6/16/11
to Suggest a Labs feature
I very much want this too. I've been searching all through gmail and
on the web for how to do it--I assumed I was just missing it. I've
changed how I want to organize my labels, and now I have several email
addresses I would like to bulk remove the old label from. Although...
it just occurred to me that perhaps I could try refiltering the email
addresses individually to make them naked, labelless emails again and
then relabel? Well, it would still be much better to have a remove
label option right under add label.

AstraVera IT Solutions

unread,
Jul 15, 2011, 2:27:01 AM7/15/11
to gmail-labs-sugge...@googlegroups.com
I also want this feature for managing POP3 e-mail accounts, which have their own Label applied.

I find it sad that Google can't add such a simple feature, even after years of people asking for it.  Sigh.

Anec

unread,
Jul 15, 2011, 12:23:39 PM7/15/11
to Suggest a Labs feature
For the Love of God will you please add this feature!

Right now I'm needing Outlook to do all that work for me. We dont want
that now do we?

Remove "all labels except ...." feature with the Filters PLEASE!

Christian Walter

unread,
Aug 28, 2011, 8:00:00 AM8/28/11
to Suggest a Labs feature
I am also quite surprised that there is no way to delete a label
automatically. This makes it impossible to organize multiple email
adresses within gmail. I actually wanted to move my whole
communication to gmail but since there is no way to organise my pop3
accounts, I will go back to gmx until I there is an option to delete
labels by using filters....

thomes1nan

unread,
Aug 28, 2011, 8:22:34 AM8/28/11
to gmail-labs-sugge...@googlegroups.com
I agree with the feature request. More generally I wish apps scripts had a NewMessage event trigger.


Christian Walter, this might be of interest to you.....

N. Will dot-blindness and plus-addressing cure my woes?
A fact: when the gmail server receives an email for one of its users, it looks at the "to" email address to find out which user is the intended recipient.  The interesting thing is that when it reads the email address it completely ignores the dots.  In other words, emails addressed to "silly...@gmail.com" and "sill.y...@gmail.com" will both be delivered to user sillybilly.
To distinguish between the different combinations of dots you can create a special filter to label incoming emails according to their exact dot pattern.  Do this by writing "deliveredto:sill.y...@gmail.com" in the "has the words" field of your filter (you need a separate filter for each pattern of dots you want to identify).
Another fact: when reading the email address of the intended recipient, the gmail server stops reading if it comes to a '+'.  In other words, emails addressed to "sillybil...@gmail.com" and "sillybilly...@gmail.com" will both be delivered to user sillybilly.  Unlike with the dot-blindness, you don't need to make a filter to distinguish between these kinds of emails; the word after the '+' is automatically turned into a label and applied to the email on arrival.  One problem with this is that some email systems can't handle email addresses  that have a '+' in them.
So in answer to the question....if you are looking for a way to create multiple email addresses this might be what you need.  The dot-blindness will also help you if you need to distinguish between emails automatically forwarded from other accounts you own (e.g. yahoo, aol, etc.).  However neither of these options helps when giving away your address to potential spammers.  If your woes lie along these lines then why not set up a completely new gmail account - it's free remember.  You can link your accounts together, or set the new account to forward emails to your main account (perhaps taking advantage of one of the above two tricks).
If you attempt any of these things, I highly recommend running a few tests to make sure your setup behaves as you expect.  Note that the dot-blindess does not work for Google Apps users, it's only for people with simple gmail.
If I could remember where I read about these two tricks I would acknowledge the source here.

--- see my gmail wish list | my gmail tips and tricks

Ruud V

unread,
Sep 11, 2011, 2:43:21 PM9/11/11
to Suggest a Labs feature
+1000

i'd love to have this option!!!

Tommy86

unread,
Oct 25, 2011, 2:57:19 PM10/25/11
to Suggest a Labs feature
Just adding a voice that removing labels by filter would keep my email
much better organized with minimal effort. It would be a great
addition to see.

Thanks!

Marco Scataglini

unread,
Oct 28, 2011, 5:23:28 PM10/28/11
to gmail-labs-sugge...@googlegroups.com
+1000 I would LLLLOOOOOVE this one.
Yes very needed feature from all the people I know; Even the ones that don't use Gmail would switch to it for this.
... and if you cannot have emails with no label at all, just put a check for it in place for it, so that if label is null have to add or create one for it.
Thanks

Dennis P

unread,
Oct 29, 2011, 5:55:50 AM10/29/11
to gmail-labs-sugge...@googlegroups.com
You can write a script to do the trick.
I'm can write it if you give me the search quote/ filter. for the all incoming email.
You can the script run every 30 min.

You just need to have google spreadsheet to do the trick.


Davidvh

unread,
Nov 29, 2011, 3:42:36 AM11/29/11
to Suggest a Labs feature
hey,
I'm looking for a way to remove my inbox label by way of a filter(if
there is a label it doesn't come in my inbox)
apairently evryone is looking for this .
i love google
greats davidvh
Message has been deleted

Albert Eardley

unread,
May 15, 2012, 2:04:36 PM5/15/12
to gmail-labs-sugge...@googlegroups.com
I may have found a temporary solution. I learned of Google's AppScript. I wrote a simple little script that works for my setup. I am posting this as it may help someone.

I am not liable for any damage this may cause. Use this at your own risk.
That said, it works for me.

My email works this way, two pop accounts come in and go to either SBC or Neo. Then Messages based on a filter go to sub labels.

  • SBC
    • Spambayes
  • Neo
    • IEEE
What this script does is removes the SBC label from the messages with the label Spambayes (SBC/Spambayes) and does the same for Neo. The following link will show you how to enter code and setup triggers.

https://developers.google.com/apps-script/articles/yourfirstscript

I have triggers setup on each function for every ten minutes.

All that you need to do is to edit the strings in the single quotes (highlighted below) to be the names of your labels. Of course you can have more or less than two functions. You can even put it all in one function if you want.

::Code Start::
function removeSBC() {
  var findLabel = GmailApp.getUserLabelByName('SBC/Spambayes');
  var removeLabel = GmailApp.getUserLabelByName('SBC');
  var threads = findLabel.getThreads(0,30);
  removeLabel.removeFromThreads(
threads);
}

function removeNeo() {
  var findLabel = GmailApp.getUserLabelByName('Neo/IEEE');
  var removeLabel = GmailApp.getUserLabelByName('Neo');
  var threads = findLabel.getThreads(0,30);
  removeLabel.removeFromThreads(threads);
}
::Code End::

I will be watching this thread on and off so if there are any questions I will try to answer them.

Gangees

unread,
May 20, 2012, 5:42:12 AM5/20/12
to gmail-labs-sugge...@googlegroups.com
I really need to be able to remove labels when filtering, as without this option my labelling is a mess. For me this is the number one worst thing about gmail, and I'm wondering why google seem to be ignoring this simple issue. Not enough demand maybe so I'd to add my support for this needed feature.

Matt Kendon

unread,
Jun 23, 2012, 7:41:43 AM6/23/12
to gmail-labs-sugge...@googlegroups.com
Google, Google, Google. We're hurting here. I love all the things you do, like Google+, GoogleGoggles and GoogleGoogle (new term for their search engine), but this is really really something that needs to be sorted. Labels is such a brilliant and fantastic thing, but without the ability to remove labels there is just a huge hole in it's potential. Fill that hole, Google, please do.

Thomas Walder

unread,
Jul 12, 2012, 8:44:44 AM7/12/12
to gmail-labs-sugge...@googlegroups.com
+1!

Francisco Maia

unread,
Jul 12, 2012, 9:10:12 AM7/12/12
to gmail-labs-sugge...@googlegroups.com
+ 1 here.
I have exactly the same problem stated, and others, needing the feature.

Adi.G

unread,
Jul 16, 2012, 10:00:39 AM7/16/12
to gmail-labs-sugge...@googlegroups.com
Is there an update?  It is a basic requirement. 

Miguel Rasquinho

unread,
Jul 20, 2012, 6:09:39 AM7/20/12
to gmail-labs-sugge...@googlegroups.com
+1

Quarta-feira, 22 de Outubro de 2008 9:12:31 UTC+1, Avner Kashtan escreveu:
(First, an apology if this has been discussed before. I couldn't find
anything related when searching the group)

A feature that I feel is missing when using filters is the ability to
remove a label for a message when it matches a filter. I have several
POP accounts imported into Gmail that are marked with a label, but I
have a mailing-list that I receive through one of those accounts that
I want to label specifically. In that case, I want the POP label
removed as well as the mailing-list label assigned, since I don't want
to see the message twice. I couldn't find any way to do it
automatically right now.

A simple enough feature to add, I hope. Hope it gets in there.

Dries Feys

unread,
Aug 20, 2012, 10:28:54 AM8/20/12
to gmail-labs-sugge...@googlegroups.com
+1

Op woensdag 22 oktober 2008 10:12:31 UTC+2 schreef Avner Kashtan het volgende:
DISCLAIMER ****

http://www.tvh.com/newen2/emaildisclaimer/default.html 

"This message is delivered to all addressees subject to the conditions
set forth in the attached disclaimer, which is an integral part of this
message."

xelzrum

unread,
Aug 31, 2012, 8:47:22 AM8/31/12
to gmail-labs-sugge...@googlegroups.com
+1

Eduardo Hernandez

unread,
Oct 10, 2012, 12:12:06 PM10/10/12
to gmail-labs-sugge...@googlegroups.com
I would like this feature too

Saraheeee

unread,
Oct 10, 2012, 12:20:52 PM10/10/12
to gmail-labs-sugge...@googlegroups.com
agree!

Konrad Jaschke

unread,
Nov 4, 2012, 2:49:59 PM11/4/12
to gmail-labs-sugge...@googlegroups.com
Jeez, we have been asking for this since 2009!

I really would love to delete labels as well!!!

Mariano Crivello

unread,
Nov 9, 2012, 5:02:47 PM11/9/12
to gmail-labs-sugge...@googlegroups.com

+10

Wtf google.. we pay good money for these apps account and you cant even mimic a simple feature that has been asked for nearly 3 years that any other mail provider has allowed since the dawn of IMAP.

Get you head out of the cloud for minute and help us get what we need.  you have my money already.

Toby Bisco

unread,
Nov 22, 2012, 10:44:58 AM11/22/12
to gmail-labs-sugge...@googlegroups.com
Another +1

Such a basic filter that I cannot believe it doesn't exist. Same as I cannot believe there is no way to order the filters or an option to 'Do not process any more filters for this message'.

reed

unread,
Nov 26, 2012, 3:24:50 PM11/26/12
to gmail-labs-sugge...@googlegroups.com
me too!

+1

Andrea

unread,
Dec 12, 2012, 6:17:15 AM12/12/12
to gmail-labs-sugge...@googlegroups.com
+1

BobC

unread,
Dec 14, 2012, 2:48:42 PM12/14/12
to gmail-labs-sugge...@googlegroups.com
+1 as well.

But seeing this request was made over 4 years ago I think there are two chances that Google are going to do something about it:-
1 x Fat
1 x Slim.



On Friday, December 14, 2012 3:19:27 AM UTC, Jonathan Winger-Lang wrote:
I would also love this feature.

Laurens Rietveld

unread,
Jan 4, 2013, 8:22:54 AM1/4/13
to gmail-labs-sugge...@googlegroups.com
Thanks, didn't know about googles appscript as well. Very neat!

Graham Wideman

unread,
Apr 12, 2013, 2:49:39 PM4/12/13
to gmail-labs-sugge...@googlegroups.com
@Albert Eardley
Thanks for posting the workaround using the App Script feature. To bolster the confidence of other readers of this thread:
1. The scripts feature is available even if you have just a plain old free gmail account.
2. I was able to go from no previous use of App Script to solution implemented it in about 15 minutes.
(I do have some background in JavaScript, which allowed me to refine Albert's script somewhat.)
3. Albert mentions setting a trigger for the script (or specific function): That's a step available from the code editor (clock icon).

My version (by way of an additional example):
// Functions to remove parent label from child-labeled messages
// 2013-04-11  GW

function removeParentLabelsFromChildren() {
  prnt = 'gwa/initcontact';
  removeParentLabelFromChild(prnt, 'BooksTech');
  removeParentLabelFromChild(prnt, 'Facebook');
  removeParentLabelFromChild(prnt, 'offers');
  removeParentLabelFromChild(prnt, 'Twitter');
  removeParentLabelFromChild(prnt, 'Zillow');
}

function removeParentLabelFromChild(parentLabel, childAdd) {
  var maxThreads = 100;
  var childLabel = parentLabel + '/' + childAdd;
  var findLabel = GmailApp.getUserLabelByName(childLabel);
  var removeLabel = GmailApp.getUserLabelByName(parentLabel);
  var threads = findLabel.getThreads(0,100);
  removeLabel.removeFromThreads(threads);
}


Mustafa Can Yücel

unread,
Sep 17, 2013, 4:17:49 AM9/17/13
to gmail-labs-sugge...@googlegroups.com
Good one. Yet I have encountered some errors as the functions are not defined in JS way before they are used. So I post 'my version' as well for convenience:

function RemoveParentLabelFromAllChildren()
{
  parentLabel = 'may parent label';
  
  var func = 'RemoveParentLabelFromChild';
  
  this[func](parentLabel,'child one');
  this[func](parentLabel,'child two');
  // if you have too many childs, just define an array with child node names and loop with a for

  
}

function RemoveParentLabelFromChild(parentLabel, childName)
{
  var maxThreads = 100;
  var childLabel = parentLabel + '/' + childName;
  var findLabel = GmailApp.getUserLabelByName(childLabel);
  var removeLabel = GmailApp.getUserLabelByName(parentLabel);
  var threads = findLabel.getThreads(0,100);
  removeLabel.removeFromThreads(threads);
}

daren....@cbsinteractive.com

unread,
Oct 16, 2013, 11:26:51 AM10/16/13
to gmail-labs-sugge...@googlegroups.com
+1

The lack of filter priority / subfilter rules is my biggest issue with Gmail and why I still use an IMAP client since I'm able to do more advanced rules there. 


On Wednesday, October 22, 2008 1:12:31 AM UTC-7, Avner Kashtan wrote:

Roscoe Casita

unread,
Nov 14, 2013, 4:39:47 AM11/14/13
to gmail-labs-sugge...@googlegroups.com
I would like this feature as there are many emails that I do not want classified in the categories in the new 'mandatory' labels/tabs.

I can't remove the labels -> place a new label on them and place them in their own tab... its beyond frustrating to have to go though emails trying to find the ones I want again, 

Hook

unread,
Dec 2, 2013, 6:13:40 PM12/2/13
to gmail-labs-sugge...@googlegroups.com
+1

J. T. Ivanov

unread,
Jan 27, 2014, 11:56:40 PM1/27/14
to gmail-labs-sugge...@googlegroups.com
+100

This feature is essential. I don't get why it's not provided to begin with.

pghprogrammer4

unread,
Feb 5, 2014, 2:32:19 PM2/5/14
to gmail-labs-sugge...@googlegroups.com
Seriously.  +1 from me.

Kristin Newill

unread,
Feb 7, 2014, 8:30:57 AM2/7/14
to gmail-labs-sugge...@googlegroups.com
This would be nice, I agree.

GeorgeB

unread,
Feb 8, 2014, 12:48:08 PM2/8/14
to gmail-labs-sugge...@googlegroups.com
We woke up an old request...since 2008 - like 6 yrs ago.
I hope they do it, but I won't hold my breath!!

Neil Wilkinson Cave

unread,
Feb 8, 2014, 1:38:29 PM2/8/14
to gmail-labs-sugge...@googlegroups.com
Yeah, if we all held our breath, we'd all be very very dead. Good one Google. 

I might add that I have been using Gmail now for ages and even though I would like the option to remove filters, I'm not sure I've noticed many problems without this feature. It seemed oh so important at first but tbh I've kind of forgotten about it & I guess that's what they reckon will happen to most of us "users" after a while.

Complacency perhaps, but when you're ignored for what is it you say..? six years, then what other option is there?

Parker Nevin

unread,
Mar 9, 2014, 11:16:55 PM3/9/14
to gmail-labs-sugge...@googlegroups.com
GOOGLE PLEASE. WE ARE BEGGING YOU!!

GeorgeB

unread,
Mar 10, 2014, 8:24:43 AM3/10/14
to gmail-labs-sugge...@googlegroups.com
Hey Parker,
88 posts by 78 authors in SIX years and you are still BEGGING???
It gets so pathetic :-)

GeorgeB

unread,
Mar 10, 2014, 8:26:26 AM3/10/14
to gmail-labs-sugge...@googlegroups.com
Did I mention 1830 VIEWS???

Jon Clement

unread,
Apr 4, 2014, 9:04:45 AM4/4/14
to gmail-labs-sugge...@googlegroups.com
Did anyone open a ticket for this request?
Reminds me of the need for the "Delete" email button.
Looks like my only work around will be writing a google apps script.  ie/ Add filter to label "delete_social_label". Arg.

Robert Best

unread,
Apr 10, 2014, 11:10:36 AM4/10/14
to gmail-labs-sugge...@googlegroups.com
This is still very much a desired feature... How else might we bring this more attention?

Mike ApocTV

unread,
Apr 18, 2014, 11:58:44 PM4/18/14
to gmail-labs-sugge...@googlegroups.com
I would love to see them add this.  Go go Google!

AK

unread,
Apr 30, 2014, 9:50:34 PM4/30/14
to gmail-labs-sugge...@googlegroups.com


On Tuesday, May 12, 2009 6:08:19 AM UTC-4, Unrealshade wrote:
hi again idesune =)

i don't know anything about the possibility of serverside scripting...
but surely you can do what suggested here if you sign up for the
"gmail labs" so you can create scripts on your own...?

hm, i still think you better open a new thread, because the name of
this thread here is "filter action: remove label" and that's what
people here are responding to, most of them don't read what users type
here, so to get any attention you better create a new thread! ;) this
thread is mostly about joining in to the request of adding this
feature and listing problems or examples where you need it... so the
problem is there is no discussion about your feature/ request/ idea.
however maybe you don't need to create this thread since you can join
the "gmail labs".

i don't know who is a gmail dev or how you recognize them here, but i
can't remember reading something from them in this thread. as probably
everyone here, i am waiting for a response or reaction from the gmail
dev team.


On Apr 6, 12:29 am, idesune wrote:
> Well ok, for now all I've found about scripting is the support to add
> your own controls to the page just by URL (in the settings tab of your
> mailbox) but what I was speaking about was scripting that would run
> server side, and I think it should belong to this topic as its main
> purpose would be as a very flexible filtering tool for email and other
> things (for example a smart answering machine that would answer
> differntially depending on whos writing, what is writting, etc.) well
> anyway, just glad that there are persons that still follow this topic,
> though would prefer that gdevs would write here something too, or have
> they allready?
>
> On Apr 5, 7:12 pm, Unrealshade wrote:
>
> > what do you mean by alive? there are thousands of topics that have not
> > been active for some months, but that does not mean there are no
> > people interested in that topic. that just means that there are no
> > news. i am definitely interested in this topic and probably the other
> > users as well who have written here. otherwise they might just have
> > answered here how they solved their "problem(s)" or issue(s).
> > however, there is a way to develop scripts. i don't know if you could
> > make it any simpler than that and i don't even know if it is already
> > simple. you could suggest this as a feature in a different topic, so
> > people can comment on your idea.
> > regards! :)
>
> > On Apr 5, 5:18 pm, idesune wrote:
>
> > > Is anyone alive here, cause the topic seams really dead, it also
> > > doesn't look that the devs are doing anything on this matter and there
> > > is no way for me to write it on my own (that is a shame) but just of
> > > wouldn't it be nice to be able to script out our boxes. Well something
> > > like a simple scripting language so that the users might add features
> > > to their boxes without touching the whole system. I mean like adding
> > > some event handlers to different inbox events and some hard to gui
> > > filter on that event or even well don't even know what might do with
> > > that (maybe adding an another game to the mailbox i.e. tetris). The
> > > only why you'd like not to implement anything like that is that it
> > > might later give a great impact on your servers (imagine processing
> > > all that) allthough V9 might help with that and make it rather
> > > effective and flexible feature. It might also solve a lot of feature
> > > problems and the current regarding the removal of labels from filters.

Keith Jamison

unread,
May 2, 2014, 3:11:45 PM5/2/14
to gmail-labs-sugge...@googlegroups.com
Here's a better way to write this script, using GmailApp.search to quickly select only those threads that include BOTH labels.  Also iterates through blocks of 100 threads (snice removeFromThreads can only handle 100 threads at a time):

//////////////////////////////////////////////////////////////////////////
// Version 1: if you just want to remove LABEL2 from all messages in LABEL1:

function processLabels(){
  excludeLabel('LABEL1','LABEL2')
}

function excludeLabel(label_search_name, label_remove_name){
  var threads = GmailApp.search('label:'+label_search_name+' label:'+label_remove_name);
  if(threads.length == 0){
      return;
  }
  var label_remove = GmailApp.getUserLabelByName(label_remove_name);
  var imax=0;
  var iskip=100;
  for(var i=0; i<threads.length; i+=iskip){
    imax = Math.min(i+iskip-1,threads.length-1);
    label_remove.removeFromThreads(threads.slice(i,imax));
  }
}
//////////////////////////////////////////////////////////////////////////
// Version 2: more general so that you can remove a label based on any gmail search query
function processLabels(){
  excludeLabel('is:unread label:LABEL1 from:some...@somewhere.com','LABEL2')
}

function excludeLabel(search_query, label_remove_name){
  var threads = GmailApp.search(search_query+' label:'+label_remove_name);
  if(threads.length == 0){
      return;
  }
  var label_remove = GmailApp.getUserLabelByName(label_remove_name);
  var imax=0;
  var iskip=100;
  for(var i=0; i<threads.length; i+=iskip){
    imax = Math.min(i+iskip-1,threads.length-1);
    label_remove.removeFromThreads(threads.slice(i,imax));
  }
}
/////////////////////////////////////////////////////////////////////////////////

Keith Jamison

unread,
May 2, 2014, 7:22:59 PM5/2/14
to gmail-labs-sugge...@googlegroups.com
oops.  I was confused about how slice() worked.  it should be:

imax = Math.min(iskip, threads.length-i)

Milan Schere

unread,
Jan 29, 2015, 11:47:39 AM1/29/15
to gmail-labs-sugge...@googlegroups.com
This feature has been requested in 2008. Now it is 2015 and when I Google search How to remove a label in gMail, I am brought to this group discussion.

Issue: I have applied the label "xyz" to all mail from xyz123@gmaildotcom by accident and want to remove it again but when I delete this filter in settings all the mail from that address still has this label applied to it in my inbox.
Question: How do I remove a label from that sender again without deleting the entire label because I have that label applied to many other filters?


Thank you.

 

On Wednesday, October 22, 2008 at 4:12:31 AM UTC-4, Avner Kashtan wrote:
(First, an apology if this has been discussed before. I couldn't find
anything related when searching the group)

A feature that I feel is missing when using filters is the ability to
remove a label for a message when it matches a filter. I have several
POP accounts imported into Gmail that are marked with a label, but I
have a mailing-list that I receive through one of those accounts that
I want to label specifically. In that case, I want the POP label
removed as well as the mailing-list label assigned, since I don't want
to see the message twice. I couldn't find any way to do it
automatically right now.

A simple enough feature to add, I hope. Hope it gets in there.

On Wednesday, October 22, 2008 at 4:12:31 AM UTC-4, Avner Kashtan wrote:
(First, an apology if this has been discussed before. I couldn't find
anything related when searching the group)

A feature that I feel is missing when using filters is the ability to
remove a label for a message when it matches a filter. I have several
POP accounts imported into Gmail that are marked with a label, but I
have a mailing-list that I receive through one of those accounts that
I want to label specifically. In that case, I want the POP label
removed as well as the mailing-list label assigned, since I don't want
to see the message twice. I couldn't find any way to do it
automatically right now.

A simple enough feature to add, I hope. Hope it gets in there.

Goofy 235

unread,
Jan 29, 2015, 12:17:27 PM1/29/15
to gmail-labs-sugge...@googlegroups.com
I imagine that initially you set up a filter for xyz123@gmaildotcom and part of the filter was to sent those emails from him/her to the "xyz" label?

If I understood your problem correctly
, I think you got to find the filter set for xyz123@gmaildotcom and delete it.
When you go to Settings>Filters all your active filters are shown. 
Look for the one you set up for xyz123@gmaildotcom, tick the "little box" in front of it, then click the "Delete" button.

Or just go to the extreme right and click the "delete" link.

Good luck :-)

Klára Neumann

unread,
Feb 1, 2015, 4:55:01 AM2/1/15
to gmail-labs-sugge...@googlegroups.com


2014. április 19., szombat 5:58:44 UTC+2 időpontban Mike ApocTV a következőt írta:
Szeretném látni őket adni ezt. Go go Google! On csütörtök, április 10, 2014 08:10:36 UTC-7, Robert Legjobb írta:

Ez még mindig nagyon sok a kívánt funkció ... Milyen más módszerrel hozzuk ezt a több figyelmet? A péntek, április 4, 2014 09:04:45 UTC-4, Jon Clement írta:

Volt valaki nyit egy jegyet erre a kérésre?
Eszembe jut, hogy szükség van a "Törlés" email gombra.
Úgy néz ki, én csak a munka körül fog írni egy Google Apps Script. azaz / Add filter felcímkézni "delete_social_label". Arg. A hétfő, március 10, 2014 08:26:26 UTC-4, GeorgeB írta:

Mondtam már 1830 Nézetei ???

On hétfő, március 10, 2014 08:24:43 UTC-4, GeorgeB írta:
Hé Parker,
88 hozzászólása 78. szerzők hat év, és még mindig könyörög ???
Egyre annyira szánalmas  :-)

A vasárnap, március 9, 2014 11:16:55 UTC-4, Parker Nevin írta:
GOOGLE kérem. WE ARE könyörög !!

2014. április 19., szombat 5:58:44 UTC+2 időpontban Mike ApocTV a következőt írta:
Szeretném látni őket adni ezt. Go go Google! On csütörtök, április 10, 2014 08:10:36 UTC-7, Robert Legjobb írta:

Ez még mindig nagyon sok a kívánt funkció ... Milyen más módszerrel hozzuk ezt a több figyelmet? A péntek, április 4, 2014 09:04:45 UTC-4, Jon Clement írta:

Volt valaki nyit egy jegyet erre a kérésre?
Eszembe jut, hogy szükség van a "Törlés" email gombra.
Úgy néz ki, én csak a munka körül fog írni egy Google Apps Script. azaz / Add filter felcímkézni "delete_social_label". Arg. A hétfő, március 10, 2014 08:26:26 UTC-4, GeorgeB írta:

Mondtam már 1830 Nézetei ???

On hétfő, március 10, 2014 08:24:43 UTC-4, GeorgeB írta:
Hé Parker,
88 hozzászólása 78. szerzők hat év, és még mindig könyörög ???
Egyre annyira szánalmas  :-)

A vasárnap, március 9, 2014 11:16:55 UTC-4, Parker Nevin írta:
GOOGLE kérem. WE ARE könyörög !!

2014. április 19., szombat 5:58:44 UTC+2 időpontban Mike ApocTV a következőt írta:
Szeretném látni őket adni ezt. Go go Google! On csütörtök, április 10, 2014 08:10:36 UTC-7, Robert Legjobb írta:

Ez még mindig nagyon sok a kívánt funkció ... Milyen más módszerrel hozzuk ezt a több figyelmet? A péntek, április 4, 2014 09:04:45 UTC-4, Jon Clement írta:

Volt valaki nyit egy jegyet erre a kérésre?
Eszembe jut, hogy szükség van a "Törlés" email gombra.
Úgy néz ki, én csak a munka körül fog írni egy Google Apps Script. azaz / Add filter felcímkézni "delete_social_label". Arg. A hétfő, március 10, 2014 08:26:26 UTC-4, GeorgeB írta:

Mondtam már 1830 Nézetei ???

On hétfő, március 10, 2014 08:24:43 UTC-4, GeorgeB írta:
Hé Parker,
88 hozzászólása 78. szerzők hat év, és még mindig könyörög ???
Egyre annyira szánalmas  :-)

A vasárnap, március 9, 2014 11:16:55 UTC-4, Parker Nevin írta:
GOOGLE kérem. WE ARE könyörög !!

2014. április 19., szombat 5:58:44 UTC+2 időpontban Mike ApocTV a következőt írta:
Szeretném látni őket adni ezt. Go go Google! On csütörtök, április 10, 2014 08:10:36 UTC-7, Robert Legjobb írta:

Ez még mindig nagyon sok a kívánt funkció ... Milyen más módszerrel hozzuk ezt a több figyelmet? A péntek, április 4, 2014 09:04:45 UTC-4, Jon Clement írta:

Volt valaki nyit egy jegyet erre a kérésre?
Eszembe jut, hogy szükség van a "Törlés" email gombra.
Úgy néz ki, én csak a munka körül fog írni egy Google Apps Script. azaz / Add filter felcímkézni "delete_social_label". Arg. A hétfő, március 10, 2014 08:26:26 UTC-4, GeorgeB írta:

Mondtam már 1830 Nézetei ???

On hétfő, március 10, 2014 08:24:43 UTC-4, GeorgeB írta:
Hé Parker,
88 hozzászólása 78. szerzők hat év, és még mindig könyörög ???
Egyre annyira szánalmas  :-)

A vasárnap, március 9, 2014 11:16:55 UTC-4, Parker Nevin írta:
GOOGLE kérem. WE ARE könyörög !!

Riasat Al Jamil

unread,
May 14, 2015, 9:15:06 PM5/14/15
to gmail-labs-sugge...@googlegroups.com
Still not implemented. lol.

Noam Gat

unread,
Jul 22, 2015, 3:55:03 AM7/22/15
to Suggest a Labs feature
+1

Avner Kashtan

unread,
Oct 22, 2008, 4:12:31 AM10/22/08
to Gmail Labs - Suggest a Labs feature

amin1986

unread,
Oct 22, 2008, 7:25:14 AM10/22/08
to Gmail Labs - Suggest a Labs feature
Agreed! this can be useful!

Chris

unread,
Oct 23, 2008, 1:20:59 PM10/23/08
to Suggest a Labs feature
Also agree!

I want to remove the tag from the incoming account and just have the
label from the filter to store the email just under that specific
label.



Makarand

unread,
Oct 23, 2008, 3:00:08 PM10/23/08
to Suggest a Labs feature
make it four!! i too want an option to remove label, through filters
and one more request, filters would be activated in an ascending or
descending order! so based on filters priority, labeling will take
place.. or anything else too, such as delete, archive etc.

pauiel

unread,
Nov 2, 2008, 5:48:32 PM11/2/08
to Suggest a Labs feature
I agree! Removing a label from a set of messages should be as easy as
adding one!

Calcipher

unread,
Nov 3, 2008, 10:14:45 AM11/3/08
to Suggest a Labs feature
I'd like to add my support for this feature. I've suggested it using
the old suggestion feature as well. Another use for this would be:
I have several filters which tags all emails from specific people with
[personName1], [personName2]...[personNameN]. I have another filter
which tags all emails to alternateEmailAddress. Right now I have two
options, either I let emails to alternateEmailAddress which are also
from a specific person to have two tags OR I add an exception to the
alternateEmailAddress filter. This is awkward because any time I
create a new [personName] filter I have to remember to go add the
exception to the alternateEmailAddress filter. This gets even more
confusing as I have several alternateEmailAddresses and some people
email different ones at random.

On Oct 22, 1:12 am, Avner Kashtan wrote:
> (First, an apology if this has been discussed before. I couldn't find
> anything related when searching the group)
>
> A feature that I feel is missing when using filters is the abilitytoremovea label for a message when it matches a filter. I have several

Mason Simon

unread,
Nov 7, 2008, 7:41:58 PM11/7/08
to Suggest a Labs feature
I want this one too!

Dracnath

unread,
Nov 24, 2008, 6:07:21 AM11/24/08
to Suggest a Labs feature
Ditto...this is becoming more and more pressing an issue for me, and
would be much loved!

Of course i'm on a hosted domain and can't get the labs features, so
how about we just role this one straight out to the masses (or fix it
so hosted domains can get lab features)

--nathan

thomatwork

unread,
Nov 28, 2008, 4:35:13 PM11/28/08
to Suggest a Labs feature
I think Avner gives a good use case for removing a label on filter
action.

I would like this feature also.



On Oct 22, 2:12 am, Avner Kashtan wrote:
> (First, an apology if this has been discussed before. I couldn't find
> anything related when searching the group)
>
> A feature that I feel is missing when using filters is the ability to
> remove a label for a message when it matches afilter. I have several

CherylT

unread,
Dec 4, 2008, 9:42:58 AM12/4/08
to Suggest a Labs feature
What they said!

braveknave

unread,
Dec 8, 2008, 9:37:53 PM12/8/08
to Suggest a Labs feature
Agreed! This would be an excellent feature.

kishany444

unread,
Jan 7, 2009, 10:20:59 PM1/7/09
to Suggest a Labs feature
I've been dying for this. Add it quick, Googlers!

j-joey

unread,
Jan 14, 2009, 3:21:52 AM1/14/09
to Suggest a Labs feature
while using accounts, filters without remove label is a headache.

i need this feature too!!



On 28 Kasım 2008, 23:35, thomatwork wrote:
> I think Avner gives a good use case for removing alabelonfilter
> action.
>
> I would like this feature also.
>
> On Oct 22, 2:12 am, Avner Kashtan wrote:
>
> > (First, an apology if this has been discussed before. I couldn't find
> > anything related when searching the group)
>
> > A feature that I feel is missing when using filters is the ability to
> >removealabelfor a message when it matches afilter. I have several
> > POP accounts imported into Gmail that are marked with alabel, but I
> > have a mailing-list that I receive through one of those accounts that
> > I want tolabelspecifically. In that case, I want the POPlabel
> > removed as well as the mailing-listlabelassigned, since I don't want

Professor Awesome

unread,
Jan 15, 2009, 11:09:28 AM1/15/09
to Suggest a Labs feature
+1 here.

I use Gmail to pick up mail from other POP3 accounts, which I then
want to filter further. This results in duplicate messages, since
imported mail has to be labelled to begin with and there's no way to
remove this label when another is applied.

impa...@gmail.com

unread,
Jan 28, 2009, 5:52:11 PM1/28/09
to Suggest a Labs feature
+1 again, same reason as everyone above..

Pants

unread,
Feb 6, 2009, 4:30:27 PM2/6/09
to Suggest a Labs feature
Yet another +1. It seems like a straight forward addition, no more
complex than adding

Joe B

unread,
Feb 12, 2009, 2:33:17 PM2/12/09
to Suggest a Labs feature
Amen!

jasonfried

unread,
Feb 17, 2009, 9:21:59 AM2/17/09
to Suggest a Labs feature
Yes Please. How long does such a simple request have to live up here
before it gets a response?

Ati

unread,
Feb 24, 2009, 3:34:52 AM2/24/09
to Suggest a Labs feature
Oh yes, this feature is a MUST! +1 request from me. :)

asbjornu

unread,
Feb 27, 2009, 12:42:04 PM2/27/09
to Suggest a Labs feature
+1 from me as well! I use POP3 to retrieve external e-mail and being
able to remove the account-applied label when filtering messages
downloaded from a given account would be awesome.

C.C.

unread,
Oct 20, 2015, 1:50:48 PM10/20/15
to Suggest a Labs feature
I am kind of pissed.
Was looking for how to remove a label using filters. found this. startet reading. realized dates. read 'till end. wtf.
 -> First, i don't see any response from google. Taking into account that there is NO SOLUTION I could find via googlegoogle, i think that's safe to say.
 -> Second, scripting is NO SOLUTION for this issue. Sure, if it is only for root-labels, that is easy. but say, it should be done on mails with keywords, said mails should have one or more label from a special group plus at least one label from a different group plus one specific label remove the last. something that would - if you search for the mails via googlemail - would look like this "(label:a label:{b c d e f} label:{g h i} keywordintext)" -> remove label a. in that case it is no simple "just edit the text in the bracelets". Ignoring that I use google on a corporate mail-address and my it would kill me if I start scripting.
 -> Third, I am a programmer. The whole company I work for is using google. (I asume there is quite some money in it for google) And I must code a BASIC FEATURE myself, including time for the new language I need, work into this topic, realising that there is some "minor thing" on that new language that i missed first, fixing the mess it created and last but not least the risk to destroy my whole account due to coding-mistakes? wtf2
 -> Forth, the demand is live 'TILL 08! SRSLY? WTF3

 - - - summary - - -
There is a seemingly huge demand for that feature, no solution other than scripting wich gets quite complicated and risky with higher complexity and obviosly no reaction from google on the whole thing for 7 years.
I am pissed and feel ignored, betrayed and kind of ripped of. (if you think my feelings on this are "overreacted" or "irrational": never stated they aren't)

 - - - request - - -
If i miss something, like a solution for the filter mentioned in 'Second', an offical statement from google, an un-offical statement from google,... I love to be wrong on depressing matters. Just let me know, so that my wrath may vanish. Thank you. :)
It is loading more messages.
0 new messages