https://retellai.com/?utm_source=discord&utm_medium=seo logo
I am trying to use the cal
# ❓・ai-evy-support
f
@AI Evy I am trying to use the cal.com book_appointment_cal and have set up what I require in cal.com but it isn't sending the all the data that I need through this and it won't make the booking because of this. I am trying to get it to send the phone number it collects and the address so it can appear on the Google calendar invite can I please have some help
a
Thanks for tagging me @flyn107. I'll look through relevant sources and get back to you shortly.
### Answer Based on the available sources, there's a common issue where the
book_appointment_cal
function doesn't always send all collected data (like phone number and address) to Cal.com [(1) ]() . Here's how to resolve this: 1. Configure Custom Fields in Cal.com First, ensure you've set up the booking questions in Cal.com's advanced settings to include phone number and address fields [(2) ](

▾

) . These custom fields need to be configured in your Cal.com event type before they can be passed through [(3) ]() [(2) ](

▾

) . 2. Update Your Agent Prompt The key fix is to explicitly instruct your agent to always pass all required data to the booking function [(1) ]() . Add this to your prompt where you mention the booking function : "Important: Always transfer the date/time, email, name, telephone number, and address to the functions with each call." This ensures the LLM consistently includes all collected information when calling the
book_appointment_cal
function . 3. Verify Your Function Configuration Make sure your
book_appointment_cal
function is properly configured with [(3) ]() [(4) ]() : - Your Cal.com API Key [(3) ]() - The correct Event Type ID - The appropriate timezone setting 4. Test the Setup After updating your prompt, test the agent to confirm it's now sending the phone number and address data to Cal.com [(2) ](

