How do I do "Oldest X in Y" type goals?

I’ve seen people with “Oldest message in inbox” and “oldest task in Trello” goals.
But I haven’t found a way to automate that. Are they tracking this manually? Or am I missing something?

1 Like has Trello integrations for “root mean power of card ages” and “sum of card ages to some power”. It doesn’t have “oldest task in Trello” though.

As for “oldest Gmail message”, I searched the forum a bit and found @adamwolf mentioned he has a script for this, but hasn’t published it. If there’s enough interest, I could try making this as well, but considering Beeminder already has an official integration for the number of Gmail messages, I wonder if that could easily be extended to do oldest message/message age as well.


All of my scripts are in Python and run in a cronjob on my server. I can
publish them, but I cannot support users who use them.

I am working on migrating them to the javascript thing posted
recently, which would then support folks not having to run python on a
server somewhere to do all my integrations.

Is there a Beeminder where I can get more hours in the day? :slight_smile:


That would be awesome! Let me know if I can help in any way!

The integrations actually don’t need to be in javascript either. All the current examples just use Node.js because hosts it for free, but you could use any language as long as it implements the same HTTP protocol/endpoints as the Node implementations.

Is your script using OAuth for authentication? I’ve been trying to come up with a good way to write OAuth integrations through So far, there isn’t a very simple process for it. I’m considering making some server-side changes to to handle OAuth for integrations and then the integration endpoints can just expect to receive the access token.

All my scripts use the API key.

This works great and is fast for my CLI scripts, but not great for sharing

Hmm, maybe I could get them all running in Flask…

Thank you for the reference for I was not aware of it. Also, TIL that I can script my own integrations via a bunch of end points. I’ve never done this kind of scripting, but sounds cool to try :slight_smile: Thanks!

1 Like

I’ve been looking around and haven’t been able to find anything I can use to beemind the age of the oldest email in a particular email inbox: @adamwolf, did you ever publish your scripts…? Has anyone else made one of these?

I rewrote them recently due to some changes Google has made in their API, and I’m on day 6 of testing!

1 Like

@oulfis, here it is:

1 Like

Thank you so much, @adamwolf!! Your comments are so helpful, too – I am pretty sure I can get that working for me!!

There’s an issue around the unreadMessages stuff that I’m clearing up but the age of the oldest one is working :100:.