HR interview coordinator
Learn how to build an AI agent that schedules interviews, sends professional emails, and coordinates with your team using Google Calendar and Gmail
Note
What You'll Build: An intelligent interview coordinator that automatically schedules interviews, sends confirmation emails to candidates, notifies your interview panel, and handles all follow-up communications.
Introduction
Coordinating interviews involves juggling multiple calendars, sending professional emails, and ensuring everyone has the right information at the right time. This tutorial shows you how to build an AI-powered interview coordinator that handles all of this automatically.
The bot will:
- Check calendar availability (using the authenticated user's calendar)
- Create calendar events with multiple attendees
- Send professional confirmation emails to candidates
- Notify interview panel members with prep materials
- Request feedback from interviewers after completion
By the end of this tutorial, you'll have a working interview coordinator that can handle the entire scheduling and communication workflow with natural language commands.
Info
What You'll Learn:
- Deploying Google Calendar and Gmail providers
- Setting up OAuth for multiple Google services
- Creating an AI agent that coordinates between multiple tools
- Sending professional, AI-generated emails
- Managing complex multi-step workflows with Claude
Prerequisites
Before starting, make sure you have:
- Metorial Account: Sign up and get your API key
- Google Workspace Account: With Calendar and Gmail access
- Anthropic API Key: Get one from Anthropic Console
- Development Environment: Node.js 18+ or Python 3.9+
Architecture overview
Here's how the interview coordinator works:
- User provides interview details (candidate, role, date preferences, interviewers)
- AI checks calendar availability using the Google Calendar provider (checks the authenticated user's calendar)
- AI creates calendar event and adds interviewers as attendees
- AI sends confirmation email to candidate via Gmail
- AI sends prep email to interview panel via Gmail
Tools used: Google Calendar provider (scheduling) + Gmail provider (communications) + AI Model (coordination)
The AI autonomously decides which tools to use and in what order, handling complex multi-step workflows without explicit programming.
Step 1: Configure Google Calendar provider
First, configure the Google Calendar provider from the Metorial catalog:
Navigate to provider catalog
Go to platform.metorial.com and click Providers
Find Google Calendar
Search for "Google Calendar" in the catalog
Create an integration
Open the provider, click Use Provider → Integration, then note the provider deployment or integration ID shown in the dashboard.
Note
Save your Calendar deployment ID - you'll need it in Step 3. It looks like: pdp_abc123def456
Note on Multiple Interviewers: This deployment accesses one Google Calendar (the authenticated user's calendar). To check availability across multiple interviewers' calendars, each interviewer would need their own Calendar provider deployment and auth config. For simplicity, this tutorial uses a single calendar instance.
Step 1b: Configure Gmail provider
Next, configure the Gmail provider for email communications:
Search for Gmail
In the same catalog, search for "Gmail"
Create an integration
Open Gmail, click Use Provider → Integration, and note your Gmail provider deployment or integration ID.
Note
You now have two providers deployed. Both will run in the same session, allowing the AI to coordinate between scheduling and email tools seamlessly.
Step 2: Set up OAuth authentication
Both Calendar and Gmail require OAuth authentication to access your Google Workspace.
Install dependencies
Create OAuth setup script
Authorize in browser
Visit both URLs in your browser and complete the Google OAuth flow for Calendar and Gmail access. The script will wait for you to authorize before continuing.
Save auth config IDs
The script outputs your auth config IDs (starting with pac_). Save these for use in Step 3.
Note
OAuth Scopes: Calendar needs calendar.events and calendar.readonly. Gmail needs gmail.send and gmail.readonly. These are configured automatically by Metorial.
Step 3: Build the interview coordinator
Now let's build the main coordinator that orchestrates interview scheduling and communications.
Note
Key Implementation Details:
- Single Session: Both Calendar and Gmail servers run in one session, allowing the AI to seamlessly switch between scheduling and emailing tools
- Agentic Workflow: The AI autonomously decides which tools to use and in what order - no explicit programming needed
- Anti-Hallucination: The prompt explicitly instructs using only actual calendar data to prevent AI from making up availability
- Professional Communications: AI generates context-appropriate emails for candidates and interviewers
Important
Multiple Interviewer Calendars: The current implementation uses a single Google Calendar provider instance, which only accesses one Google Calendar (the calendar of the authenticated user). To check availability across multiple interviewers' calendars, you would need to:
- Deploy a separate Calendar provider instance for each interviewer
- Set up OAuth for each interviewer's calendar
- Pass multiple calendar provider deployments to the session
For now, this tutorial demonstrates scheduling with a single calendar owner who can view their own availability. The interviewers array is used for adding attendees to the calendar event and sending prep emails, but not for checking their individual calendar availability.
Email templates
The AI automatically generates professional emails tailored to each recipient. Here are examples of what the coordinator sends:
Step 4: Test the coordinator
Let's test the coordinator with a realistic scenario:
Expected Output:
The coordinator will:
- Check availability on the authenticated user's calendar (not all 3 interviewers - see note below)
- Find the first available slot (Feb 15 at 1:00 PM)
- Create a 90-minute calendar event with all 3 interviewers as attendees
- Send confirmation email to Alex with interview details
- Send prep email to all interviewers with candidate info
Note
Calendar Availability Limitation: This example checks only the authenticated user's calendar availability. To check all 3 interviewers' calendars, you would need to deploy a separate Calendar MCP instance for each interviewer with their OAuth credentials. The interviewers array is used for adding attendees to the event and sending emails, not for checking their individual availability.
Troubleshooting
Advanced customization
Customize email templates based on role, interview type, or company culture:
Pass templates to your prompt for context-aware emails.
Coordinate complex interview pipelines:
Schedule phone screen, technical, and panel interviews in sequence.
Request and aggregate interviewer feedback:
Automate post-interview feedback workflow.
Respect interviewer working hours and preferences:
Include preferences in AI prompt for smarter scheduling.
Send emails in candidate's preferred language:
AI automatically generates emails in requested language.
Check availability across multiple interviewers' calendars:
Each interviewer needs their own Calendar MCP instance with OAuth.
Production considerations
Before deploying to production:
Error handling
Add comprehensive error handling for common failures:
Monitoring and logging
Track key metrics for reliability:
- Interview scheduling success rate
- Email delivery rate
- Calendar availability check duration
- AI tool call patterns
Use Metorial's built-in monitoring to track these metrics.
Testing strategy
Test edge cases before production:
- All interviewers unavailable on all dates
- Invalid email addresses
- Time zone edge cases (DST transitions)
- Calendar quota limits
- Gmail sending limits
Privacy and compliance
Ensure GDPR/CCPA compliance:
- Get consent before sending emails
- Don't store candidate data longer than necessary
- Encrypt sensitive information in transit and at rest
Scalability
For high-volume hiring:
- Implement request queuing to avoid rate limits
- Cache calendar availability queries
- Batch similar operations
- Use Metorial's webhook support for async processing