Guide

Automate Interview Scheduling from the CLI

Scheduling a panel interview means finding one slot that fits a candidate and several interviewers, then chasing confirmations. This guide finds the shared slot, books it with calendar invites, and sends a confirmation and a timed reminder — the whole loop as one script.

Written by Aaron de Mello Senior Engineering Manager

Reviewed by Qasim Muhammad

VerifiedCLI 3.1.17 · Google, Outlook · last tested June 9, 2026

How do I find a time that works for the candidate and the panel?

You find a shared slot by passing the candidate and every interviewer to nylas calendar availability find with --participants. The command returns only the windows when all of them are free, so a 5-person panel collapses to a single query instead of five separate calendar checks.

# 45-minute slots all four people share, next 5 business days
nylas calendar availability find \
  --participants candidate@example.com,lead@company.com,eng@company.com,hm@company.com \
  --duration 45 --interval 30 \
  --start "monday 9am" --end "friday 5pm" \
  --json

Set --duration to the interview length and --interval to the boundary you want slots to fall on. The more interviewers you add, the fewer shared windows exist, so a tight panel often needs a wider search range — widen --end before you loosen the duration.

How do I book the interview and invite everyone?

You book the slot with nylas calendar events create, repeating --participant once per attendee. Every participant receives a real calendar invite they can accept, and the event lands on the organizer's primary calendar by default. One command replaces the manual create-and-forward step.

nylas calendar events create \
  --title "Onsite — Backend Engineer" \
  --start "2026-06-15 14:00" --end "2026-06-15 14:45" \
  --location "Google Meet" \
  --participant candidate@example.com \
  --participant lead@company.com \
  --participant eng@company.com

How do I send a confirmation and a reminder?

Send the confirmation immediately with nylas email send, then queue a reminder for the day before using the --schedule flag, which accepts relative times like 1d or an absolute timestamp. No cron entry and no reminder service — the send is queued provider-side.

# Confirmation now
nylas email send --to candidate@example.com \
  --subject "Interview confirmed: Mon 2:00 PM" \
  --body "You're set for Monday at 2:00 PM. Calendar invite sent separately." --yes

# Reminder, delivered 1 day before the interview
nylas email send --to candidate@example.com \
  --subject "Reminder: interview tomorrow at 2:00 PM" \
  --body "Looking forward to it. Join link is in your calendar invite." \
  --schedule "2026-06-14 14:00" --yes

How do I handle a reschedule request?

Handle a reschedule by updating the existing event rather than deleting and recreating it, which preserves the invite thread and re-notifies attendees. The nylas calendar events update command takes the event ID and the new start and end, and the calendar sends each participant the change. Re-run availability first to confirm the new window is open for all attendees.

# Move the interview after re-checking the panel is free
nylas calendar events update "$EVENT_ID" \
  --start "2026-06-16 11:00" --end "2026-06-16 11:45"

How do I run the whole loop as a script?

The full loop chains the four steps: find a shared slot, take the first one, create the event with invites, and send the confirmation. The script below does exactly that and exits cleanly if no shared slot exists in the window — the one case worth handling explicitly, since a tight panel can genuinely have zero overlap in a given week.

#!/usr/bin/env bash
set -euo pipefail
PANEL="lead@company.com,eng@company.com,hm@company.com"
CANDIDATE="candidate@example.com"

SLOTS=$(nylas calendar availability find \
  --participants "$CANDIDATE,$PANEL" \
  --duration 45 --start "monday 9am" --end "friday 5pm" --json)

[ "$(echo "$SLOTS" | jq 'length')" -eq 0 ] && { echo "no shared slot this week"; exit 0; }

START=$(echo "$SLOTS" | jq -r '.[0].start_time')
END=$(echo "$SLOTS" | jq -r '.[0].end_time')

nylas calendar events create --title "Onsite interview" \
  --start "$START" --end "$END" \
  --participant "$CANDIDATE" --participant lead@company.com

nylas email send --to "$CANDIDATE" \
  --subject "Interview confirmed" \
  --body "Your interview is booked. Invite sent to your calendar." --yes

Next steps