Python and automation
A daily inbox digest on macOS
I built a Python job that turns recent Gmail activity into one morning email.
Application receipts and routine messages can crowd out emails that need a response. I built a digest that surfaces those messages in one place each morning.
How it works
A Python script uses the Gmail API to review recent inbox activity and sent replies. Local scoring rules prioritize messages that may need action and put uncertain threads in a review section. A macOS LaunchAgent runs the job. I can also preview its output or send myself a test digest.
Technical gotchas
A scheduled task on a laptop can miss a run. The script records the last successfully delivered cutoff and picks up from there on the next run.
A thread can also change between review and archiving. Before archiving a promotional thread, the job checks whether the messages changed and leaves the thread alone if they have. Preview and test delivery never archive mail.