All jobs

Turn a Week of Carrier Renewal Emails in Outlook Into One Renewal List for Your Agency

An insurance agency's agent reads a week of carrier renewal and non-renewal emails in Outlook, opens the attached notices, and lists each policy by effective date.

Run this on RushOpens the console with this prompt ready to send. Connect Outlook there first.

What the agent does

This is for an independent insurance agency of a dozen people that writes business and personal policies with several carriers. Every carrier emails renewal offers, premium change notices and non-renewal notices to the agency's service mailbox, each in its own format, often as a PDF attached to a one-line email. The account managers need one list every Monday: which policies renew in the next 60 days, which carriers will not renew, and which premiums changed, so they can call the client in time. The agency saves an agent with POST /o/{org}/agents whose connections are [{"name": "outlook", "access": "read"}]. The read level asks Microsoft for Mail.Read and Contacts.Read only, because this job never sends. The person who made the API key first connects the service mailbox with POST /me/connections {"type": "app", "name": "outlook"} and finishes the sign-in on Microsoft's page while signed in to the Rush console.

The agent reads the mailbox through Microsoft Graph. It calls GET /me/messages with a $search that combines subject:renewal, subject:nonrenewal, subject:non-renewal and subject:"premium change" with OR, and a received clause for the last seven days. Microsoft's guide says a $search on messages returns up to 1,000 results sorted by sent date, so an agency whose week holds more than that runs it daily instead. It asks with $select for the subject, sender, received time and hasAttachments, so it reads only what it needs.

For each message with an attachment it calls GET /me/messages/{id}/attachments and reads the PDF notices in its sandbox. From each notice it takes the carrier, the named insured, the policy number, the line of business, the effective date, the kind of notice (renewal offer, non-renewal, premium change), and the current and renewal premium when the notice states them. Notices that come as text in the email body are read from the body instead. Anything it cannot read, a scanned page with no text or a password-protected PDF, goes in a separate list with the email's subject and sender.

It sends nothing and drafts nothing to clients. What a client should do about a premium change or a non-renewal is the account manager's advice to give, so the list states what each carrier's notice says and leaves the recommendation out.

Start it with one API call

POST https://api.phoenix.so/o/{org}/sessions with this body:

{
  "agent": "<agent id>",
  "input": "Weekly carrier notice list. Today is 2026-11-23. Call GET /me/messages with $search=\"subject:renewal OR subject:nonrenewal OR subject:non-renewal OR subject:\\\"premium change\\\"\" limited to mail received since 2026-11-16, $select=id,subject,from,receivedDateTime,hasAttachments, following @odata.nextLink. For each message with attachments, call GET /me/messages/{id}/attachments and read each PDF; otherwise read the body. Extract carrier, named insured, policy number, line of business, effective date, notice type (renewal offer, non-renewal, premium change), current premium and renewal premium if stated. Return Markdown: Non-renewals first, then renewals effective in the next 60 days sorted by effective date with premium change in currency and percent, then other notices; then a list of messages you could not read with subject, sender and why. State only what each notice says; give no recommendation. Do not send, reply, forward, move or flag any message."
}
  1. 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.
  2. 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.
  3. 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 answer is a Markdown list in three parts. Non-renewals come first, because they have the least time to place the policy elsewhere. Then renewals effective in the next 60 days in date order, each with the carrier, the insured, the policy number, the line, and the premium change in money and percent where the notice gave both premiums. Then any other carrier notices, and finally the emails the agent could not read, with why.

An account manager checks each line against the attached notice before calling a client, because a policy number misread from a PDF or a premium taken from the wrong row of a table changes the conversation. The agency compares the list with its management system for the first few weeks, to find carriers whose subject lines do not use any of the search words and add them to the prompt.

Run it on every Monday morning

In the console, give the saved agent an automation with a schedule trigger, a cron such as 0 7 * * 1 and the agency's timezone, so the list is ready before the Monday team meeting; a schedule fills nothing into the prompt, so the saved prompt says "today" and "the last seven days" in place of the dates. Automations need Pro or Max. An agency that schedules from its own systems sends POST /o/{org}/sessions with the agent's id as agent and the week's dates in input, and a request_id that is a UUID v5 of the week's start date, so a retried job does not start a second run.

An agency that wants to see non-renewals the day they arrive runs the same agent daily with a one-day window, and keeps the Monday run for the full list.

The use case this job follows, with its automation and trigger: Produce a report or file, no repo.

Why run it on Rush?

Reading carrier PDFs is the part a script does badly: every carrier lays out its notice differently and changes it without warning. An agent reads each one as a person would, and opens them in the run's own computer, not on someone's laptop. The mailbox sign-in stays in Rush's connection at the read level, so the agent's token is asked for reading mail and contacts alone.

Each week's list is a session with a record: which messages the search found, which attachments were opened and what was taken from each. When a client asks why their renewal call came late, the agency can open that week's run and see whether the notice was in the mailbox, alongside the run's cost.

Frequently asked questions

Can the agent send anything from the agency's mailbox?

It is asked not to, and the saved agent names Outlook at the read level, so Rush asks Microsoft only for Mail.Read and Contacts.Read when it refreshes the token. Rush's quickstart notes that Microsoft issues a token with every Outlook permission the person has granted Rush, so if the same account was ever connected with sending allowed, the prompt's rule still matters.

What if a carrier's subject line says something else, like "policy expiring"?

Add it to the $search in the prompt, joined with OR. The list of unreadable or unexpected emails at the end of each report is where those show up the first time.

Does this give advice on which carrier to move a client to?

No. The prompt tells the agent to state only what each notice says. Choosing coverage and carriers stays with the licensed account manager.

Where do the attached PDFs go?

The agent reads them inside its sandbox to fill the list. Rush keeps a session's transcript and tool results for 24 months, readable by whoever started it and the org's owner and admins, because it used a connected account.

More Outlook jobs

More jobs like this: Produce a report or file, no repo

Keep reading