What the agent does
This is for a wholesale distributor of plumbing and heating supplies that sells to contractors and small plumbing shops. Contractors email their inside-sales rep for prices all day: a list of fittings for a job, a boiler model and its lead time, "same as last order but double". Quotes win orders when they go out the same day, and the request that gets missed is the one that arrived at 4:50 p.m. under a delivery complaint. The sales manager wants a list every morning, per rep, of the quote requests still waiting for an answer. The agent writes it, one run per rep, from that rep's own mailbox.
Each rep's mailbox is their own, so the sales operations lead saves the agent once as a template with POST /o/{org}/agents, naming Outlook at the read level, "connections": [{"name": "outlook", "access": "read"}], and makes one agent from it per rep with {"template": "<template id>", "name": "quotes-<rep>"}. Each rep signs in once from the distributor's internal admin page, which calls POST /o/{org}/agents/{agent}/connections {"type": "app", "name": "outlook"} and opens the authorize_url for that rep while they are signed in; Rush's docs say whoever opens the link first connects their account, so it is never emailed. The read level asks Microsoft for Mail.Read and Contacts.Read and not Mail.Send. A run then reads Microsoft Graph as that rep: GET /me/mailFolders/inbox/messages with $filter on receivedDateTime for the last three business days and $select limited to from, subject, receivedDateTime, conversationId and bodyPreview, following @odata.nextLink. Microsoft's reference says the default page is 10 messages and $top raises it to as many as 1,000, so the prompt sets $top to 100.
A quote request is a message from an outside address that asks for a price, availability or lead time on named products; the agent reads the full body of a message only when the preview leaves it unclear. It then reads GET /me/mailFolders/sentitems/messages for the same days, selecting conversationId, toRecipients and sentDateTime. A request with a sent message in the same conversation after it arrived is answered; one with none is waiting. It matches each sender to a customer account with GET /me/contacts, using companyName and the contact's email addresses, and falls back to the sender's domain.
It writes one list per rep, oldest request first: the customer, the person, when it arrived and how many business hours it has waited, the products asked for in the customer's own words, and the subject line so the rep can find it. Requests the rep answered by phone show as waiting, since nothing went out by email, and the rep clears them. The agent drafts no quote and sends nothing; it cannot send, because the read level gives it no Mail.Send.
Start it with one API call
POST https://api.phoenix.so/o/{org}/sessions with this body:
{
"agent": "<agent id>",
"input": "List customer quote requests in my Outlook that have no reply yet. Window: received from 2026-11-11T07:00:00-05:00 to 2026-11-16T07:00:00-05:00. Call GET /me/mailFolders/inbox/messages with $filter receivedDateTime ge 2026-11-11T12:00:00Z and receivedDateTime le 2026-11-16T12:00:00Z, $select from,subject,receivedDateTime,conversationId,bodyPreview, $top 100, following @odata.nextLink. A quote request is from an address outside @northpipe.example and asks for a price, availability or lead time on named products; read the full message only when the preview is unclear. Then call GET /me/mailFolders/sentitems/messages for the same window with $select conversationId,toRecipients,sentDateTime. A request is answered if a sent message in its conversationId is later than it. Match each sender to a company with GET /me/contacts (companyName, emailAddresses), else use the sender's domain. Write waiting-quotes.md, oldest first: company, person, received time, business hours waiting (weekdays 07:00 to 17:00 America/New_York), products asked for quoted from the email, subject. Do not send, reply, move or flag any message."
}- 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, with your repository as the resources URL. 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 returns waiting-quotes.md as an artifact and an answer naming how many requests are waiting and the oldest. The sales manager reads every rep's list at 7:30 a.m. and the rep works it top down; a request that has waited a full business day is the first call of the morning.
What the rep checks: requests they answered by phone or from another mailbox, which show as waiting; messages the agent called quote requests that are really order changes or complaints; and any customer it matched only by domain. The list names what is waiting; pricing and the reply stay with the rep.
Run it on every each weekday morning
The distributor's own scheduler, a small job on its server, sends one POST /o/{org}/sessions per rep at 7:00 a.m. on weekdays with that rep's agent id and the window in input, and a request_id that is a UUID v5 of the rep and the date, so a retried job starts no second run. Every rep's run starts at once, and the key's webhook brings each run.completed to the distributor's endpoint, which posts the list where the sales manager reads it.
When a rep is back from a day on the road, the scheduler sends the same request for that rep's agent with a longer window, to list everything that came in while they were out. Only the template's creator runs the agents made from it, so the rep asks for it through the distributor's own admin page rather than starting it in Rush.
The use case this job follows, with its automation and trigger: Produce a report or file, no repo.
Why run it on Rush?
Each rep's mailbox is read with that rep's own Microsoft sign-in, stored in Rush's connection under that rep's agent at the read level the template names: no shared mailbox password, no forwarding rule copying every rep's mail to a manager, and no token in a script. Each session lists the Microsoft account it read in accounts, so the distributor can show a rep exactly which runs opened their mailbox.
Each run has its own computer and a record of every Graph call and what its model calls cost, and runs for every rep start together at 7:00. Because each morning is its own session, the sales manager can look back at how long requests waited across a quarter without anyone keeping a spreadsheet.
Frequently asked questions
Could the agent send a reply or a quote?
Not with the read level, which asks Microsoft for Mail.Read and Contacts.Read only. Rush's docs note that Microsoft issues a token with every Outlook permission a person has granted Rush, so a rep who once connected Outlook with sending allowed could carry more; the prompt forbids sending and moving mail either way.
What about a shared sales mailbox?
Rush's Outlook sign-in asks for Mail.Read, the signed-in person's own mail, and not Microsoft's permission for mail shared with them, so this check reads each rep's own mailbox. When quote requests arrive at a shared address, a mail rule that forwards them to the rep on duty brings them into a mailbox the check reads.
Why does a request I answered by phone show as waiting?
The agent knows a request is answered only when a sent email in the same conversation follows it. A one-line email confirming the phone call clears it, and also gives the customer the price in writing.
Does it read every email in my inbox?
It lists the window's messages with only their sender, subject, time, conversation and a short preview, and opens a full message only when the preview does not say whether it asks for a quote. The transcript records every message it opened.