Create a Calendly Availability API Endpoint for Real-time Scheduling Data
This n8n template implements a Calendly Availability Checker that provides real-time availability information for your Calendly event types via a simple API endpoint
Who's it for
This template is designed for developers, businesses, and service providers who need to programmatically check Calendly availability. It's perfect for:
Web developers** building custom booking interfaces that need real-time availability data Chatbot developers** who want to suggest available times to users Website builders** who want to display available slots on their site Integration developers** who need to check availability before creating bookings Businesses** that want to build custom scheduling experiences on top of Calendly Service providers** who need availability data for their own applications or dashboards
How it works / What it does
This workflow creates a RESTful API endpoint that returns real-time availability information from your Calendly account. The system:
Accepts webhook requests via POST with optional parameters: event_type_uri (optional) - Specific event type to check days_ahead (optional, default: 7) - Number of days to check ahead
Authenticates with Calendly API using OAuth2 credentials to access your account
Retrieves user information to get your Calendly user URI and account details
Lists all active event types from your Calendly account
Selects the target event type: Uses the event_type_uri from the request if provided Otherwise defaults to the first active event type
Fetches available time slots from Calendly's availability API for the specified date range
Formats the availability data into a structured response including: Total number of available slots Next available slot (formatted and ISO timestamp) Array of all available slots with formatted times and booking URLs Slots grouped by day for easy consumption Complete list of all event types
Returns a comprehensive JSON response with all availability information ready for integration
How to set up
-
Configure Calendly OAuth2 Credentials Go to calendly.com/integrations Click "API & Webhooks" Create an OAuth2 application or use Personal Access Token In n8n, create a new credential: Type: "Calendly OAuth2 API" Follow the OAuth flow to connect your Calendly account The credential will be used by all HTTP Request nodes in the workflow
-
Activate the Workflow Open the workflow in n8n Ensure the Calendly OAuth2 credential is properly configured Activate the workflow to make the webhook endpoint available
-
Test the Workflow Use the "Test workflow" button in n8n to manually trigger it Or send a POST request to the webhook URL: { "event_type_uri": "optional-event-uri", "days_ahead": 7 } Verify the response contains availability data Check that the "Get Current User" node successfully retrieves your account info
-
Customize (Optional) Adjust the default days_ahead value in the "Set Configuration" node (currently 7 days) Modify the date range calculation in "Get Available Times" node Customize the response format in "Respond with Availability" node Add filtering logic to select specific event types Add caching to reduce API calls
Requirements
Calendly account** with at least one active event type n8n instance** (self-hosted or cloud) Calendly OAuth2 API credentials** configured in n8n Webhook access** (if using n8n cloud, webhooks are automatically available)
How to customize the workflow
Modify Date Range Edit the "Set Configuration" node to change the default days_ahead value Update the start_time and end_time calculations in "Get Available Times" node Currently checks from tomorrow (1 day ahead) to 7 days ahead by default Adjust the date calculation expressions as needed
Filter Specific Event Types Modify the "Select Event Type" node to add filtering logic Add an IF node to check event type names or slugs Filter by duration, active status, or custom criteria Return multiple event types if needed
Customize Response Format Edit the "Respond with Availability" node to change the JSON structure Add or remove fields from the response Format dates/times differently Include additional metadata from event types Add pagination for large slot lists
Add Caching Insert a Code node before "Get Available Times" to check cache Store availability data temporarily to reduce API calls Set appropriate cache expiration times Consider using n8n's built-in cache or external storage
Add Error Handling Enhance error handling in HTTP Request nodes Add validation for request parameters Return meaningful error messages in the response Handle cases where no event types exist Handle cases where no availability exists
Integrate with Other Services Add nodes to log availability checks to a database Send availability data to analytics platforms Trigger notifications when availability changes Sync availability with external calendars Build availability dashboards
Key Features
RESTful API endpoint** - Simple POST endpoint for checking availability Real-time availability** - Fetches current availability directly from Calendly API Flexible event type selection** - Supports specific event type or auto-selects first available Configurable date range** - Customizable number of days to check ahead Comprehensive response format** - Returns formatted and raw availability data Multiple data views** - Provides slots as array, grouped by day, and summary statistics Event type information** - Includes details about all available event types Human-readable formatting** - Formats dates and times for easy display Booking URLs included** - Each slot includes direct booking URL Error resilience** - Nodes configured with continueRegularOutput to handle API errors gracefully
Use Cases
Custom booking widgets** - Display available slots on your website without embedding Calendly Chatbot integration** - Let AI assistants suggest available times to users Mobile app integration** - Check availability before showing booking options in mobile apps Multi-calendar systems** - Aggregate availability from multiple Calendly accounts Availability dashboards** - Build internal dashboards showing team availability Smart scheduling** - Check availability before sending meeting invitations Booking confirmation flows** - Verify availability before processing bookings Calendar sync verification** - Ensure Calendly availability matches other calendar systems Analytics and reporting** - Track availability patterns and booking trends Custom scheduling UIs** - Build completely custom scheduling interfaces using availability data
Data Fields Returned
User Information User name, email, scheduling URL User URI and organization URI
Event Type Information Event type name, duration (minutes), URI Complete list of all active event types with details
Availability Summary has_slots - Boolean indicating if any slots are available total_slots - Total number of available slots next_available - Human-readable formatted string of next available slot next_available_iso - ISO 8601 timestamp of next available slot
Available Slots Array Each slot includes: start_time - ISO 8601 timestamp formatted - Human-readable date/time string booking_url - Direct URL to book this specific slot
Slots by Day Grouped object with days as keys Each day contains array of time slots with formatted times and booking URLs Format: { "Monday, Dec 2": [{ time: "10:00 AM", url: "..." }] }
Metadata checked_at - ISO timestamp of when availability was checked success - Boolean indicating successful execution
Workflow Architecture
The workflow uses a linear processing pattern with data transformation at each step:
Webhook Trigger → Receives POST requests with optional parameters Set Configuration → Extracts and sets default values for event_type_uri and days_ahead Get Current User → Authenticates and retrieves Calendly user information Extract User Info → Parses user data to extract URIs and account details Get Event Types → Fetches all active event types for the user Select Event Type → Chooses target event type (from request or first available) Get Available Times → Queries Calendly API for available time slots Format Availability → Transforms raw API data into structured, formatted response Respond with Availability → Returns comprehensive JSON response to caller
Example Scenarios
Scenario 1: Check Default Availability Developer sends POST request to webhook endpoint with empty body Workflow uses default 7-day lookahead period Workflow selects first active event type automatically Returns availability for next 7 days with all slots formatted Developer displays slots in custom booking interface
Scenario 2: Check Specific Event Type Developer sends POST request with specific event_type_uri Workflow uses provided event type instead of default Checks availability for that specific event type only Returns slots grouped by day for easy calendar display Developer shows availability in day-by-day calendar view
Scenario 3: Extended Date Range Developer sends POST request with days_ahead: 30 Workflow checks availability for next 30 days Returns comprehensive list of all available slots Developer uses data to show monthly availability view User can see all available times for the next month
Scenario 4: Chatbot Integration User asks chatbot "When are you available?" Chatbot calls webhook endpoint to get availability Workflow returns next available slot and total count Chatbot responds: "I have 15 slots available. Next available: Monday, Dec 2 at 10:00 AM" Chatbot offers to book the next available slot
This template provides a powerful API endpoint for checking Calendly availability, enabling developers to build custom scheduling experiences while leveraging Calendly's robust scheduling infrastructure.
Related Templates
AI Agent: Scrape, Summarize & Save Articles to Notion (Gemini, Browserless)
This n8n workflow automates the process of saving web articles or links shared in a chat conversation directly into a No...
USDT And TRC20 Wallet Tracker API Workflow for n8n
Overview This n8n workflow is specifically designed to monitor USDT TRC20 transactions within a specified wallet. It u...
Send structured logs to BetterStack from any workflow using HTTP Request
Send structured logs to BetterStack from any workflow using HTTP Request Who is this for? This workflow is perfect for...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments