Coder Social home page Coder Social logo

catendre / gas-gmail-add-parent-of-nested-label Goto Github PK

View Code? Open in Web Editor NEW
18.0 6.0 2.0 35 KB

A Google Apps Script for adding ancestors' labels to Gmail messages labelled with their descendants.

License: GNU General Public License v3.0

JavaScript 100.00%
gmail-api gmail-labels emails google-apps-script

gas-gmail-add-parent-of-nested-label's People

Contributors

catendre avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

gas-gmail-add-parent-of-nested-label's Issues

Exclude top level labels?

Hello, I would like to use your script but excluding top level labels, is that possible?

Use case

Consider the following labels:

Places
Places/UK
Places/UK/London
Places/US
Places/US/NY
Places/US/LA
People
People/Family
People/Friends
People/Friends/Club
People/Friends/University
People/Work
People/Work/CompanyA
People/Work/CompanyB
Etc
Etc/Purchases
Etc/Rent
Etc/Rent/HouseA
Etc/Rent/HouseB

I would like to have the script add "UK" to mails labeled "London" and add "US" to mails tagged "NY" or "LA" but not add the "useless" label "Places" to them. And the same for "People" and "Etc" (especially for avoiding the visual clutter of having those labels shown in each row of the inbox view, for example).

I.e., I would like the script to apply all parent labels except for the top level one. Is that possible? I'd love to have your help if you could spare some minutes to help a stranger from the internet :)

Cannot read property 'id' of undefined

Love the idea behind the project and what you're trying to fix.

On line 131 I get:

Error TypeError: Cannot read property 'id' of undefined addParentLabel @ Add Parent Labels.gs:131

INFO: Appreciation Issue

It's a good project. Thank you.

  1. The solution works as described.
  2. The code explains itself.
  3. The instructions are thorough and complete.

These qualities are often uncommon for elegant solutions.

Now to get the gMail team to reorder their product backlog...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.