← Back to library

List last week's emails still waiting on your reply

Jamesin Seidel missed the unanswered-mail tab from his old CRM and tried rebuilding it with Devin against Gmail. Auth plumbing stalled the agent at first; once connected it shone, even fetching docs on its own to list last week's unanswered primary messages.

  • OutcomeGet a list of Primary-inbox emails from the last seven days still waiting on your reply.
  • SetupAn afternoon+
  • LevelIntermediate
  • CreditJamesin Seidel
View original
Works with
Custom agentClaude CodeChatGPT

Published Oct 23, 2026Updated Oct 23, 2026AI dry run on sample input: passed Oct 23, 2026Source verified Oct 24, 2026

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?

  1. Set up access yourselfHandle the OAuth setup with whichever tool works; it is the fiddly part.
  2. Define the ruleA thread needs you if the last message is from someone else and you were a direct recipient.
  3. Limit to PrimaryFilter out promotions and updates.
  4. Run weeklyGenerate the list each Monday.
  5. 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.

Prompt0 variables
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?
He wrote authentication in Cursor; Devin built the search logic and looked up the docs.
Why Primary only?
So marketing and automated notices do not clutter the list.

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.

More in Operations & Admin

All 203 Operations & Admin playbooks →

Related playbooks

Operations & AdminRoutine✓ AI dry run

Triage only the new arXiv papers each week

Spend reading time only on fresh papers that pass your own criteria, with promising ones already filed in Zotero.

Credit: Jonas Wiedermann-Möller

An afternoon+
Operations & AdminWorkflow✓ AI dry run

Add a merge check for every way coding agents break code

Keep a running list of the specific ways coding agents have damaged your repository, from hollow tests and invented fake responses to deleted files and silenced type errors, and turn each one into an automated gate that blocks the merge, so the same mistake cannot slip through review twice.

Credit: u/alexmarquardt on r/ClaudeCode

An afternoon+
Operations & AdminWorkflow✓ AI dry run

Build a daily briefing from today's field-service jobs

From a day's job or call export, get an internal briefing that counts unique jobs, puts decisions and callbacks at the top, deduplicates repeat rows, flags incomplete or conflicting records instead of filling them in, and stays with named internal recipients. Nothing in the briefing is sent to customers.

Credit: Tyler Griffin (@TylerGriffin)

Minutes
Operations & AdminWorkflow✓ AI dry run

Keep the check that decides 'done' out of your agent's reach

Stop a coding agent from grading its own homework: write the acceptance check yourself, lock it with a checksum so any edit fails the run, make it measure the finished result rather than read the agent's code, print a specific miss line for each defect, and still look at the result with human eyes before calling it done.

Credit: u/Stunning-Sherbet1853 on r/AI_Agents

Under an hour
Operations & AdminWorkflow✓ AI dry run

Publish agent HTML reports on your own domain

Set up a small open source tool that publishes agent-made HTML on a domain you control, behind a login, with a dated index of everything published.

Credit: vitorbaptistaa on Hacker News

Under an hour