Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get count of Important in Inbox? #28

Open
vorburger opened this issue Jan 6, 2023 · 1 comment
Open

How to get count of Important in Inbox? #28

vorburger opened this issue Jan 6, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@vorburger
Copy link
Contributor

vorburger commented Jan 6, 2023

@jamesread do you happen to know if the Gmail API could somehow allow us to count the Important messages in Inbox?

The gmail_IMPORTANT_total (and gmail_IMPORTANT_unread) counts ALL messages, not just those which are (also) gmail_INBOX_total (and gmail_INBOX_unread) in the Inbox.

Might it be possible to get a count for Gmail "queries", such as is:important in:inbox?

@jamesread
Copy link
Owner

jamesread commented Jul 3, 2023

Hey @vorburger , sorry for the delay in replying to you. Indeed, I think you'd have to use a "query" for this, which would have to come as a new feature to the project. I'd happy to accept a PR for this.

In the configuration file, it would be good to allow these queries to be added as a list, and an alias. Somethng like this;

customQueries:
  - name: fooquery
    value: "important in:inbox"

Which would then expose metrics like gmail_fooquery_total.

@jamesread jamesread added the enhancement New feature or request label Jul 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants