{"call_it":"\"Sort my inbox into one brief\" by James Raybould","owner":"James Raybould","runbook":"https://myrunbook.ai/jamesraybould","n":3,"id":"brief","name":"Sort my inbox into one brief","runner":"an assistant I built","schedule":"Throughout the day","description":"My mail sorted into Needs me, Waiting on others and Everything else, in one brief in my assistant app.","reads":["Gmail","filing labels","sender history","document summary cards"],"lands":"A brief in my assistant app with three lists: Needs me, Waiting on others and Everything else","source":null,"figure":"478 emails sorted, 33 needed me in the last 30 days","link":null,"example":{"kind":"invented","note":"Updated 7:02am. 3 need a reply, 2 you owe, 4 waiting on others.\nNeeds a reply: Dana wants yes or no on the revised scope, by Thu.\nWaiting on: Ravi, intro to Harbour Lane.\nEverything else: 14 newsletters, 6 receipts, 3 calendar notices."},"output":"Inbox, sorted","build":"Ask first\n- Which mailbox, and how far back? (default the main one, the last 24 hours)\n- How do you file mail? (default anything you archive yourself counts as handled)\n- Senders never to drop into \"everything else\"? (default none)\n- How often? (default several times through the day)\n- Where should the brief land? (default a page in your assistant; one email to you a day if none)\n- Do you run a reply drafter too? (default no; if yes, the two share one classifier)\n\nNeeds\n- Mail including archived and labeled threads, not only the inbox. Connecting: \"It reads mail to sort it; it never sends, files or deletes.\"\n- The person's filing labels or folders, so a filed thread is left alone; with none, only the inbox is sorted.\n- A store for the brief as three lists, and something that shows it.\n- If your assistant can only chat: forward or paste the morning's mail and ask for the three piles; steps 3 and 4 apply as written.\n\nBuild\n1. Read: through the day, in windows of the day (morning, afternoon, evening). The first run of a window builds the brief over the window; later runs refresh the same window, skip threads that already have a draft, and send no second message.\n2. Read (scope): search all mail in the window, not only the inbox.\n3. Decide (filed): a thread the person filed themselves (no inbox label, not archived by a rule) never appears in Needs me or Waiting on and never gets a draft.\n4. Decide (sort): needs a reply (a direct question or request to the person from a human: who, what, deadline, plus a question if a choice is needed); waiting on others (the person's last message asks for something and no answer has come); everything else, counted by kind. Use the drafter's classifier if one exists, so tuning one tunes both.\n5. Deliver: the three piles as one structured block, counts in a header. Merge summarizer cards (if any) at display time: an ask joins Needs me, the rest become Everything else lines. Fallback: one message with the three lists.\n6. A Refresh link that fires the agent on the person's own computer, so the mail credential never leaves it. Fallback: wait for the next window.\n7. Memory: the window, the thread ids already placed, the stamp of the last run. One classifier call plus one call to write the brief per run.\n\nCheck\n- Archive a thread yourself and run once with delivery off: it appears in no pile, and the header counts match the lists.\n- Quiet run: no new mail leaves the brief unchanged and moves the stamp; the first real run shows as the stamp. Refresh updates the stamp and sends nothing.\n\nIn my version\n- Gmail, sorted through the day by Q, my assistant, on its server with one Claude API call per run; a Mac run on my subscription can still write it. The brief is a structured block on a Notion page that Q, my assistant, reads; Crux cards merge in; Refresh goes through a bridge on my Mac.","built":{"method":"POST","url":"https://myrunbook.ai/api/runbooks/_bSFet4kFzjy/built","body":{"job":"brief","by_handle":"<your own runbook handle, if you have one>","note":"<what you built, what you changed, what broke; up to 1200 characters>"},"ask_first":"Only send this after the person says yes.","link_for_the_person":"https://myrunbook.ai/jamesraybould/built?routine=3"}}