7 Comments
User's avatar
Derek's avatar

I love that you created a personal app to work around some of Gmail's limitations. What did you use to wire the app up to Google? Does this work with a personal account, or does it have to be Workspace?

Steve Newman's avatar

I'm using it with a personal account. Google provides an API for working with Gmail. I asked Claude to explain how this works, its response is below. Note that setting up OAuth (which is how Google gets permission from you to share information with this app) was a big pain in the rear; Claude handled all of the actual coding, but it took many many tries to get it working smoothly, for lots of silly little reasons that I can't specifically recall.

-----

The project uses the Gmail REST API v1 via direct fetch() calls (not the googleapis npm package, to stay under Cloudflare's 1MB worker limit).

Key details:

- Auth: OAuth 2.0 with refresh token, using the gmail.modify scope

- Capabilities: Can only modify labels—cannot delete emails or send mail

Main API functions (in packages/shared/src/gmail.ts):

- getAccessToken() - Exchanges refresh token for access token

- listMessages() - Gets messages by label

- getMessageDetails() - Fetches message headers (From, To, Subject)

- getThreadMessages() - Fetches all messages in a thread

- modifyMessageLabels() - Adds/removes labels

- getOrCreateLabel() - Finds or creates custom labels

Nathan Surendran's avatar

A little bit of best practice as I understand it - get the llm coding agent to maintain a .md file to help it resume from crashed sessions and after each significant step get it to update the file with notes to help itself work more efficiently including those little resolutions to the project specific challenges.

Against Moloch's avatar

100% agree that for people who are good at products, the plummeting cost of creating custom software is a game changer. I'm writing this comment inside the custom bookmark manager I wrote because I wanted features that aren't available in any commercial product, and all of a sudden, making my own high-end app just isn't that hard.

I do wonder, though, how useful that will be for non-technical people. I've had so many times when a user came to me with a pain point (which was usually valid) and a proposed solution (which was almost always wrong). I suspect it's easier to solve the "make any software you want" problem than the "designing products is hard" problem.

Steve Newman's avatar

Agreed that this is a critical point. One big open question is whether AI models + clever product design can help – let the AI observe your workflow and ask you questions and then suggest things it could build to help you out. https://tasklet.ai/ does a bit of this as part of its onboarding flow.

James Riseman's avatar

Very interesting topic, Steve! I’d love to see a follow-up post about “best practices” when coding with Claude.

Steve Newman's avatar

I might attempt something like that at some point, but right now I don't think I'd do a very good job compared to people who have been using these tools longer + more broadly.