All jobs

How Can Recruiting Software Find Next Week's Interviews a Candidate Hasn't Accepted? One Agent per Recruiter, Reading Their Microsoft Calendar

Recruiting software makes one agent per recruiter, signed into their Microsoft calendar, that lists next week's interviews the candidate has not accepted.

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

What the agent does

This is for a company that sells an applicant tracking system to staffing and recruiting agencies. Each recruiter books first-round and client interviews as Outlook meetings from their own Microsoft 365 calendar, with the candidate and the hiring manager invited. Candidates often never answer the invite, and a recruiter with forty interviews in a week finds out on the day that one of them took another offer or never saw the email. The software saves one agent as a template, makes one per recruiter signed into that recruiter's own calendar, and every Friday afternoon each recruiter gets the list of next week's interviews where the candidate has not accepted, while there is still time to call.

The software company connects its own Microsoft calendar first and saves the template with POST /o/{org}/agents, naming microsoft-calendar in connections. When a recruiter turns on the feature, the backend calls POST /o/{org}/agents {"template": "<template id>", "name": "interviews-<recruiter id>"} and POST /o/{org}/agents/{agent}/connections {"type": "app", "name": "microsoft-calendar"}, and the recruiter signs in on Microsoft's own page in a popup. Rush's Microsoft Calendar sign-in asks for Calendars.ReadWrite, so the template's prompt forbids any change to the calendar. The software keeps the agent id against the recruiter.

On a run the agent calls Microsoft Graph's GET /me/calendarView with startDateTime and endDateTime for Monday to Friday next week and a Prefer: outlook.timezone header in the recruiter's zone, which Graph's reference says returns start and end times in that zone rather than UTC. calendarView returns the single instances and occurrences in the range, so a recurring weekly interview slot shows up as each week's meeting. The agent keeps events whose subject starts with the prefix the software puts on interviews, follows @odata.nextLink until the list ends, and skips events marked cancelled.

For each interview it finds the candidate among the attendees by the rule in the request (the attendee whose email is not on the agency's or the client's domain) and reads that attendee's status.response. Graph's reference lists none, organizer, tentativelyAccepted, accepted, declined and notResponded, and says that from the organizer's calendar an attendee who has not answered reads none. The agent lists every interview where the candidate's response is none, notResponded, tentativelyAccepted or declined, with the time, the candidate, the client and the online meeting link if there is one, and drafts a short message for the recruiter to send. It sends nothing and changes no event.

Start it with one API call

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

{
  "agent": "<agent id>",
  "input": "Interview confirmation check for this recruiter. Today is Friday 2026-11-20; time zone America/New_York. Call GET /me/calendarView with startDateTime 2026-11-23T00:00:00-05:00 and endDateTime 2026-11-28T00:00:00-05:00, header Prefer: outlook.timezone=\"America/New_York\", $select subject,start,end,attendees,isCancelled,isOnlineMeeting,onlineMeeting,organizer, following @odata.nextLink. Keep events whose subject starts with 'Interview:' and isCancelled is false. The candidate is the attendee whose email domain is not brightpathstaffing.com and not the client domain written in the subject after ' @ ' (for example 'Interview: Jordan Lee @ acme.com'). Read the candidate's status.response. List every interview where it is none, notResponded, tentativelyAccepted or declined. Return JSON only: {interviews: [{event_id, start, end, candidate_name, candidate_email, client, response, join_url (omit if none), message}]} where message is two short, friendly sentences the recruiter could text the candidate to confirm the time, or for a declined one, to ask whether to reschedule. Read only: never create, update, accept, decline, cancel or delete an event, and never send anything."
}
  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 JSON in the session's result and in the run.completed webhook the software's API key sends: each of next week's interviews the candidate has not accepted, with the time in the recruiter's zone, the candidate, the client, the candidate's response as Graph reports it, the meeting link, and a two-sentence message. The software shows the list on the recruiter's Friday screen with a button to text or email each candidate from its own messaging.

What the recruiter checks before reaching out: a candidate who confirmed by phone or text and never clicked the invite, which is common and which the agent cannot see; a candidate invited from a personal address that differs from the one in the software; and a declined response that was really a request for another time. Sending the message, and moving the interview, stay with the recruiter.

Run it on every Friday afternoon, per recruiter

The software's scheduler sends one POST /o/{org}/sessions per recruiter at two on Friday afternoon in the recruiter's time zone, with the recruiter's agent id as agent, next week's dates in input, and a request_id that is a UUID v5 of the recruiter id and the week, so a retried job does not show the list twice. A second run on Monday morning catches invites sent over the weekend.

An agency group with three hundred recruiters starts three hundred runs on Friday. Runs past the API key's concurrent limit wait queued and start in turn, and each arrives on the webhook, so the scheduler sends them all at once.

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

Why run it on Rush?

Each recruiter signs in on Microsoft's own page, and that sign-in belongs to their agent alone: no run can read another recruiter's calendar, and the software never holds a Microsoft token or registers a Microsoft app. The session's accounts names the mailbox whose calendar each run read, and GET /o/{org}/sessions?account=<email> lists every run that touched it, which an agency's IT team asks for before approving the feature.

Each run has its own computer and a record of every Graph call, so when a recruiter says an interview was missing from the list, the software's support team opens the session and sees what the calendar returned. The total_cost_usd of one recruiter's sessions shows what the check costs per seat, which the software needs to price it.

Frequently asked questions

Why does an unanswered invite read none rather than notResponded?

Graph's reference says notResponded is the attendee's own view and none is how the organizer's calendar reports an attendee who has not answered. The recruiter is the organizer, so the agent treats both as not answered.

Does this need the recruiter to be the organizer?

It reads attendees' responses from the recruiter's own copy of the event, which carries them when the recruiter organized the meeting. For interviews a coordinator books on the recruiter's behalf, connect the coordinator's calendar instead, since that is where the responses are recorded.

Can the agent resend the invite or move the interview?

The sign-in could, since Rush asks for Calendars.ReadWrite, but this template forbids any change. A candidate who has gone quiet usually needs a call, not another invite, and moving a client interview needs the client.

What if a recruiter's Microsoft sign-in stops working?

When Microsoft refuses the stored grant, the recruiter's connection reads needs_reauth in GET /o/{org}/agents/{agent}/connections. The software shows a reconnect button to that recruiter, and the next Friday's run works as before.

More Microsoft Calendar jobs

More jobs like this: Run an agent per customer task

Keep reading