What the agent does
This is for an independent newsletter publisher: three paid newsletters on local business news, a small editorial team, and a few thousand subscribers per title. Each issue goes out through Resend, and its reply-to address is a receiving address on the publisher's domain that Resend accepts mail for. Readers reply a lot: a correction to a name, a tip about a story, a question about a subscription, an out-of-office, a complaint, a request to stop the emails. An editor used to read every reply in the morning and lose an hour. The agent reads them first and hands the editor a sorted list with drafts.
The publisher's managing editor connects Resend once with POST /me/connections {"type": "mcp", "name": "resend", "url": "https://mcp.resend.com/mcp"} and signs in on Resend's page; Resend's remote server uses OAuth by default. Resend's MCP documentation lists received emails among its tools, to "list and read inbound emails" and download their attachments. The request names resend in connections.
On a run the agent lists received emails sent to the title's reply address since the issue went out. Resend's API reference for that list says it returns at most 100 a page, takes an after or a before email id to page through the rest, and can filter on the to address, and each entry carries from, to, subject, created_at and attachments but not the body, so the agent opens each one by its id to read the text. It skips automatic replies, using the headers and the wording of out-of-office messages, and keeps the rest.
It sorts each reply into one of six piles: correction, story tip, subscription or billing question, unsubscribe request, complaint, and other, quoting the reader's key sentence and the address it came from. For a correction it names the line in the issue it refers to, from the issue text in the request. For tips and questions it drafts a short answer in the publisher's voice. Unsubscribe requests are listed for the managing editor to handle by hand, and complaints get no draft. It writes replies.md and drafts.md, and sends nothing: it does not reply, forward, change a contact or touch a broadcast.
Start it with one API call
POST https://api.phoenix.so/o/{org}/sessions with this body:
{
"agent": "claude",
"input": "Sort the replies to The Harbor Ledger issue #214, sent 2026-11-20 at 06:00 America/New_York, reply address replies@harborledger.example. Use the resend connection, read only. 1) List received emails to replies@harborledger.example created after 2026-11-20T11:00:00Z, following the pagination cursor until older mail. 2) Open each by id for its text and headers. Skip automatic replies (Auto-Submitted header, out-of-office or vacation wording). 3) Classify each into correction, tip, subscription_question, unsubscribe, complaint, other. For corrections, quote the sentence of the issue below that it disputes. Write replies.md: a count per pile, then each reply (from, received time, subject, one-sentence summary, key sentence quoted). Write drafts.md: for tips and subscription questions only, a reply of at most 4 sentences in a warm, plain voice, signed 'The Harbor Ledger desk', with no promise to publish, no refund promised, and no facts not in the reader's email or the issue. Never send, reply, forward or draft in Resend, and never change a contact, segment, topic or broadcast. Issue text: <paste the issue's plain text here>.",
"connections": [
"resend"
]
}- Get an API key. In the console, open Settings, then API keys, and create a key for your org. Send it in the Authorization header as a Bearer token.
- Send the request. POST the body in request.json to https://api.phoenix.so/o/{org}/sessions. The run starts in its own cloud sandbox.
- Read what came back. Follow the run on its live stream or wait for the run.completed webhook, then read the result and its trajectory.
What comes back
The session's artifacts hold replies.md, every human reply to the issue sorted into corrections, tips, subscription questions, unsubscribe requests, complaints and the rest, each with who sent it, when, a one-line summary and the sentence that matters, with corrections tied to the line of the issue they dispute. drafts.md has a short draft answer for each tip and subscription question.
What the editor checks before acting: every correction against the reporter's notes before a correction runs; tips that name a person, which need care before anyone replies; and the unsubscribe requests, which the managing editor handles in Resend by hand so a reader who asked to stop is never missed. Answers go out from the editor's own mail client after editing; the agent sends nothing and changes no subscriber.
Run it on every issue the publisher sends
The publisher's sending script already calls Resend to send each broadcast. After it does, it schedules a job for the next morning that sends POST /o/{org}/sessions with this prompt, the issue number, the send time, the reply address and the issue's plain text, and a request_id that is a UUID v5 of the issue number, so a retried job does not sort the same replies twice.
Three titles mean three runs a week or more, each its own session with its own result. A late reply that arrives after the run is in the next issue's window only if the window starts at the last run, which the publisher can do by passing the previous run's time instead of the send time.
The use case this job follows, with its automation and trigger: Produce a report or file, no repo.
Why run it on Rush?
The Resend sign-in stays in Rush's connection rather than as a full-access API key in a script, which matters because the same account sends to every subscriber. The prompt keeps the agent to reading, and each run's record shows every call it made to Resend, so the publisher can see that no contact, segment or broadcast was touched.
Each run has its own computer, so the readers' emails it opens stay in that session and not on an editor's laptop. The session's total_cost_usd shows what sorting one issue's replies costs, and the publisher can set it against the editor's hour every morning.
Frequently asked questions
Why not let the agent send the drafts?
Resend's server can send and reply, but these replies go to paying readers about the publisher's journalism, and a wrong answer to a tip or a refund question costs trust. The editor sends each one after reading it.
Does it handle unsubscribe requests?
It lists them at the top of the file, with the reader's address, and leaves the change to a person. Removing someone from a segment or topic is a change to who receives the next issue, and the publisher wants that done on purpose.
What if readers reply to the sending address instead?
Only mail Resend receives is visible to the agent, so the issue's reply-to header must point at an address on a domain set up for receiving in Resend. Mail that lands in another inbox is not in the list.
Can it read attachments readers send?
Resend lets the agent list and download received attachments, so a reader's photo of a misprinted chart can be read. The prompt here notes that an attachment exists and leaves opening it to the editor.