Appointment Scheduling Router using Cal.com API - n8n Workflow

Use this robust n8n workflow template to manage voice-based appointment booking systems, routing requests to check availability or book slots using the Cal.com API. Leverage n8n conditional logic.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

This n8n workflow is ideal for:

Developers building voice-activated or AI-driven scheduling tools.
Businesses using Cal.com that need a flexible, API-driven middleware layer.
n8n users looking for advanced examples of conditional routing based on webhook payloads.
Automation specialists seeking reusable n8n templates for CRM integration.

Overview

Managing complex scheduling logic requires a centralized routing system. This specific n8n workflow solves the problem of integrating conversational AI agents (which might ask if a time is available, or proceed directly to booking) with a robust scheduling API like Cal.com.

By deploying this n8n automation, you create a single, efficient endpoint (the n8n trigger) that intelligently routes the request. Based on the tool parameter sent in the payload, the n8n node logic determines whether to query Cal.com for available slots or execute a full booking operation. This highly efficient design minimizes complexity in the calling application and showcases the power of the n8n platform for operational tasks.

How it Works

This automation starts with a powerful n8n trigger, the Webhook, configured to listen for POST requests at a specified path (appointment-webhook).


  1. Incoming Request: The process begins when an external system (e.g., an AI agent) sends a request containing details like desired time (startTime) and the required action (tool).

  2. Conditional Routing (If n8n node): The Check Is Request For Available Slot n8n node acts as a router. It checks if the tool parameter in the body equals checkAvailableSlot.

  3. Path 1: Check Availability: If the condition is TRUE, the n8n workflow executes the Check available slot in Cal.com HTTP Request n8n node. This node dynamically queries the /v1/slots API endpoint, calculating the endTime based on the provided startTime and defined timezone (Asia/Kolkata).

  4. Path 2: Book Appointment: If the condition is FALSE, the n8n workflow executes the Book an Appointment HTTP Request n8n node. This node uses the POST method on the /v1/bookings endpoint, constructing a JSON body using data fields like name and email from the incoming n8n trigger payload.

  5. Final Response: Regardless of the path taken, the result from the Cal.com API call is passed to the Respond to Webhook n8n node, immediately sending the status back to the external system that initiated the original request. This ensures low latency for the calling application.

Installation Guide

To deploy this powerful n8n workflow template, follow these steps:


  1. Import the n8n workflow: Copy the provided JSON data and paste it into your n8n instance using the 'New' -> 'Import from JSON' option.

  2. Set up Cal.com Credentials: The workflow requires Cal.com API credentials. If you haven't already, create a new credential for 'Cal API' in n8n and link it to the two HTTP Request n8n nodes (Check available slot in Cal.com and Book an Appointment). This credential enables the n8n workflow to authenticate with Cal.com.

  3. Configure Webhook: Activate the Webhook n8n trigger node. Copy the generated test or production URL, as this will be the endpoint your AI agent or external system calls.

  4. Adjust Hardcoded Values: Update dynamic parameters within the HTTP Request n8n nodes, specifically eventtypeid and the timeZone (Asia/Kolkata is currently set) to match your Cal.com setup. This customization is crucial for the n8n templates success.

Node Details

This n8n workflow utilizes the following key n8n node types:

Webhook (n8n trigger):
Function: Serves as the initiation point, waiting for an external POST request to /appointment-webhook.
Key Configuration: HTTP Method set to POST, Response Mode set to 'responseNode' to allow the final node to control the output.

Check Is Request For Available Slot (If n8n node):
Function: Routes the flow conditionally based on the input payload.
Key Configuration: Checks if {{ $json.body.tool }} equals the string checkAvailableSlot.

Check available slot in Cal.com (HTTP Request n8n node):
Function: Queries the Cal.com API to determine scheduling availability.
Key Configuration: URL is https://api.cal.com/v1/slots. Uses dynamic query parameters derived from the n8n trigger input for startTime and dynamically calculated endTime.

Book an Appointment (HTTP Request n8n node):
Function: Executes the final booking action on Cal.com.
Key Configuration: Method is POST to https://api.cal.com/v1/bookings. The JSON request body is dynamically generated, injecting startTime, name, and email data from the original n8n trigger payload. This demonstrates flexible data mapping within the n8n platform.

Respond to Webhook:
Function: Terminates the n8n workflow execution and sends the result of the preceding Cal.com API call back to the client that invoked the n8n trigger.

Related n8n Workflows

Free

Nodes: 4 Nodes
Updated: December 26 2025
View all
Created by

We are an AI Automation Agency focusing on various AI Automation Services like, workflow automation, shopify automation, chatbot developerment, custom ai agent development and more.

Featured*