# Prepare a Brief for Every External Meeting on Each Sales Rep's Google Calendar

Sales software makes one agent per rep that reads tomorrow's Google Calendar, researches each outside company's website and returns a one-page brief per meeting.

[Run this on Rush](https://cloud.getrush.ai/run/prepare-meeting-briefs/google-calendar/). Opens the console with this prompt ready to send. Connect Google Calendar there first.

## What the agent does

This is for a company that sells software to sales teams: a CRM, a sales engagement tool, or a deal room for account executives. Reps live in their calendars, and the minutes before a call go to opening the prospect's website and guessing what matters. The company saves one agent as a template that names `google-calendar`, which asks Google for `calendar.readonly` and `calendar.events`, and makes one agent from it per rep who turns the feature on. Each rep connects their own calendar through the `authorize_url` from `POST /o/{org}/agents/{agent}/connections {"type": "app", "name": "google-calendar"}`, opened in a popup inside the sales app.

Each evening the rep's agent reads the next day. It calls the Google Calendar API's `events.list` on the `primary` calendar with `timeMin` and `timeMax` bounding the day, `singleEvents=true` so recurring meetings come back as single instances, and `orderBy=startTime`. It drops events whose `eventType` is `outOfOffice` or `focusTime`, events with a `status` of `cancelled`, and events where the rep's own attendee entry, the one with `self` set, has a `responseStatus` of `declined`.

What is left are meetings, and it keeps the ones with someone from outside: an attendee whose `email` domain is not the rep's own and is not marked as a `resource` room. For each outside domain it opens the company's website in the sandbox's browser and reads what a rep would: the home page, the product pages, the about page, and any news or press page. It notes what the company sells and to whom, anything the site announced recently, and the public names and roles the site lists, matched to the attendees' `displayName` where they agree.

It writes one brief per meeting: the time, the `summary` and `description` from the invite, who is coming from each side, what the company does in two sentences, the recent items from its own site with their links, and three questions worth asking. Everything in a brief comes from the invite or the company's own site, each fact with its link, and the agent writes "not on the site" rather than filling a gap. It creates, changes and replies to no event.

## Start it with one API call

`POST https://api.phoenix.so/o/{org}/sessions`

```json
{
  "agent": "<agent id>",
  "input": "Prepare briefs for meetings on 2026-11-13 in the timezone America/New_York. Read the primary calendar with events.list, singleEvents=true, orderBy=startTime, for that day. Skip outOfOffice and focusTime events, cancelled events, and events I have declined. Keep meetings with at least one attendee whose email domain is not acme-sales.example and who is not a resource. For each outside company, read its website (home, product, about, news or press pages). Return only JSON: one brief per meeting with start time, title, attendees by side, company summary (2 sentences), recent items from its own site with links, public names and roles that match attendees, and 3 questions to ask. Cite a link for every fact; write 'not on the site' where it says nothing. Do not create, edit or respond to any event."
}
```

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, with your repository as the resources URL. 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 JSON list of briefs, in the session's `result` and in the `run.completed` webhook, which carries the result in full up to 16 KiB; a long day's briefs are read in full from `session_url`. The sales app matches the `execution_id` to the rep, then shows each brief on the meeting in its own calendar view or sends the rep a morning digest. A day with no outside meetings comes back as an empty list.

The rep reads the brief before the call and checks anything that will be said out loud. A company's own site can be out of date, and a name on an about page may have changed jobs, so the brief links every fact to where it came from. The transcript keeps every page the agent opened and every Calendar call it made, which is what a sales leader needs before rolling the feature out to the whole team.

## Run it on every evening, per rep

At the end of each rep's working day, in their own timezone, the sales app sends one `POST /o/{org}/sessions` per connected rep with tomorrow's date in `input`. A `request_id` that is a UUID v5 of the rep's id and the date means a retried job returns the run it started rather than doing the research twice.

A meeting booked after the brief ran gets no brief until the next run. Apps that care can also start a run for a single meeting when it is booked, with the event's date and the outside attendee's domain in `input`.

## Why run it on Rush?

This feature needs two things a product's own servers are bad at: holding many reps' Google sign-ins, and running a real browser to read company websites. On Rush each rep's calendar belongs to that rep's agent and to no other run, the token is refreshed by Rush and used from outside the sandbox, and each run has its own computer with a browser for the research.

Evening is when every rep's run starts at once, and Rush runs them in parallel up to the key's concurrent limit, queueing the rest, so the product does not build a job queue of its own. `GET /o/{org}/sessions?agent=<agent id>` lists one rep's runs with their `total_cost_usd`, so the company can see what the feature costs per seat.

## Frequently asked questions

### Why does the template ask for calendar.events if the agent only reads?

The Google Calendar app in Rush asks for both `calendar.readonly` and `calendar.events`, so creating events is possible with the grant. This prompt reads only and says so, and the transcript shows every call a run made.

### Does it research the attendees as people?

It reads the outside company's own website and matches the names and roles listed there to the attendees on the invite. It does not search for individuals elsewhere on the web.

### What about meetings with no outside attendees?

They are skipped. The filter keeps a meeting only when an attendee's email domain differs from the rep's own domain, which the app puts in `input` for each rep.

### Can a rep use a Microsoft calendar instead?

Rush also has a Microsoft Calendar app, read through Microsoft Graph. That would be a second template naming `microsoft-calendar`, with the read step written for Graph's calendar calls.

## More Google Calendar jobs

- [Total Each Consultant's Billable Meeting Hours by Client From Google Calendar](https://getrush.ai/run/total-billable-hours-by-client/google-calendar/)
- [Find Personal-Training Clients With No Next Session Booked in Each Trainer's Google Calendar](https://getrush.ai/run/find-clients-without-a-next-session/google-calendar/)
- [Where Are the Gaps in My Book Next Week? A Salon App Finds Each Stylist's Open Slots From Their Google Calendar](https://getrush.ai/run/find-open-slots-to-fill-next-week/google-calendar/)

## More jobs like this: Run an agent per customer task

- [Propose Interview Times From Each Recruiter's Microsoft 365 Calendar](https://getrush.ai/run/propose-interview-times/microsoft-calendar/)
- [Which Queries Got Slower This Month? A Database Consultancy's PlanetScale Review for Each Client](https://getrush.ai/run/review-each-clients-slow-queries/planetscale/)
- [Review Every Refund Request With Stripe From Your Backend](https://getrush.ai/run/review-refund-requests/stripe/)

## Keep reading

- [Connect Google Calendar to Rush once, then name it on any run](https://getrush.ai/integrations/google-calendar/)
- [Start your first run from the developer API quickstart](https://getrush.ai/docs/quickstart/)
- [Rush pricing: Free, Pro and Max](https://getrush.ai/pricing/)
