1. Opening Problem Statement
Meet Sarah, an HR manager at a rapidly growing tech startup based in New York City. Every week, Sarah spends upwards of 6 hours manually coordinating interviews for multiple candidates. She juggles emails to check interviewer’s availability, proposes time slots, and manually books calendar events. Errors in double-booking and miscommunications are common, leading to wasted time and candidate frustration.
Sarah’s biggest pain? Managing interview scheduling entirely manually costs her team valuable productivity and risks losing top talent due to slow or confusing coordination. The typical workweek involves back-and-forth email chains and constant calendar checks in Eastern Time zones, magnifying the challenge.
This is where an automated interview scheduler can make a difference by streamlining the whole booking process while accommodating specific business hours and time zones.
2. What This Automation Does ⚙️
When this n8n workflow runs, here is what happens behind the scenes:
- It triggers when a candidate starts a chat with the AI interview assistant (powered by OpenAI GPT-4o Mini).
- Automatically fetches the interviewer’s Google Calendar events for the next week.
- Breaks down existing calendar events into 30-minute blocked time slots (in Eastern Time).
- Generates all possible 30-minute weekday slots between 9 AM and 5 PM EST for the next 7 days.
- Merges the blocked slots with all possible slots to identify free availability.
- Interacts intelligently with candidates, proposing available time slots, requesting contact info (email and phone), and confirming the interview time.
- Creates a Google Calendar event with the candidate’s details once confirmed, preventing double bookings and overlapping meetings.
- Returns a clear confirmation message to the candidate with all interview details.
This automation saves Sarah approximately 5-6 hours weekly by eliminating manual scheduling, reducing errors, and improving candidate experience with instant confirmations.
3. Prerequisites ⚙️
- 🗝️ OpenAI Account: API key with access to GPT-4o Mini model to power the AI chatbot.
- 📧 Google Account with Calendar Access: Your calendar must be accessible via Google Calendar API.
- 🔐 Google Calendar OAuth2 Credentials: Properly set up in n8n credentials to allow calendar reads and event creation.
- 🔐 OpenAI API Credentials: Configured inside n8n for the AI chat nodes.
- 🔌 n8n Automation Platform Account (Cloud or self-hosted) to run the workflow.
Optional: If you want maximum control, you can self-host n8n on platforms like Hostinger.
4. Step-by-Step Guide ✏️
Step 1: Setup Google Calendar OAuth2 in n8n
Go to Credentials in n8n dashboard → Create new → choose Google Calendar OAuth2 API. Follow the instructions to authorize your Google account (e.g., [email protected]). This allows n8n to read your calendar and create events.
Common Mistake: Forgetting to enable calendar API in Google Cloud Console will cause authorization failures.
Step 2: Configure OpenAI Credentials
Go to Credentials → Create new → select OpenAI API and enter your API key with GPT-4o Mini access.
Step 3: Set the Google Calendar Email in the Workflow
Locate any node referencing the calendar email (e.g., Check My Calendar node) and replace [email protected] with your Google Calendar email.
Step 4: Understand the Trigger – Chat Message Received Node
This workflow starts when a candidate sends a chat message to the AI assistant via a public webhook URL exposed by the When chat message received node.
Share this webhook URL with candidates as your scheduling chatbot interface.
Step 5: How Calendar Availability is Retrieved
The Run Get Availability node contains an embedded workflow:
- The Check My Calendar node fetches all calendar events.
- The Split Events into 30 min blocks node breaks events into 30-minute intervals.
- The Add Blocked Field node tags these as “Blocked”.
- The Generate 30 Minute Timeslots node creates all possible free slots during weekdays 9–5 EST.
- The Combine My Calendar with All Slots node merges them to compare occupied vs free slots.
- The Check if Calendar Blocked node filters out blocked slots.
- The Return string of all available times node compiles free slots into a comma-separated string.
Step 6: Candidate Chat – The AI Scheduler Brain
The Interview Scheduler node uses OpenAI GPT-4o Mini to chat with candidates. It:
- Asks for phone, email, preferred date/time.
- Uses get_availability tool to suggest free time slots and validate candidate requested times.
- Utilizes the check_days tool to convert terms like “next Tuesday” into actual dates.
- Once the time is confirmed, outputs structured JSON with interview details.
Step 7: Parsing AI Output to JSON
The Parse to JSON node validates and structures the AI’s output into JSON format containing interview info.
Step 8: Calendar Event Creation
The Set Meeting with Google node creates a calendar event with the interview details, including attendee email and phone notes.
Step 9: Final Confirmation to Candidate
The Final Response to User node sends a human-friendly confirmation with interview time, phone, and email.
Step 10: Testing and Activating Your Workflow
Send a test chat message to your webhook URL. The AI assistant should respond, check availability, and confirm bookings seamlessly.
Tip: Monitor execution logs in n8n for any errors.
5. Customizations ✏️
- Change Business Hours – In the Generate 30 Minute Timeslots code node, update
businessStartHourandbusinessEndHourto your working hours. - Adjust Time Zone – To support other time zones, replace “America/New_York” with your preferred IANA time zone string in code nodes that format dates.
- Customize AI Chatbot Behavior – Edit the Interview Scheduler node’s system message prompt to change questions, tone, or additional rules.
- Update Calendar Email – Replace all hardcoded emails with environment variables for easier deployment across multiple calendars.
- Change Interview Duration – Modify the 30-minute block duration in the Split Events into 30 min blocks and Generate 30 Minute Timeslots nodes if different slot lengths are needed.
6. Troubleshooting 🔧
Problem: “401 Unauthorized” or “Invalid Credentials” for Google Calendar nodes
Cause: OAuth2 credentials not set up correctly or expired token.
Solution: Reconfigure Google Calendar OAuth2 credentials in n8n, ensure the correct Google account is authorized, and refresh tokens.
Problem: AI does not respond or returns unexpected output
Cause: OpenAI API key missing or incorrect, or system message prompt has errors.
Solution: Verify OpenAI API credentials in n8n, and ensure the system message for the Interview Scheduler node is well-formed and matches expected input/output formats.
Problem: Candidate’s requested time overlaps a blocked calendar slot
Cause: The availability logic did not properly merge or filter blocked time slots.
Solution: Check the Combine My Calendar with All Slots and Check if Calendar Blocked nodes to ensure correct join modes and filters are applied.
7. Pre-Production Checklist ✅
- Verify Google Calendar OAuth2 credentials are functional with test reads.
- Test sending chat messages to the public webhook and verify AI responses.
- Check the availability tool returns correct free slots in Eastern Time.
- Confirm calendar events create successfully without overlaps.
- Backup your workflow JSON before activating production runs.
8. Deployment Guide
Activate your workflow by enabling it in n8n. Share the chat webhook URL with candidates for scheduling.
Monitor workflow execution in n8n’s dashboard logs for any issues. Adjust AI prompts or calendar logic as needed.
9. FAQs
Can I use another calendar instead of Google Calendar?
Currently, this workflow is designed specifically with Google Calendar nodes. You’d need to replace or adapt calendar nodes to your preferred calendar API.
Does this automation use OpenAI API credits?
Yes, the AI chatbot nodes call OpenAI GPT-4o Mini model, so monitor your API usage accordingly.
Is candidate data secure?
Only your n8n instance and OpenAI handle candidate data. Ensure your n8n deployment is secure and access-restricted.
Can this system handle many simultaneous scheduling requests?
n8n can scale with higher tiers and self-hosted options, but AI API rate limits may apply. Test load accordingly.
10. Conclusion
By following this guide, you’ve set up an intelligent, AI-powered interview scheduler using n8n, Google Calendar, and OpenAI GPT-4o Mini. This workflow handles candidate conversations, availability checks, and meeting confirmations—all fully automated.
Sarah, our HR manager, will now save nearly 6 hours per week and drastically reduce scheduling errors. Plus, candidates enjoy instant, clear scheduling communication.
Next steps could include adding automated reminders, integrating with HR management systems, or expanding support for multiple interviewers.
Keep experimenting with this powerful automation, and let’s make interview scheduling effortless!