This guide explains how the Cal.com API integration and job import functionality work in your recruiting platform.
The integration provides two main features:
- Cal.com Integration: Allows recruiters to connect their Cal.com accounts for automated interview scheduling
- Job Import: Enables recruiters to import job postings from Greenhouse.io URLs
- Connect Cal.com Account: Recruiters can connect their Cal.com account using their API key
- Automatic Event Type Creation: The system creates a "45-Minute Candidate Interview" event type
- Interview Management: View and manage all scheduled interviews in one place
- Import from Greenhouse: Paste a Greenhouse.io job URL to automatically extract job details
- Skill Extraction: AI-powered extraction of required and preferred skills
- Auto-populate Forms: Imported data automatically fills the job posting form
- Self-Service Scheduling: Candidates can schedule interviews directly without recruiter involvement
- Real-time Availability: See recruiter's real-time availability from Cal.com
- Automatic Confirmations: Both parties receive confirmation emails
- Calendar Integration: Easy calendar integration for both parties
Add the following to your .env.local file:
# Cal.com Integration
CAL_API_KEY=your_cal_com_api_key_hereRun the database migration to add the new fields:
pnpm db:migrate- Go to your Cal.com dashboard
- Navigate to Settings → API Keys
- Click "Create API Key"
- Copy the generated key and add it to your environment variables
- Go to your Recruiter Profile page
- Scroll down to the Cal.com Setup section
- Enter your Cal.com API key
- Click Connect Cal.com Account
- Once connected, click Setup Interview Event Type
- Go to Post Job page
- Click Import from URL button
- Paste a Greenhouse.io job posting URL
- Review the extracted information
- Click Use This Job to populate the form
- Make any necessary edits and submit
- Go to your Recruiter Dashboard
- View the Interview Management panel
- Filter interviews by:
- Upcoming
- Today
- Completed
- All
- Click on interviews to view details or join meetings
- Navigate to
/schedule-interview/[jobId](this link should be provided by the recruiter) - Fill in your name and email
- Select an available date
- Choose from available time slots
- Click Schedule Interview
- You'll be redirected to a confirmation page
POST /api/cal_com_api/connect- Connect Cal.com accountPOST /api/cal_com_api/setup- Setup interview event typeGET /api/cal_com_api/slots- Get available time slotsPOST /api/cal_com_api/book- Book an interview
GET /api/convert_from_json- Convert Greenhouse URL to job data
GET /api/recruiter/interviews- Get recruiter's interviewsGET /api/interviews/[id]- Get specific interview details
New fields added:
cal_com_connected- Boolean indicating if Cal.com is connectedcal_com_api_key- Encrypted API key (in production)cal_com_username- Cal.com usernamecal_com_user_id- Cal.com user IDcal_com_schedule_id- Default schedule IDcal_com_event_type_id- Interview event type ID
New fields added:
cal_com_booking_id- Cal.com booking IDcal_com_event_type_id- Event type usedcandidate_name- Candidate's namecandidate_email- Candidate's emailcal_com_data- Full Cal.com booking response (JSON)
- Encrypt API Keys: In production, encrypt Cal.com API keys before storing
- Rate Limiting: Implement rate limiting for API endpoints
- Input Validation: Validate all user inputs, especially URLs
- Access Control: Ensure proper access control for interview data
// Example: Encrypt API keys before storing
import crypto from 'crypto';
const encryptApiKey = (apiKey: string): string => {
const cipher = crypto.createCipher('aes-256-cbc', process.env.ENCRYPTION_KEY);
let encrypted = cipher.update(apiKey, 'utf8', 'hex');
encrypted += cipher.final('hex');
return encrypted;
};-
Cal.com Connection Failed
- Verify API key is correct
- Check if Cal.com account has proper permissions
- Ensure API key hasn't expired
-
Job Import Not Working
- Verify the URL is a valid Greenhouse.io job posting
- Check if the job posting is publicly accessible
- Ensure the URL format is correct
-
Interview Scheduling Issues
- Verify recruiter has connected Cal.com
- Check if event type was created successfully
- Ensure recruiter has availability set in Cal.com
Use these endpoints for debugging:
# Test Cal.com connection
curl -X POST /api/cal_com_api/connect \
-H "Content-Type: application/json" \
-d '{"calComApiKey": "your_api_key"}'
# Test job import
curl "/api/convert_from_json?url=https://boards.greenhouse.io/company/jobs/123456"- Multiple Calendar Providers: Support for Google Calendar, Outlook
- Advanced Scheduling: Recurring interviews, panel interviews
- Interview Templates: Customizable interview types and durations
- Analytics: Interview scheduling analytics and insights
- Automated Reminders: Email and SMS reminders for interviews
- Video Conferencing: Direct integration with Zoom, Teams, Meet
- ATS Integration: Connect with other Applicant Tracking Systems
- Background Checks: Automated background check initiation
- Assessment Tools: Integration with coding assessment platforms
For technical support or questions about the integration:
- Check the troubleshooting section above
- Review the API documentation
- Contact the development team
- Submit issues through the project repository
To contribute to the integration:
- Follow the existing code patterns
- Add appropriate tests for new features
- Update documentation for any changes
- Ensure security best practices are followed