When should you use it?
- Important threads slip through
- Your CRM lacks an unanswered view
- You can run a small script
Not for: Shared or delegated inboxes; Anyone unwilling to set up API credentials
What do you need, and what do you get?
You need
- Gmail API credentials
- Definition of needs a reply
You get
- List of threads awaiting your response
How does it work, step by step?
- Set up access yourselfHandle the OAuth setup with whichever tool works; it is the fiddly part.
- Define the ruleA thread needs you if the last message is from someone else and you were a direct recipient.
- Limit to PrimaryFilter out promotions and updates.
- Run weeklyGenerate the list each Monday.
- Reply or dismissWork the list, then rerun.
The prompt
Our own prompt, inspired by Jamesin Seidel and written to work in Custom agent, Claude Code and ChatGPT. Values in lime are placeholders.
Write a script using the Gmail API with read-only scope. Find threads from the last 7 days in the Primary category where the latest message is not from me, I am in the To field, and the sender is not a bulk or no-reply address. For each, print who sent it, the subject line, when, and a link, newest at the top. Do not modify or label anything.
Inspired by Jamesin Seidel: Hello World... Meet Devin.. The prompt above is written by playbooks.bot in our own words; nothing from the original is quoted.
What can go wrong?
- Authentication was where the coding agent struggled; expect to help.
- Newsletters sent to you directly can look like replies owed; exclude bulk senders.
Our take
An early agent story that holds up: the agent stumbled on setup and shone once the plumbing worked. The rule itself is the valuable part: a thread is owed a reply when someone else wrote last and you were a direct recipient. That definition is simple enough to check by hand, which matters, because the first few runs should be compared against your own sense of what is overdue. Expect to do the OAuth setup yourself; Jamesin's agent needed help there, and a credential mistake is not something to delegate blindly. Keep the scope to read access and the Primary tab, and drop bulk senders early, since newsletters addressed to you will otherwise look like debts. Running it once a week on Monday is enough for most people; more often turns a useful nudge into another inbox. The script never replies on your behalf, and that is exactly right for something reading your mail.
Where the time goes back: The mental scan for threads you owe someone becomes a short list.
FAQ
Which agent did what?
Why Primary only?
Source and credit
Inspired by Jamesin Seidel. We describe the idea in our own words, link to the original, and wrote the prompt ourselves; nothing is quoted.
- Inspired by
- Hello World... Meet Devin.
- Creator
- Jamesin Seidel
- Published on
- jamesin.substack.com (Substack)
- Original date
- Dec 11, 2024
- License
- Not openly licensed (the poster keeps all rights), so we quote nothing and link to the original
- Originally for
- Custom agent
- AI dry run
- Oct 23, 2026: passed. Dry-run tested by our AI test agent on sample input. PASS: Gates held on desk check; no live sends or purchases.
AI dry run on sample data; not run with live connected accounts. The playbooks.bot test agent filled the prompt with synthetic inputs, produced the output and checked it against the page's stated outputs and guardrails. - Verified
- Oct 24, 2026: source link resolves to the original, the credited creator published it, our excerpt or prompt matches it, and the license allows our use.
Are you the creator? Claim or correct this page.