Labels Manager for Gmail
- Labels Manager is a free Google sheet add on which can help you perform bulk operations on your Gmail labels.
- Bulk Create, Update, Delete and Export your Gmail labels in your Google Sheet.
- Use it right from your Google Sheets without a line of code to manage your Gmail labels.
Video Tutorials
Text with screenshots
Table of Content
Install gmail labels
How to install the Labels Manager for Gmail add-on
Note: This add-on works for an individual user. That is, if you are an individual Gmail user then you install this labels manager for Gmail add-on. If you are a Google Workspace admin and you would like all your users to be able to use this add-on, here is the link [hyperlink] where I explain how to install the add-on as a Google Workspace admin and then “push” it to multiple Google Workspace users within your domain.
Log into the Google account where you would like to install the “Labels Manager for Gmail add-on.
The proceedings screen will tell you what parts of information the “Labels Manager for Gmail” add-on may be able to access through your Google account.
Once the add-on is installed, a small pop-up under the “Add-ons” menu option will notify you that the add-on has been installed.
Run the Setup wizard to create all the worksheets that will be used by the “Labels Manager for Gmail” add-on, using the following command path:
Add-ons >> Labels Manager for Gmail >> Setup Wizard >> Create Label Sheets
The setup creates multiple worksheets that will be used for various functions provided by the “Labels Manager for Gmail” add-on.
In case something goes wrong with the worksheets and you need to reset the add-on, you can simply delete all the worksheets (so that you can run the setup again) using the following command path:
Add-ons >> Labels Manager for Gmail >> Setup Wizard >> Delete All Sheets
bulk create gmail labels
How to bulk create Gmail labels with the labels manager for Gmail add-on
In this tutorial I’m going to show you how to bulk create Gmail labels using my Labels Manager for Gmail add-on.
Enter the following values into the designated columns:
- Label Name
- Label Visibility
- Label Color
As you can see in the above image, you can also create nested labels. Just make sure that the parent label is already created in the row above.
You can enter the visibility setting of the label using the cell drop-down options.
For background color and text color of the labels, you can enter hexadecimal values. Gmail accepts only certain hexadecimal values. I’m giving these values below:
Hexadecimal values for background color:
#000000, #434343, #666666, #999999, #cccccc, #efefef, #f3f3f3, #ffffff, #fb4c2f, #ffad47, #fad165, #16a766, #43d692, #4a86e8, #a479e2, #f691b3, #f6c5be, #ffe6c7, #fef1d1, #b9e4d0, #c6f3de, #c9daf8, #e4d7f5, #fcdee8, #efa093, #ffd6a2, #fce8b3, #89d3b2, #a0eac9, #a4c2f4, #d0bcf1, #fbc8d9, #e66550, #ffbc6b, #fcda83, #44b984, #68dfa9, #6d9eeb, #b694e8, #f7a7c0, #cc3a21, #eaa041, #f2c960, #149e60, #3dc789, #3c78d8, #8e63ce, #e07798, #ac2b16, #cf8933, #d5ae49, #0b804b, #2a9c68, #285bac, #653e9b, #b65775, #822111, #a46a21, #aa8831, #076239, #1a764d, #1c4587, #41236d, #83334c
Hexadecimal values for text color:
#000000, #434343, #666666, #999999, #cccccc, #efefef, #f3f3f3, #ffffff, #fb4c2f, #ffad47, #fad165, #16a766, #43d692, #4a86e8, #a479e2, #f691b3, #f6c5be, #ffe6c7, #fef1d1, #b9e4d0, #c6f3de, #c9daf8, #e4d7f5, #fcdee8, #efa093, #ffd6a2, #fce8b3, #89d3b2, #a0eac9, #a4c2f4, #d0bcf1, #fbc8d9, #e66550, #ffbc6b, #fcda83, #44b984, #68dfa9, #6d9eeb, #b694e8, #f7a7c0, #cc3a21, #eaa041, #f2c960, #149e60, #3dc789, #3c78d8, #8e63ce, #e07798, #ac2b16, #cf8933, #d5ae49, #0b804b, #2a9c68, #285bac, #653e9b, #b65775, #822111, #a46a21, #aa8831, #076239, #1a764d, #1c4587, #41236d, #83334c
Bulk update gmail labels
How to bulk update Gmail labels with Labels Manager for Gmail
Updating Gmail labels may involve renaming them, turning child labels into parent labels (or vice versa) or moving child labels to different parent labels.
Select the “2. Update Labels” worksheet.
Since there are many columns, I have sliced the image and rearranged different portions so that you can see all the columns without having to see a very wide image.
Except for the “Label Update Status” column, you have to fill up information in every column.
Most of the column headers are self-explanatory, if you’re wondering what is “Label ID”, please refer to the “How to bulk export Gmail labels” section.
Label IDs uniquely distinguish one label from another.
The tiny triangles that you can see on the top-right corners of the column headers indicate that values in these columns can be obtained from drop-down options, something like:
Please refer to the “Bulk creating new Gmail labels” section to know what hexadecimal values can be used for background and text colours of your labels.
After filling in all the values, run the “update labels” module through the following command path:
Add-ons >> Labels Manager for Gmail >> 2. Update Labels
The “Success status” column shows you that the labels have been successfully updated.
But what if you don’t need to change all this information? Perhaps you just want to change the names of the Gmail labels?
I should have created another module called “Update Labels Lite” within the “Update Labels” module, but for the time being, you can go to the “5. Replace Labels” worksheet if you simply want to change the names of the existing Gmail labels.
Again, to fill up the values in this worksheet, you will need to refer to the section where I explain how to export Gmail labels, so that you can get the needed values.
In the “5. Replace Labels” worksheet, you need to include the following information: “Old Label Name”, “Label ID” and “New Label Name”.
Although you can use this worksheet to rename labels, I’m taking this opportunity to explain how you can also move one nested label from under an existing parent label to under another parent label.
In the above screenshot you can see that I’m trying to move the labels “nested” from two parent labels “7” and “8” to “111” and “112”.
Run the “Replace Label” module using the following command path:
Add-ons >> Labels Manager for Gmail >> 5. Replace Labels
Whether you want to rename the labels or you want to shift nested labels to different parent labels, just enter the new name under the “New Label Name” column, accordingly.
The Status column shows you that the Gmail labels have been successfully replaced or renamed.
bulk Export gmail labels
How to bulk export Gmail labels with the Labels Manager for Gmail add-on
Bulk exporting the Gmail labels can be very useful. It gives you a bird’s eye view of all the labels – the names of all the labels that you have created, their individual label IDs, how many emails belong to individual labels, and such.
Select the “3. Export Labels” worksheet.
I have arranged the screenshot of the column headers in such a manner that you can see all the columns in the worksheet without excessive horizontal scrolling.
As you can see, this worksheet will save every possible information about individual Gmail labels.
You can export just label names and label IDs, but we will come to that later.
Run the “Export Labels” module using the following command path: Add-ons >> Labels Manager for Gmail >> 3. Export Labels >> Export Labels
The “Export Labels” module takes a bit longer to execute because it exports every possible information belonging to individual Gmail labels.
All the information will be exported in the add-on’s spreadsheet.
Now, what if you don’t need all this information? If you export everything, it may take lots of time and it may even run out of execution time if there are thousands of emails organized under hundreds of Gmail labels.
Another module, “Export Labels (Light)” allows you to export just label names and label IDs.
This is the command path for that:
Add-ons >> Labels Manager for Gmail >> 3. Export Labels >> Export Labels (Light)
As you can see, this time only label names and level IDs are exported.
This is a preferred way of exporting Gmail labels if you just need these two bits of information.
Bulk delete gmail labels
How to bulk delete Gmail labels with Labels Manager for Gmail
Bulk deleting your Gmail labels can be an excruciating exercise if you have got hundreds of labels. Deleting individual labels using the default Gmail interface involves multiple steps, but, using the Labels Manager for Gmail add-on, you can simply mention all the labels that you want to delete and voila! The labels are deleted.
FAQ
Most frequent questions and answers about Labels Manager for Gmail
Gmail accepts a limit set of colors for labels background and text, you can use any of the accepted ones mentioned below-:
Gmail accepted hexadecimal values for background color:
#000000, #434343, #666666, #999999, #cccccc, #efefef, #f3f3f3, #ffffff, #fb4c2f, #ffad47, #fad165, #16a766, #43d692, #4a86e8, #a479e2, #f691b3, #f6c5be, #ffe6c7, #fef1d1, #b9e4d0, #c6f3de, #c9daf8, #e4d7f5, #fcdee8, #efa093, #ffd6a2, #fce8b3, #89d3b2, #a0eac9, #a4c2f4, #d0bcf1, #fbc8d9, #e66550, #ffbc6b, #fcda83, #44b984, #68dfa9, #6d9eeb, #b694e8, #f7a7c0, #cc3a21, #eaa041, #f2c960, #149e60, #3dc789, #3c78d8, #8e63ce, #e07798, #ac2b16, #cf8933, #d5ae49, #0b804b, #2a9c68, #285bac, #653e9b, #b65775, #822111, #a46a21, #aa8831, #076239, #1a764d, #1c4587, #41236d, #83334c
Gmail accepted hexadecimal values for text color:
#000000, #434343, #666666, #999999, #cccccc, #efefef, #f3f3f3, #ffffff, #fb4c2f, #ffad47, #fad165, #16a766, #43d692, #4a86e8, #a479e2, #f691b3, #f6c5be, #ffe6c7, #fef1d1, #b9e4d0, #c6f3de, #c9daf8, #e4d7f5, #fcdee8, #efa093, #ffd6a2, #fce8b3, #89d3b2, #a0eac9, #a4c2f4, #d0bcf1, #fbc8d9, #e66550, #ffbc6b, #fcda83, #44b984, #68dfa9, #6d9eeb, #b694e8, #f7a7c0, #cc3a21, #eaa041, #f2c960, #149e60, #3dc789, #3c78d8, #8e63ce, #e07798, #ac2b16, #cf8933, #d5ae49, #0b804b, #2a9c68, #285bac, #653e9b, #b65775, #822111, #a46a21, #aa8831, #076239, #1a764d, #1c4587, #41236d, #83334c
Though you can create unlimited number of labels, however Google enforces some limitation on the script execution time as following-:
1. Personal @gmail account OR Google Workspace Basic edition users have a limit of 6 minutes for script execution, that means script for you can run maximum for 6 minutes.
Though I have not tested but You should be able to create upto 100 Gmail labels at once.
2. Google Workspace Business, Enterprise or Education edition users have a limit of 30 minutes for script execution time, that means script for you can run maximum for 30 minutes.
Though I have not tested but You should be able to create upto 300 Gmail labels at once.
What if you need to create more than that, like 1000 Gmail labels at once?
You can create them in small batches instead of putting all 1000 at once.
1. Please make sure that you watched the videos above and followed the directions as shown in them.
2. If you are still getting an error, try removing the add on, install it again and give it a shot.
3. If it still does not work, then record a video (I would recommend https://www.useloom.com/ for it) which shows your attempt to use the add on and the error, and put that in the comments below for me to look at and help you out.
I appreciate it, you can simply comment your feature request below and I would try to add it as soon as I get time.
Ideally your feature request should include following-:
1. Title of the feature request.
2. Explanation / Summary of the use case behind it.
3. How would it make your job easy?
Note -: I am a full time employed with a demanding family, So I can’t commit any timeline to add your requested features, but rest assured I love helping out Google Workspace community and would do my best to add your requested feature if it make sense.
Apologies, I do not freelance.
However, please put it as comment below, and I will try to help (for free) as soon as I get time.
- When you read my blog, and/or use my services like this labels manager for Gmail add-on, you trust me with your information.
- My Privacy Policy is meant to help you understand what data I collect, why I collect, and what I do with it.
- This is important, I hope you will take time to read it carefully. And remember, you can always contact me on the details provided at bottom of this page for any questions about protecting your privacy and security at my Website.
- You can read the privacy policy here -: https://www.goldyarora.com/privacy/
hi goldy thanks for the helpful app!
so i am migrating all emails from a gmail account to a gsuite account.
i was able to export the labels from the gmail account into the gsuite account
however, i can not seem to figure out how to have those imported labels assigned to the emails that used to have them.
is there a way to do this?
thanks in advance
Jesse – your welcome, this should help https://www.goldyarora.com/migrate-gmail-filters/
Hi Goldy,
I was very excited to try this tool, but it appears that installation is presently blocked by a google sign in issue:
“Sign in with Google temporarily disabled for this app
This app has not been verified yet by Google in order to use Google Sign In.”
I tried with both a Gmail-hosted company account and with my personal Gmail account. Failure happens immediately when you choose the account (before you get to enter the password).
I apologize for inconvenience, Google recently introduced some changes and I have submitted some documentation to them for review. Unfortunately, i was late providing them this documentation and they blocked new signups until they review the application.
Hopefully, it’ll start accepting signups again in a month or so.
Thanks for your work, hope the process can be done ASAP.
Hi Steven – I have got it fixed, it should be working as expected now, let me know how goes (if you try it out)
hi
i would like to ask for this feature if possible .
1. Title of the feature request : shared labels
2. Explanation / Summary of the use case behind it : allow sharing of lablels and emails inside between several different email users
3. How would it make your job easy? a lot : this would allow for a collaborative work inside gmail labels
This is in Google’s roadmap, if you look at youtube for Google Next 2019 videos, you would find a video showing that this would be coming in Gmail.
Hi Goldy,
Thank you for creating this add-on, however it’s not working for me.
I’m just trying to delete a bunch of labels, I’ve got a lot of them.
I copied the labels I want to delete to the Delete Sheet, and then selected #4 Delete.
I get this error: “Cannot call method “deleteLabel” of null.”
I created a video with SnagIt, But I don’t see how to upload it.
I can’t even include a screenshot.
Where am I given that option with this comment box?
To add a screenshot, you can add its link.
based on the error you mentioned, it seems you need to watch the videos again as you either didn’t provide the label names OR sheet name is changed OR these labels don’t exist.
An update to my last comment. I did watch the newer video, but now I don’t see the FAQs on options to put for the 2 color fields. Thanks SO MUCH for your help!
Thank you for the feedback, I have just added it in the FAQs.
Hi!
I am trying to move everything from one gmail account to a new gmail account. There are years and years of emails and many many labels.
I came across your very helpful youtube about creating/deleting/etc gmail labels. I did manage to export all the labels with your script from the original gmail. Then, when I go to the new gmail account, I copied and pasted them to the “create labels” tab. It looks like it’s been updated since you created the youtube video because now there are more fields.
I have the names in, and I saw your comment about label visibility, so I did that. But I’m not sure what I am supposed to put in the fields for “Label BG Color*” and “Label Text Color*”. I tried running the script with those blank, and I get the error “API call to gmail.users.labels.create failed with error: Invalid hex string color:” What do I need to enter in there to allow the labels to create?
And an even better question is, do you have any suggestions on how I can get all the thousands(?) of emails from my old gmail account to the new one, with labels intact?
Thank you SO MUCH for your help!
Emily
Hi Emily – Apologies for confusion, I had the mention of label background and color below in the page, but now i have added them as the first FAQ on the page, hope it helps.
Also, there is an option in the tool called “Create Labels Light” which does not need you to put things like color, visibility etc, its covered in the create labels video.
Dear Goldy,
First, thank you so much for everything you are doing. You truly are a wonderful person.
I have two questions/requests:
1. Is it possible to merge two existing labels? For example, if I have one label “To Read” and another “Read”, is it possible to merge them both into “Read”? Alternatively, is it possible to merge them both into a new label?
2. Is it possible to move a nested label to a higher or lower level. For example, in your video, would it be possible to move all the emails in “111/nested” into the label “6”?
I wish you a wonderful day,
David
Hi David – Apologies for delay, and thank you so much for your kind words, really motivating:).
Here are the answers to your questions-:
Answer 1. Merging labels -: Sure, easy easy peasy, this is what you should do-:
Select all the emails in given label (e.g “To Read”) or simply put the query in Gmail’s search bar as label:To Read (assuming To Read is the label name) and it will show you all the emails in that label, simply select all.
Then You should apply “Read” label to them (or whatever is the name of your other label that you want to apply).
Now, you can delete “To Read” label, and you are left with all the emails labeled as “Read”.
Answer 2-: Moving the nested label-:
Sure, simply select all the emails in your nested label (e.g 111/nested) and move them to required one, now you can delete 111/nested.
I would also really like a way to merge labels, but in bulk, I have labels organised by year and then category. I’m looking to change it so it’s by category and then have a separate label for the year. The problem is that I have about 600 labels. The separate label for year is easy, searching all email from one year and then applying the year label. But the categories are not so clear, but exporting them to your add-on and then grouping them and applying the same label to multiple old labels would be a great way to do this. Or if you know a different way to merge multiple labels without to much work. (did some operations with searching for multiple labels and changing all of them, works, but is time consuming)
ex.
2019/Office
2018/Office
2017/Office
ect…
To
Office + 2019 or 2018 or 2017 or ect…
For now what you are doing is the easiest way I can think of (create a date filter to filer out –> group them –> put them in required label). If more people come up with this similar use case, i’ll try to enhance the add-on to cover it.
Hey Goldy, I definitely have a similar use case.
I’m merging a couple of mailboxes and one mailbox they have a different label for every different week for every different category. It’s ridiculous! There are a thousand date labels I’d like to merge into their 5 parent labels.
I don’t expect you to be able to have a fix for me. You’re enough of a miracle worker as is. Just thought I’d put my vote in.
Cheers
Aston
You’re very welcome, am glad it saved some of your time.
For anyone else reading this. This is the quickest way that I could figure out to somewhat manually merge labels is this below.
In my instance, I have 100s of nested labels that I am wanting to shift into a more broadly categorised one. (I’m cleaning up a shared mailbox where people created a new label for every day of the week under an Archive folder. How redundant!)
1. Download and install Notepad++, or any other text editor that supports searching for Regular Expression.
2. Use Goldy’s Labels Manager for Gmail to get an export of all the mailbox’s labels
3. Copy and paste the labels that will be removed after merging into Notepad++.
4. Paste this into the “4. Delete Labels” sheet in Goldy’s spreadsheet so that it’s ready to go afterwards
5. In Notepad++, type CTRL+F to open the Find dialog box
6. Click on the Find and Replace tab and replace all spaces ” ” with a hyphens “-” (don’t include the quotes)
7. Find and Replace all ampersands “&” and other special characters with hyphens “-” as well, if you see any
8. In the Find and Replace dialog, in the bottom left corner is “Search Mode”. Set that to “Regular expression”.
9. Find and Replace all “^” with “OR label:”. “^”, in Regular Expression means “the beginning of the line”
10. You now have a nicely organised string you can copy and paste into the search box in Gmail to find emails in a number of labels.
10a. If you have hundreds of labels, like me, you won’t be able to search them all at once because there is a maximum string length when searching. I chose about 20 at a time because my labels are nested pretty deep.
11. Drag and drop the emails in your search into the label that you want them to reside in.
12. After you’re done getting through your text document, use Goldy’s spreadsheet to delete all the old labels.
Thank you Aston for taking the time, this would be very helpful for someone dealing with your kinda use case, appreciate it.
Second Comment – Really it is a question > I have seen a number of articles that say it is easy to move labels above or below the More/Less line by just dragging them up or down but this is not working for me. I can drag the labels without a problem but they do not move. I am wondering if this might be because I have nearly 1000 labels so it is not able to process this, or if there is a different way to handle it.
Also – Wondering if there is a way to do this within your Label Manager application? Suggestion for another tab would be a clever way to select the order a user wants their labels to show up and then have the spreadsheet edit the names using “.”, “@”, etc to put these in that order to get around the alphabetical sort that Google defaults to.
1. Its not possible to move the labels above or below the line, all a user can do it is to move the line itself (upto screen limits) to view a bit of more labels in the left pane.
2. Though it is also not possible, but you may consider numbering your labels, for e.g
1. Label Z
2. Label A
this way, Google will go with numbers, and let you put the required ones in your (numbered) order.
Hope it helps.
Two comments. First for Dolly above. I had this same issue when I was trying to use the UPDATE labels tab in the spreadsheet but was only working with the “light” exports. I switched over to using the REPLACE tab instead and it worked perfectly. I do not fully know why but assume it is because I was not entering in information for all of the other fields in UPDATE. I know that in the UPDATE video Goldy mentions this (about halfway into the video) but worth checking it out.
Thank you Charles, You are right, label update sheet need the user to provide all required fields (denoted by *) such as label background/text color, visibility etc, it won’t work if user leaves any of them blank.
If user needs to only update the label names, “replace labels” sheets should be a better way.
I apologize, I should have made “Update labels” and “Update Labels light” instead of putting 2 sheets for update.
Hello, I tried to update my labels however I keep getting this message “API call to gmail.users.labels.update failed with error: Invalid value for: labelShow is not a valid value”. I put “labelShow” under the Label Visibility column.
1. Please double click in the cell and ensure there is no space before or after labelShow
2. Also, please ensure you are putting values in all the required fields (denoted by *).
If you only need to change label names, you should better use “Replace Labels” sheet, you may also consider watching the video above where I show how to (and in which scenario) use both of these sheets for updating labels.