All jobs

Which of Next Week's Home Inspections Are Missing an Address or Access Notes? Scheduling Software With One Agent per Inspector's Google Calendar

Home inspection software makes one agent per inspector's Google Calendar that flags next week's inspections missing an address, access notes or travel time.

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

What the agent does

This is for a company that sells scheduling and reporting software to home inspectors, most of them one- or two-person businesses who keep their week in Google Calendar. Bookings arrive from the software, from a buyer's agent by phone and from the inspector's own website, and many land in the calendar typed by hand on a phone: "Inspection - Patel" with no address, a 9:00 in one suburb followed by a 10:30 forty minutes away, a vacant house with nothing about how to get in. The inspector finds out at the kerb. The software adds a Sunday evening check: each inspector gets a list of next week's inspections that need fixing before Monday.

The company connects a Google account of its own and saves the agent once as a template with POST /o/{org}/agents, naming google-calendar in connections, with instructions that allow reading only. When an inspector turns the check on, the backend calls POST /o/{org}/agents {"template": "<template id>", "name": "calendar-check-<inspector id>"}, then POST /o/{org}/agents/{agent}/connections {"type": "app", "name": "google-calendar"}, and opens the authorize_url in a popup while the inspector is signed in to the software. The inspector signs in on Google's own page. Google Calendar has no read-only level in Rush, so the sign-in also allows creating events, and the template's instructions forbid every write.

On a run the agent calls the Google Calendar API's events.list on the inspector's primary calendar with timeMin and timeMax set to Monday 00:00 and Sunday 23:59 in the inspector's time zone, singleEvents set to true so repeating holds come back as separate events, and orderBy startTime. It treats an event as an inspection when its title or description matches the words the inspector uses, which the software passes in the prompt ("inspection", "radon", "sewer scope", "re-inspect").

For each inspection it checks four things. The event's location must be a street address with a number and a town, not empty, not a surname and not "TBD". When the inspector has asked for access notes, the description must say how they get in: the listing agent meeting them, a lockbox, or the seller at home. The gap to the next event must allow the travel time the inspector set in the software. And when the buyer's agent is an attendee, their responseStatus must not be declined or still needsAction two days before. It returns one list per inspector and never creates, moves or deletes an event.

Start it with one API call

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

{
  "agent": "<agent id>",
  "input": "Weekly calendar check for this inspector. Next week: Monday 2026-11-30 00:00 to Sunday 2026-12-06 23:59, time zone America/Denver. Inspection keywords: inspection, radon, sewer scope, re-inspect, mold. Minimum gap between inspections: 45 minutes. Access note required: yes. Read only. 1) events.list on calendar primary with timeMin and timeMax above, singleEvents true, orderBy startTime, following nextPageToken. 2) Keep events whose summary or description contains a keyword (case-insensitive); skip events the inspector declined. 3) For each inspection check: location is a street address with a number and a town (flag if empty, a name only, or TBD); description says how to get in (listing agent meeting, lockbox, seller home, tenant home) - flag if none, and never repeat a lockbox code if one is written; the gap from the end of the previous event that day to this start is at least 45 minutes (flag with both events' times); every attendee other than the inspector has responseStatus accepted or tentative (flag declined, and needsAction when the inspection is within 2 days of Monday). Return JSON only: {inspections_checked, problems: [{event_id, start, summary, location (omit if empty), problems: [one short sentence each], html_link}]}, ordered by start. Never create, update, move or delete an event, and never email attendees."
}
  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 agent lists next week's inspections missing an address or access notes, each with its time, what is wrong and a link to the event. The answer is JSON in the session's result and in the run.completed webhook the company's API key sends: how many inspections the agent checked, and for each one with a problem the event's title and its htmlLink, so the inspector taps straight through to fix it in Google Calendar. The software shows the list on its Monday dashboard and in the Sunday evening email it already sends.

What the inspector checks: an event the agent counted as an inspection that is not one (a dentist appointment titled "Inspection of crown"), an address the agent flagged that is right but written in a local way, and a tight gap that is fine because the two houses are on the same street. The fixes are made by the inspector, in their own calendar.

Run it on every Sunday evening, per inspector

The software's scheduler sends one POST /o/{org}/sessions per inspector at six on Sunday evening in the inspector's time zone, with that inspector's agent id as agent, next week's dates, their keywords and their travel gap in input, and a request_id that is a UUID v5 of the inspector id and the week, so a retried job does not check the same week twice.

An inspector who adds a batch of bookings on Wednesday can press "check my week" in the software, which sends the same request with the rest of the week as the window. Runs past the key's concurrent limit wait queued and start in turn, so a thousand Sunday checks need no queue of the company's own.

The use case this job follows, with its automation and trigger: Run an agent per customer task.

Why run it on Rush?

Each inspector signs in on Google's page, and that sign-in belongs to their agent alone: one inspector's run can never read another's calendar, and the company's own runs never see any of them. The company registers no Google application, holds no Google token and stores only the agent id beside the inspector. An inspector who cancels is one DELETE /o/{org}/agents/{agent}, which disconnects their calendar.

Each run has its own computer and a record of every Calendar call, so when an inspector asks why a booking was flagged, support opens that Sunday's session and sees the event as the agent read it. The session's accounts names the Google account each run used, and adding up total_cost_usd over GET /o/{org}/sessions?agent=<agent id> gives what the check costs per inspector.

Frequently asked questions

Why can the sign-in create events if the agent only reads?

Rush's Google Calendar connection asks Google for reading calendars and creating events together; access levels exist only for Gmail and Outlook. The template's instructions forbid every write, and the run's record shows every call it made.

Does it work for inspectors who book in a shared office calendar?

The prompt names the calendar to read. Change primary to the shared calendar's id when the inspector's bookings live there, as long as their Google account can open it.

Will the agent ever show a lockbox code?

The prompt tells it to check that access is described and never to repeat a code it finds. Many inspectors keep codes out of calendar events entirely, and the check only needs to know that an access arrangement is written down.

What about inspections booked in the software itself?

Those already have an address and access notes in the software, so the company can leave them out by passing their event ids, or by checking only events the software did not create.

More Google Calendar jobs

More jobs like this: Run an agent per customer task

Keep reading