ryanwold.net

A civic-minded citizen seeking the singularity

Back to Entries

Gmail Superstars with Gmail.gem

release
Date: 2015-07-06
Tags: gmail api workflow gtd

I've been using the Gmail.gem to pull email counts in a Personal Dashboard for a couple years. And, in Gmail, I use Superstars, which are flags you can toggle through on an email. I was disappointed not to be able to filter Superstars through the email.

A recent Stack Overflow article pointed me in the right direction. I use Gmail Superstars, which enables additional flags where the standard yellow-star is used. Below, you can see the red-bang and green-check.

How I Use Superstars

I use red-bang for emails I need to respond to. I use the orange-guillemet for emails that I'm awaiting a response on. I use the green-check for emails I have completed. (Though, most of the time I just archive things as I complete them). And, I use the yellow-star for informational items, sorta like a bookmark.

an Example of Gmail Superstars

Searching for GMail Superstars

Superstars labels are searchable through the Gmail interface using 2 syntaxes.

  • has:yellow-star or l:^ss_sy
  • has:blue-star or l:^ss_sb
  • has:red-star or l:^ss_sr
  • has:orange-star or l:^ss_so
  • has:green-star or l:^ss_sg
  • has:purple-star or l:^ss_sp
  • has:red-bang or l:^ss_cr
  • has:yellow-bang or l:^ss_cy
  • has:blue-info or l:^ss_cb
  • has:orange-guillemet or l:^ss_co
  • has:green-check or l:^ss_cg
  • has:purple-question or l:^ss_cp

Superstars and the Gmail.gem

So, using the Gmail .gem, I was delighted to find I can access these specific counts. Here's how:

gmail = Gmail.connect(@email_address, @password)
@red_banged_emails = gmail.inbox.emails(gm: '"l:^ss_cr"')

Or, as I use them

@starred = gmail.inbox.emails(gm: '"l:^ss_cy"')
@requires_my_follow_up = gmail.inbox.emails(gm: '"l:^ss_cr"')
@requires_a_response_from_somebody_else = gmail.inbox.emails(gm: '"l:^ss_co"')

Thanks to Google and Stack Overflow for persisting this knowledge!

By Ryan Wold · © 2015–2026 Ryan Wold

Licensed CC BY-NC 4.0. AI training requires a license — machine-readable terms.

Enjoyed this? — any BSV wallet, HandCash, or plain old dollars.

Leave a tip

Tips go directly to a Bitcoin SV address I control — peer to peer, no platform in between. A few thousand satoshis is a fraction of a cent; it's the gesture that counts.

From any BSV wallet

Scan the QR code with your wallet's camera, or copy the address.

177DwUfSTW8RkFBJzYYcgr1YB8ngbhTYAc

With HandCash or any paymail wallet

Paymail is an email-style address for Bitcoin wallets. Send any amount to afomi@handcash.io

First time using Bitcoin? Yours Wallet is an open-source browser extension wallet, and HandCash is an easy mobile wallet — either takes a minute to set up.

Prefer regular money? Support via OpenCollective.