▾

) . You should see these fields populated in the Cal.com bookin
g confirmation . The issue typically occurs because the LLM doesn't automatically know to pass all collected variables to the function unless explicitly instructed in the prompt [(1) ]() .
​ To learn more, see the sources I considered: [[1] book_appointment doesn’t send phone attribute to cal](https://discord.com/channels/1186424376300679209/1329010496765956206) [[2] Retell AI - How to use Cal.com Custom Field](

https://www.youtube.com/watch?v=b59o1YCcvjc▾

) [[3] Book Calendar](https://docs.retellai.com/build/book-calendar) [[4] Create Retell LLM](https://docs.retellai.com/api-references/create-retell-llm) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
f
@AI Evy it didnt send the correct json again and i got these tool_call_id: 7553dc8be1c928bc { "time": "2025-11-20T13:00:00", "timezone": null, "name": "Fynley", "email": "fynleyvlogs@gmail.com", "execution_message": "Thanks, Fynley. I’m booking your appointment for tomorrow at 1pm. You’ll get a confirmation email shortly." } Tool Result tool_call_id: 7553dc8be1c928bc {"error":"Error calling Cal Booking API: Axios Error: error code: ERR_BAD_REQUEST, error message: Request failed with status code 400\nresponse status: 400\nresponse data: [{\"status\":\"1\",\"timestamp\":\"2\",\"path\":\"3\",\"error\":\"4\"},\"error\",\"2025-11-19T20:03:44.155Z\",\"/v2/bookings\",{\"code\":\"5\",\"message\":\"6\"},\"BAD_REQUEST\",\"responses - {attendeePhoneNumber}error_required_field, \"]"}
a
Thanks for the follow-up, @flyn107. I'll get back to you soon.
### Answer I see the issue - the error message clearly states
{attendeePhoneNumber}error_required_field
, meaning Cal.com is requiring a phone number but your agent isn't sending it in the booking request [(1) ]() . Based on the error you're seeing, here are the specific steps to fix this: 1. Verify Cal.com Event Type Configuration In your Cal.com event type settings, make sure the phone number field is properly configured as a booking question [(2) ]() . The field must be set up in Cal.com before Retell can pass data to it . 2. Update Your Agent's Prompt You need to explicitly instruct your agent to collect AND pass the phone number to the booking function [(1) ]() . Add this to your prompt: "When booking an appointment, you MUST collect and pass the following information to the book_appointment function: date/time, name, email, and phone number. Always include the phone number in the booking request." *3. Disable Phone Number Requirement (Alternative Solution) * If you don't actually need the phone number for your use case, you can disable the phone number requirement in your Cal.com event type settings . This would allow bookings to go through without that field . 4. Check Timezone Configuration I also notice your
"timezone": null
in the request . Make sure you've configured the timezone parameter in your
book_appointment_cal
function [(2) ]() [(3) ]() [(4) ]() . For example:
Copy code
json
{
  "type": "book_appointment_cal",
  "name": "book_appointment",
  "description": "Book an annual check up.",
  "cal_api_key": "cal_live_xxxxxxxxxxxx",
  "event_type_id": 60444,
  "timezone": "America/Los_Angeles"
}
[(3) ]() [(4) ]() The key issue is that your agent is collecting the phone number during the conversation but not including it when calling the
book_appointment_cal
function [(1) ]() . The prompt update should resolve this by explicitly instructing the LLM to always pass that data .
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
f
@AI Evy what would the london time zone be
a
Thanks for the follow-up, @flyn107. I'll get back to you soon.
### Answer ### Answer For London, you should use
Europe/London
as the timezone parameter in your
book_appointment_cal
function [(1) ]() [(2) ]() . Here's how it should be configured in your function:
Copy code
json
{
  "type": "book_appointment_cal",
  "name": "book_appointment",
  "description": "Book an appointment.",
  "cal_api_key": "cal_live_xxxxxxxxxxxx",
  "event_type_id": 60444,
  "timezone": "Europe/London"
}
[(3) ]() [(4) ]() Make sure this timezone setting matches what you've configured in your Cal.com account as well [(1) ]() [(2) ]() .
​ To learn more, see the sources I considered: [[1] AI Appointment Scheduling with Voice AI Booking Assistant](https://www.retellai.com/features/book-appointments) [[2] Booking time zone issue with cal.com](https://discord.com/channels/1186424376300679209/1432743087112851518) [[3] Update Retell LLM](https://docs.retellai.com/api-references/update-retell-llm) [[4] Create Retell LLM](https://docs.retellai.com/api-references/create-retell-llm) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
f
@AI Evy again i got this Tool Invocation: book_appointment_cal tool_call_id: 693afea64d50a32a { "time": "2025-11-20T12:00:00", "timezone": "Europe/London", "name": "Mike", "email": "mike1999@example.com", "execution_message": "Your appointment is all set for Thursday at 12 pm. Our team will come by to provide a quote for your toilet replacement. If we need anything else, we’ll be in touch. Thanks for choosing bristol plumbers!" } Tool Result tool_call_id: 693afea64d50a32a {"error":"Error calling Cal Booking API: Axios Error: error code: ERR_BAD_REQUEST, error message: Request failed with status code 400\nresponse status: 400\nresponse data: [{\"status\":\"1\",\"timestamp\":\"2\",\"path\":\"3\",\"error\":\"4\"},\"error\",\"2025-11-19T20:21:53.388Z\",\"/v2/bookings\",{\"code\":\"5\",\"message\":\"6\"},\"BAD_REQUEST\",\"responses - {address}error_required_field, \"]"} i have attatched a screenshot of my booking feilds and also my prompt in retell ai https://cdn.discordapp.com/attachments/1440792564486770719/1440799843512746165/image.png?ex=691f78eb&is=691e276b&hm=2c336d6594a2e811375dc380cd516ddf7ba44873cfa06180ec866aca1d34068c& https://cdn.discordapp.com/attachments/1440792564486770719/1440799843990900931/message.txt?ex=691f78eb&is=691e276b&hm=acd4adb9179743316c9ff86eba1f841c8ebdde631807a234fe1660daf3755b67&
a
Thanks for the follow-up, @flyn107. I'll get back to you soon.
p using the native function temporarily, you could include the address in the
name
field (e.g., "Mike, 123 Main St") [(2) ]() , though this isn't ideal for your Google Calendar display. The custom function approach is the proper solution for your use case where you need to pass both phone number and address to Cal.com [(2) ]() [(3) ]() .
### Answer The error now shows
{address}error_required_field
, meaning Cal.com requires an address field but your agent isn't passing it in the booking request [(1) ]() . The Core Issue The native
book_appointment_cal
function in Retell AI has limitations with custom fields beyond the standard name, email, and phone number [(2) ]() . According to community discussions, custom fields like "address" cannot be passed through the built-in Cal.com integration . Solution: Use a Custom Function Instead To send custom fields like address to Cal.com, you need to use a custom function that calls the Cal.com API directly from your server . The native
book_appointment_cal
preset tool doesn't support passing arbitrary custom fields [(2) ]() [(3) ]() . Here's how to set this up: 1. Create a custom function in your Retell AI dashboard by selecting "Custom Function" from the tools dropdown [(3) ]() 2. Configure the function to make a POST request to Cal.com's booking API endpoint 3. Define parameters using JSON schema to include all fields you need (name, email, phone, address, time, etc.) 4. Set your Cal.com API key in the request headers This approach gives you full control over what data gets sent to Cal.com, including custom fields like address that the native integration doesn't support [(2) ]() [(3) ]() . Alternative Workaround If you want to kee
​ To learn more, see the sources I considered: [[1] Discord message from @orney_dev on 2025-03-18](https://discord.com/channels/1186424376300679209/1294891368505937952/1351395480189403207) [[2] Cal.com custom fields (not phone/email) = 400 errors every time](https://discord.com/channels/1186424376300679209/1417434187685822535) [[3] Integrate any system with custom function](https://docs.retellai.com/build/single-multi-prompt/custom-function) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
f
@AI Evy can you show me the json i should use for this
a
Thanks for the follow-up, @flyn107. I'll get back to you soon.
### Answer Based on the available sources, here's the JSON schema you should use for your custom function to pass address and phone number to Cal.com [(1) ]() [(2) ]() : Parameter Schema:
Copy code
json
{
  "type": "object",
  "properties": {
    "time": {
      "type": "string",
      "description": "The appointment time in ISO 8601 format"
    },
    "timezone": {
      "type": "string",
      "description": "The timezone for the appointment (e.g., Europe/London) "
    },
    "name": {
      "type": "string",
      "description": "The customer's name"
    },
    "email": {
      "type": "string",
      "description": "The customer's email address"
    },
    "phone_number": {
      "type": "string",
      "description": "The customer's phone number"
    },
    "address": {
      "type": "string",
      "description": "The customer's address"
    }
  },
  "required": [
    "time",
    "timezone",
    "name",
    "email",
    "phone_number",
    "address"
  ]
}
Key Configuration Steps: 1. **HTTP Method**: Set to POST 2. **Endpoint URL**: Use Cal.com's booking API endpoint (you'll need to get this from Cal.com's API documentation) 3. **Request Headers**: Include your Cal.com API key 4. **Define Parameters**: Use the JSON schema above in either JSON schema format or JSON form The schema must include
"type": "object"
at the top level - this is a common mistake that causes save failures . Make sure your agent's prompt explicitly instructs it to collect and pass all these fields when calling the function .
​ To learn more, see the sources I considered: [[1] Integrate any system with custom function](https://docs.retellai.com/build/single-multi-prompt/custom-function) [[2] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
f
@AI Evy how to include the api key in headers
a
Thanks for the follow-up, @flyn107. I'll get back to you soon.
### Answer --- ### Answer To include your Cal.com API key in the headers of your custom function, you need to configure the request headers section when setting up the custom function in Retell AI [(1) ]() [(2) ]() . Steps to Add API Key in Headers: 1. When creating or editing your custom function, look for the "Set request headers" section 2. Add a new header with these details: - **Header Name**:
Authorization
- **Header Value**:
Bearer YOUR_CAL_API_KEY
(replace with your actual Cal.com API key) Alternatively, some APIs use: - **Header Name**:
cal-api-version
and/or
Authorization
- **Header Value**: Your Cal.com API key format (check Cal.com's API documentation for the exact format they require) Important Notes: - Header values can be static or include dynamic variables - The custom headers you define will be included with the request Retell sends to your endpoint - Make sure you're using the correct authentication format that Cal.com expects (typically
Bearer
token format) Example Configuration: In your custom function setup, the headers section should look something like this:
Copy code
Header Name: Authorization
Header Value: Bearer cal_live_xxxxxxxxxxxx
This will ensure your Cal.com API key is properly included in every request Retell makes to the Cal.com booking API . --- **
​ To learn more, see the sources I considered: [[1] Integrate any system with custom function](https://docs.retellai.com/build/single-multi-prompt/custom-function) [[2] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
f
@AI Evy how does it know what event type i am wanting to use
a
Thanks for the follow-up, @flyn107. I'll get back to you soon.
### Answer ### Answer When creating a custom function to call Cal.com's API directly, you need to include the Event Type ID in your request [(1) ]() . Here's how to specify which event type to use: 1. Add Event Type ID as a Parameter Include
event_type_id
in your custom function's parameter schema :
Copy code
json
{
  "type": "object",
  "properties": {
    "event_type_id": {
      "type": "integer",
      "description": "The Cal.com event type ID"
    },
    "time": {
      "type": "string",
      "description": "The appointment time in ISO 8601 format"
    },
    "timezone": {
      "type": "string",
      "description": "The timezone for the appointment"
    },
    "name": {
      "type": "string",
      "description": "The customer's name"
    },
    "email": {
      "type": "string",
      "description": "The customer's email address"
    },
    "phone_number": {
      "type": "string",
      "description": "The customer's phone number"
    },
    "address": {
      "type": "string",
      "description": "The customer's address"
    }
  },
  "required": [
    "event_type_id",
    "time",
    "timezone",
    "name",
    "email",
    "phone_number",
    "address"
  ]
}
​ To learn more, see the sources I considered: [[1] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) [[2] Book Calendar](https://docs.retellai.com/build/book-calendar) ​
2. Include in the API Request When your custom function makes the POST request to Cal.com's booking API, the
event_type_id
will be included in the request body along with the other booking details . 3. Get Your Event Type ID To find your event type ID from Cal.com [(2) ]() : - Open your created event type in Cal.com - Look at the URL in your browser - The event type ID is the number in the URL - Example: ` - the ID is
1427703
The custom function will send this event type ID to Cal.com's API to specify which calendar event configuration to use for the booking [(2) ]() [(1) ]() .
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
f
@AI Evy tool_call_id: 68c57dc45e842b6c { "address": "123 Maple Street, Bristol, BS1 4AB", "timezone": "Europe/London", "name": "Mike", "phone_number": "07123 456789", "time": "2025-11-21T09:00:00", "event_type_id": 1, "email": "mike1999@example.com" } Tool Result tool_call_id: 68c57dc45e842b6c Axios Error: error code: ERR_BAD_REQUEST, error message: Request failed with status code 400 response status: 400 response data: [{"status":"1","timestamp":"2","path":"3","error":"4"},"error","2025-11-19T20:36:37.038Z","/v2/bookings",{"code":"5","message":"6","details":"7"},"BadRequestException","Bad Request Exception",{"errors":"8"},["9","10","11","12","13"],{"target":"14","property":"15","children":"16","constraints":"17"},{"target":"18","property":"19","children":"20","constraints":"21"},{"target":"22","property":"23","children":"24","constraints":"25"},{"target":"26","property":"27","children":"28","constraints":"29"},{"target":"30","property":"31","children":"32","constraints":"33"},{},"start",[],{"isString":"34"},{},"eventTypeId",[],{"isNumber":"35"},{},"timeZone",[],{"isTimeZone":"36"},{},"language",[],{"isString":"37"},{},"metadata",[],{"isObject":"38"},"start must be a string","eventTypeId must be a number conforming to the specified constraints","timeZone must be a valid IANA time-zone","language must be a string","metadata must be an object"] what does this mean
a
Thanks for the follow-up, @flyn107. I'll get back to you soon.
### Answer ### Answer The error message indicates that Cal.com's API is expecting different field names than what you're sending [(1) ]() . The API is looking for: -
start
(not
time
) -
eventTypeId
(not
event_type_id
) -
timeZone
(not
timezone
) -
language
(required field you're missing) -
metadata
(required field you're missing) Here's what you need to fix in your custom function: 1. Update Your Parameter Schema Your JSON schema should match Cal.com's expected field names:
Copy code
json
{
  "type": "object",
  "properties": {
    "start": {
      "type": "string",
      "description": "The appointment start time in ISO 8601 format"
    },
    "eventTypeId": {
      "type": "number",
      "description": "The Cal.com event type ID"
    },
    "timeZone": {
      "type": "string",
      "description": "Valid IANA timezone (e.g., Europe/London) "
    },
    "attendee": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "timeZone": {
          "type": "string"
        },
        "language": {
          "type": "string"
        },
        "phone": {
          "type": "string"
        }
      }
    },
    "metadata": {
      "type": "object",
      "properties": {
        "address": {
          "type": "string"
        }
      }
    }
  },
  "required": ["start", "eventTypeId", "timeZone", "attendee", "metadata"]
}
​ To learn more, see the sources I considered: [[1] Discord message from @neoxsaibot on 2024-11-04](https://discord.com/channels/1186424376300679209/1294891368505937952/1303073018448449557) [[2] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) [[3] Integrate any system with custom function](https://docs.retellai.com/build/single-multi-prompt/custom-function) [[4] Book Calendar](https://docs.retellai.com/build/book-calendar) [[5] Check Calendar Availability](https://docs.retellai.com/build/check-availability) [[6] Cal.com booking errors](https://discord.com/channels/1186424376300679209/1377380250954105064) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
[(2) ]() [(3) ]() 2. Key Corrections Needed: - Use
start
instead of
time
- Use
eventTypeId
(camelCase) instead of
event_type_id
- Use
timeZone
(camelCase) instead of
timezone
- Add
language
field (e.g., "en" for English) - Wrap attendee details in an
attendee
object [(1) ]() - Put custom fields like
address
inside a
metadata
object 3. Update Your Endpoint URL Make sure you're using Cal.com's v2 API endpoint: ` 4. Verify Your Event Type ID Your
event_type_id: 1
looks suspicious - make sure you're using the actual event type ID from your Cal.com dashboard URL [(4) ]() [(5) ]() . The error is happening because Cal.com's API has strict validation and expects exact field names and structure [(1) ]() [(6) ]() .
f
@User { "type": "object", "properties": { "event_type_id": { "type": "integer", "description": "The Cal.com event type ID" }, "time": { "type": "string", "description": "The appointment time in ISO 8601 format" }, "timezone": { "type": "string", "description": "The timezone for the appointment" }, "name": { "type": "string", "description": "The customer's name" }, "email": { "type": "string", "description": "The customer's email address" }, "phone_number": { "type": "string", "description": "The customer's phone number" }, "address": { "type": "string", "description": "The customer's address" } }, "required": [ "event_type_id", "time", "timezone", "name", "email", "phone_number", "address" ] } how do i pass the event type id in this as a preset
@AI Evy { "type": "object", "properties": { "event_type_id": { "type": "integer", "description": "The Cal.com event type ID" }, "time": { "type": "string", "description": "The appointment time in ISO 8601 format" }, "timezone": { "type": "string", "description": "The timezone for the appointment" }, "name": { "type": "string", "description": "The customer's name" }, "email": { "type": "string", "description": "The customer's email address" }, "phone_number": { "type": "string", "description": "The customer's phone number" }, "address": { "type": "string", "description": "The customer's address" } }, "required": [ "event_type_id", "time", "timezone", "name", "email", "phone_number", "address" ] } how do i pass the event type id in this as a preset
a
Thanks for the follow-up, @flyn107. I'll get back to you soon.
### Answer To pass the
event_type_id
as a preset (hardcoded value) in your custom function, you have a couple of options: Option 1: Remove it from the schema and use a query parameter or in the endpoint URL Since you want the event type ID to be static, remove it from your parameter schema and instead include it as a query parameter [(1) ]() [(2) ]() : 1. In your custom function configuration, go to "Set query parameters" 2. Add a query parameter: - Name:
eventTypeId
- Value:
1427703
(your actual event type ID) Option 2: Set a default value in your backend Keep the schema as-is but handle the event type ID on your server endpoint that receives the custom function call . When Retell sends the request to your endpoint, you can override or set the
event_type_id
to your preset value before forwarding to Cal.com's API. Option 3: Use the endpoint URL directly Include the event type ID directly in your endpoint URL : - Endpoint URL: ` Important Note: Based on the thread context and the Cal.com API requirements you encountered, you should actually be restructuring your entire request to match Cal.com's expected format (using
start
instead of
time
,
eventTypeId
instead of
event_type_id
, etc.) [(3) ]() . The native
book_appointment_cal
integration doesn't support custom fields like address, which is why you need the custom function approach . For a preset event type ID, I'd recommend Option 1 (query parameter) or Option 3 (in the URL) since these keep the ID static and separate from the dynamic booking parameters [(1) ](
unction) [(2) ]() .
​ To learn more, see the sources I considered: [[1] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) [[2] Integrate any system with custom function](https://docs.retellai.com/build/single-multi-prompt/custom-function) [[3] cal.com Integration: Agent can specify event type id dynamically](https://discord.com/channels/1186424376300679209/1388617797491359915) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
f
@AI Evy tool_call_id: 68ab792819e8028c { "name": "Mike", "address": "123 Maple Street, Springfield", "time": "2025-11-20T14:00:00", "phone": "555-123-4567", "timezone": "Europe/London", "email": "mike1999@example.com" } Tool Result tool_call_id: 68ab792819e8028c Axios Error: error code: ERR_BAD_REQUEST, error message: Request failed with status code 400 response status: 400 response data: [{"status":"1","timestamp":"2","path":"3","error":"4"},"error","2025-11-19T20:47:08.124Z","/v2/bookings?eventTypeID=3945055",{"code":"5","message":"6","details":"7"},"BadRequestException","Bad Request Exception",{"errors":"8"},["9","10","11","12","13"],{"target":"14","property":"15","children":"16","constraints":"17"},{"target":"18","property":"19","children":"20","constraints":"21"},{"target":"22","property":"23","children":"24","constraints":"25"},{"target":"26","property":"27","children":"28","constraints":"29"},{"target":"30","property":"31","children":"32","constraints":"33"},{},"start",[],{"isString":"34"},{},"eventTypeId",[],{"isNumber":"35"},{},"timeZone",[],{"isTimeZone":"36"},{},"language",[],{"isString":"37"},{},"metadata",[],{"isObject":"38"},"start must be a string","eventTypeId must be a number conforming to the specified constraints","timeZone must be a valid IANA time-zone","language must be a string","metadata must be an object"]
a
Thanks for the follow-up, @flyn107. I'll get back to you soon.
​ To learn more, see the sources I considered: [[1] Discord message from @neoxsaibot on 2024-11-04](https://discord.com/channels/1186424376300679209/1294891368505937952/1303073018448449557) [[2] Cal.com custom fields (not phone/email) = 400 errors every time](https://discord.com/channels/1186424376300679209/1417434187685822535) ​
### Answer The error shows Cal.com's API is still receiving incorrectly formatted data. The API expects a very specific structure that your current request isn't matching [(1) ]() . The Core Issues: 1. **Query parameter typo**: Your URL shows
eventTypeID=3945055
(uppercase "ID") , but Cal.com expects
eventTypeId
(camelCase) 2. **Missing required fields**: Cal.com requires
start
,
eventTypeId
(in body) ,
language
, and
metadata
3. **Wrong field names**: You're sending
time
but Cal.com expects
start
, and
timezone
instead of
timeZone
4. **Incorrect structure**: Attendee details need to be wrapped in an
attendee
object Here's the correct request body structure Cal.com expects:
Copy code
json
{
  "start": "2025-11-20T14:00:00",
  "eventTypeId": 3945055,
  "timeZone": "Europe/London",
  "attendee": {
    "name": "Mike",
    "email": "mike1999@example.com",
    "timeZone": "Europe/London",
    "language": "en",
    "phone": "555-123-4567"
  },
  "metadata": {
    "address": "123 Maple Street, Springfield"
  }
}
Update your custom function parameter schema to match:
Copy code
json
{
  "type": "object",
  "properties": {
    "start": {
      "type": "string",
      "description": "The appointment start time in ISO 8601 format"
    },
    "eventTypeId": {
      "type": "number",
      "description": "The Cal.com event type ID"
    },
    "timeZone": {
      "type": "string",
      "description": "Valid IANA timezone (e.g., Europe/London) "
    },
    "attendee": {
      "type": "object",
      "properties": {
        "name": {"type": "string"},
        "email": {"type": "string"},
        "timeZone": {"type": "string"},
        "language": {"type": "string"},
        "phone": {"type": "string"}
      }
    },
    "metadata": {
      "type": "object",
      "properties": {
        "address": {"type": "string"}
      }
    }
  },
  "required": ["start", "eventTypeId", "timeZone", "attendee", "metadata"]
}
Also fix your query parameter: - Change
eventTypeID
to
eventTypeId
(or better yet, remove it from the query string since it should be in the request body) The native
book_appointment_cal
tool doesn't support custom fields like address, which is why you need this custom function approach [(2) ]() .
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
f
@AI Evy what is this erropr mean Axios Error: error code: ERR_BAD_REQUEST, error message: Request failed with status code 400 response status: 400 response data: [{"status":"1","timestamp":"2","path":"3","error":"4"},"error","2025-11-19T20:49:34.351Z","/v2/bookings?eventTypeId=3945055",{"code":"5","message":"6","details":"7"},"BadRequestException","Bad Request Exception",{"errors":"8"},["9","10","11","12","13"],{"target":"14","property":"15","children":"16","constraints":"17"},{"target":"18","property":"19","children":"20","constraints":"21"},{"target":"22","property":"23","children":"24","constraints":"25"},{"target":"26","property":"27","children":"28","constraints":"29"},{"target":"30","property":"31","children":"32","constraints":"33"},{},"start",[],{"isString":"34"},{},"eventTypeId",[],{"isNumber":"35"},{},"timeZone",[],{"isTimeZone":"36"},{},"language",[],{"isString":"37"},{},"metadata",[],{"isObject":"38"},"start must be a string","eventTypeId must be a number conforming to the specified constraints","timeZone must be a valid IANA time-zone","language must be a string","metadata must be an object"]
a
Thanks for the follow-up, @flyn107. I'll get back to you soon.
### Answer ### Answer This error means Cal.com's API is rejecting your request because it's missing required fields or they're in the wrong format [(1) ]() . The error message is telling you exactly what's wrong: -
"start must be a string"
- You need a
start
field (not
time
) -
"eventTypeId must be a number conforming to the specified constraints"
- The
eventTypeId
needs to be in the request body as a number -
"timeZone must be a valid IANA time-zone"
- Use
timeZone
(camelCase) , not
timezone
-
"language must be a string"
- You're missing the required
language
field -
"metadata must be an object"
- You're missing the required
metadata
object The problem: Your custom function is sending data in the wrong format. Cal.com expects a very specific structure that matches their API requirements . To fix this, you need to update your custom function's parameter schema [(2) ]() :
Copy code
json
{
  "type": "object",
  "properties": {
    "start": {
      "type": "string",
      "description": "The appointment start time in ISO 8601 format"
    },
    "eventTypeId": {
      "type": "number",
      "description": "The Cal.com event type ID"
    },
    "timeZone": {
      "type": "string",
      "description": "Valid IANA timezone (e.g., Europe/London) "
    },
    "attendee": {
      "type": "object",
      "properties": {
        "name": {"type": "string"},
        "email": {"type": "string"},
        "timeZone": {"type": "string"},
        "language": {"type": "string"},
        "phone": {"type": "string"}
      }
    },
    "metadata": {
      "type": "object",
      "properties": {
        "address": {"type": "string"}
      }
    }
  },
  "required": ["start", "eventTypeId", "timeZone", "attendee", "metadata"]
}
Key changes needed: - Use
start
instead of
time
- Use
eventTypeId
(camelCase) as a number in the body - Use
timeZone
(camelCase) instead of
timezone
- Add the required
language
field (e.g., "en") - Wrap attendee details in an
attendee
object - Put custom fields like
address
inside a
metadata
object [(1) ]() Also, remove
eventTypeId
from your query parameters since it should be in the request body, not the URL [(2) ]() .
​ To learn more, see the sources I considered: [[1] Cal.com booking errors](https://discord.com/channels/1186424376300679209/1377380250954105064) [[2] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
f
@AI Evy Axios Error: error code: ERR_BAD_REQUEST, error message: Request failed with status code 400 response status: 400 response data: [{"status":"1","timestamp":"2","path":"3","error":"4"},"error","2025-11-19T20:58:22.212Z","/v2/bookings?eventTypeId=3945055",{"code":"5","message":"6","details":"7"},"BadRequestException","Bad Request Exception",{"errors":"8"},["9","10","11","12","13"],{"target":"14","property":"15","children":"16","constraints":"17"},{"target":"18","property":"19","children":"20","constraints":"21"},{"target":"22","property":"23","children":"24","constraints":"25"},{"target":"26","property":"27","children":"28","constraints":"29"},{"target":"30","property":"31","children":"32","constraints":"33"},{},"start",[],{"isString":"34"},{},"eventTypeId",[],{"isNumber":"35"},{},"timeZone",[],{"isTimeZone":"36"},{},"language",[],{"isString":"37"},{},"metadata",[],{"isObject":"38"},"start must be a string","eventTypeId must be a number conforming to the specified constraints","timeZone must be a valid IANA time-zone","language must be a string","metadata must be an object"]
a
Thanks for the follow-up, @flyn107. I'll get back to you soon.
### Answer --- The error indicates that Cal.com's API is still not receiving the required fields in the correct format. The API validation is failing because it expects: -
start
as a string (ISO 8601 format) -
eventTypeId
as a number in the request body -
timeZone
as a valid IANA timezone -
language
as a string -
metadata
as an object Critical Issue: You still have
eventTypeId=3945055
in your query parameters (the URL shows
/v2/bookings?eventTypeId=3945055
) . This needs to be removed from the query string and instead included in the request body as a number [(1) ]() [(2) ]() . Here's what you need to verify in your custom function setup: 1. Remove
eventTypeId
from query parameters
- It should not be in the URL 2. Ensure your parameter schema matches this structure exactly:
Copy code
json
{
  "type": "object",
  "properties": {
    "start": {
      "type": "string",
      "description": "The appointment start time in ISO 8601 format"
    },
    "eventTypeId": {
      "type": "number",
      "description": "The Cal.com event type ID (e.g., 3945055) "
    },
    "timeZone": {
      "type": "string",
      "description": "Valid IANA timezone like Europe/London"
    },
    "attendee": {
      "type": "object",
      "properties": {
        "name": {"type": "string"},
        "email": {"type": "string"},
        "timeZone": {"type": "string"},
        "language": {"type": "string"},
        "phone": {"type": "string"}
      },
      "required": ["name", "email", "timeZone", "language"]
    },
    "metadata": {
      "type": "object",
      "properties": {
        "address": {"type": "string"}
      }
    }
  },
  "required": ["start", "eventTypeId", "timeZone", "attendee", "metadata"]
}
3. Update your agent's prompt to explicitly instruct it to collect and pass all these fields when calling the function 4. Verify your endpoint URL is set to ` (without any query parameters) The native
book_appointment_cal
tool doesn't support custom fields like address, which is why this custom function approach is necessary [(3) ]() . **
​ To learn more, see the sources I considered: [[1] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) [[2] Integrate any system with custom function](https://docs.retellai.com/build/single-multi-prompt/custom-function) [[3] Cal.com custom fields (not phone/email) = 400 errors every time](https://discord.com/channels/1186424376300679209/1417434187685822535) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
Thanks for the follow-up, @flyn107. I'll get back to you soon.
f
@AI Evy is there someone human i can talk to to set this up correctly
a
### Answer If you need additional support beyond what I can provide, you can: - Visit [Contact Sales]() to speak with the Retell AI team - Visit [Retell AI GitHub]() for community support and examples The Cal.com integration can be complex when working with custom fields. Before reaching out, here's a final checklist to ensure your setup is correct: 1. Your endpoint URL should be:
Copy code
<https://api.cal.com/v2/bookings>
(No query parameters in the URL) [(1) ]() [(2) ]() 2. Your request headers should include: - Header Name:
Authorization
- Header Value:
Bearer YOUR_CAL_API_KEY
3. Your parameter schema must match Cal.com's exact requirements:
Copy code
json
{
  "type": "object",
  "properties": {
    "start": {
      "type": "string",
      "description": "The appointment start time in ISO 8601 format"
    },
    "eventTypeId": {
      "type": "number",
      "description": "The Cal.com event type ID"
    },
    "timeZone": {
      "type": "string",
      "description": "Valid IANA timezone (e.g., Europe/London) "
    },
    "attendee": {
      "type": "object",
      "properties": {
        "name": {"type": "string"},
        "email": {"type": "string"},
        "timeZone": {"type": "string"},
        "language": {"type": "string"},
        "phone": {"type": "string"}
      }
    },
    "metadata": {
      "type": "object",
      "properties": {
        "address": {"type": "string"}
      }
    }
  },
  "required": ["start", "eventTypeId", "timeZone", "attendee", "metadata"]
}
If you've verified all of these settings and are still experiencing issues, the Retell AI sales team can provide personalized assistance. **
​ To learn more, see the sources I considered: [[1] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) [[2] Integrate any system with custom function](https://docs.retellai.com/build/single-multi-prompt/custom-function) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
f
@AI Evy "start": "2025-11-20T12:00:00", "timeZone": "Europe/London", "eventTypeId": 3945055, "metadata": { "address": "123 Maple Street, Bristol, BS1 5XY" }, "attendee": { "name": "Mike", "timeZone": "Europe/London", "language": "en", "phone": "07700 900123", "email": "mike.johnson@example.com" } } Tool Result tool_call_id: d94cc7c639476ac0 Axios Error: error code: ERR_BAD_REQUEST, error message: Request failed with status code 400 response status: 400 response data: [{"status":"1","timestamp":"2","path":"3","error":"4"},"error","2025-11-19T21:03:57.802Z","/v2/bookings",{"code":"5","message":"6","details":"7"},"BadRequestException","Bad Request Exception",{"errors":"8"},["9","10","11","12","13"],{"target":"14","property":"15","children":"16","constraints":"17"},{"target":"18","property":"19","children":"20","constraints":"21"},{"target":"22","property":"23","children":"24","constraints":"25"},{"target":"26","property":"27","children":"28","constraints":"29"},{"target":"30","property":"31","children":"32","constraints":"33"},{},"start",[],{"isString":"34"},{},"eventTypeId",[],{"isNumber":"35"},{},"timeZone",[],{"isTimeZone":"36"},{},"language",[],{"isString":"37"},{},"metadata",[],{"isObject":"38"},"start must be a string","eventTypeId must be a number conforming to the specified constraints","timeZone must be a valid IANA time-zone","language must be a string","metadata must be an object"]
a
Thanks for the follow-up, @flyn107. I'll get back to you soon.
Copy code
json
{
  "type": "object",
  "properties": {
    "start": {
      "type": "string",
      "description": "The appointment start time in ISO 8601 format"
    },
    "eventTypeId": {
      "type": "number",
      "description": "The Cal.com event type ID"
    },
    "timeZone": {
      "type": "string",
      "description": "Valid IANA timezone (e.g., Europe/London) "
    },
    "attendee": {
      "type": "object",
      "properties": {
        "name": {"type": "string"},
        "email": {"type": "string"},
        "timeZone": {"type": "string"},
        "language": {"type": "string"},
        "phone": {"type": "string"}
      },
      "required": ["name", "email", "timeZone", "language"]
    },
    "metadata": {
      "type": "object",
      "properties": {
        "address": {"type": "string"}
      }
    }
  },
  "required": ["start", "eventTypeId", "timeZone", "attendee", "metadata"]
}
​ To learn more, see the sources I considered: [[1] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) [[2] Integrate any system with custom function](https://docs.retellai.com/build/single-multi-prompt/custom-function) [[3] custom function Error with VALID JSON Schema](https://discord.com/channels/1186424376300679209/1310169696582111274) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
### Answer The error indicates that Cal.com's API is receiving the data but something in how Retell is sending it is causing the validation to fail [(1) ]() [(2) ]() . Even though your JSON structure looks correct, Cal.com is still reporting that required fields are missing or incorrectly formatted. This suggests the issue is likely with how your custom function is configured in Retell, not the data structure itself. Here's what to check: 1. Verify HTTP Method Make sure your custom function is set to POST method . GET, PUT, PATCH, or DELETE won't work for Cal.com bookings. 2. Check Content-Type Header Retell should automatically send
Content-Type: application/json
, but verify your custom function doesn't have conflicting headers configured. 3. Verify Your Authorization Header Ensure your Cal.com API key is correctly formatted in the headers : - Header Name:
Authorization
- Header Value:
Bearer YOUR_CAL_API_KEY
4. Double-Check Your Parameter Schema Your schema must use JSON Schema format (not JSON Form) for POST requests . Make sure it matches this exactly:
5. Common Schema Mistakes A common error is not adding
"type": "object"
to the top level of the JSON schema [(1) ]() [(2) ]() [(3) ]() . Make sure your schema starts with this. 6. Verify Endpoint URL Your endpoint should be exactly: ` (with no query parameters) [(1) ]() [(2) ]() 7. Check Function Timeout The request will timeout in your specified timeout period, or 2 minutes if not specified . If Cal.com is slow to respond, increase the timeout. Alternative Approach: Use a Middleware Server Since the direct integration is proving difficult, you might want to create a middleware endpoint that: 1. Receives the Retell function call 2. Transforms the data to Cal.com's exact requirements 3. Forwards it to Cal.com's API 4. Returns the result to Retell This gives you more control over the request format and better error handling . If you continue experiencing issues after verifying these settings, I recommend reaching out to Retell AI support: - Visit [Contact Sales]() - Visit [Retell AI GitHub]() **