https://retellai.com/?utm_source=discord&utm_medium=seo logo
I'm trying to create the variable 'attendeePhoneNu...
# ❓・ai-evy-support
d
@AI Evy I'm trying to create the variable 'attendeePhoneNumber', I'm use this prompt ### Booking Required data: -Name and surname: goes in the 'name' field -User's phone number: goes in the 'attendeePhoneNumber' field -Chosen date for the booking: goes in the 'time' field -Email: always leave it empty. Example: { "time":"Thursday August 21 at 9am" "name":"Daniel Suárez" "attendeePhoneNumber":"+34 613981395" "email":"" } But always this is the response: tool_call_id: 264ba272e950f768 { "time": "2025-11-27T09:00:00", "timezone": "Europe/Madrid", "name": "David Novo", "email": "", "execution_message": "Done! Your appointment has been scheduled for November 27 at 9:00 AM, under the name David Novo and with the phone number +34 490458604." } {"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-22T11:13:05.271Z\",\"/v2/bookings\",{\"code\":\"5\",\"message\":\"6\",\"details\":\"7\"},\"BadRequestException\",\"attendee property is wrong, attendee email or phone property is wrong,Attendee must have at least one contact method (email or phone number) \",{\"message\":\"6\",\"error\":\"8\",\"statusCode\":400},\"Bad Request\"]"}
a
Thanks for tagging me @david_novo. I'll look through relevant sources and get back to you shortly.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
### Answer The issue is that the Cal.com API is not receiving the phone number in the correct format. The error message indicates "Attendee must have at least one contact method (email or phone number) " [(1) ]() . Based on community discussions, here's what you need to adjust: 1. Update your prompt to specify the correct field structure: Instead of using
attendeePhoneNumber
as a top-level field, Cal.com's v2 API expects the phone number nested within the
attendee
object structure [(2) ]() . 2. Modify your prompt example to:
Copy code
{
  "time": "Thursday August 21 at 9am",
  "name": "Daniel Suárez",
  "attendee": {
    "phoneNumber": "+34 613981395"
  },
  "email": ""
}
3. Add current date context to your prompt: Include the current date/time as a dynamic variable to help with date parsing [(1) ]() :
Copy code
## Context 
Today is: {{current_time_Europe/Madrid}}
4. Consider disabling phone requirement in Cal.com: If you're still experiencing issues, you may need to adjust your Cal.com event type settings to not require the phone number field, or ensure it's properly configured [(3) ]() . The key issue is that your prompt is instructing the LLM to create
attendeePhoneNumber
as a top-level field, but Cal.com's API expects it nested under the
attendee
object as
phoneNumber
[(2) ]() . **
​ To learn more, see the sources I considered: [[1] Ticket](https://discord.com/channels/1186424376300679209/1418650262381269094) [[2] Discord message from @instagram._ on 2025-02-21](https://discord.com/channels/1186424376300679209/1186462578310910112/1342645607323664466) [[3] Error with Cal.com integration](https://discord.com/channels/1186424376300679209/1432628757067337778) ​
d
now this is my full promt and it response me this: tool_call_id: 12569193fb1e8713 { "time": "2025-11-27T09:00:00", "timezone": "Europe/Madrid", "name": "David Novo", "email": "", "execution_message": "Done! Your appointment has been scheduled for November 27 at 9:00 AM, under the name David Novo and with the phone number +34 490458604." } {"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-22T11:23:49.356Z\",\"/v2/bookings\",{\"code\":\"5\",\"message\":\"6\",\"details\":\"7\"},\"BadRequestException\",\"attendee property is wrong, attendee email or phone property is wrong,Attendee must have at least one contact method (email or phone number) \",{\"message\":\"6\",\"error\":\"8\",\"statusCode\":400},\"Bad Request\"]"} I have this descriptión in the function: Add field 'attendeePhoneNumber' https://cdn.discordapp.com/attachments/1441750748550402079/1441751964223279135/message.txt?ex=6922efa6&is=69219e26&hm=fe1579c4d343c99d2c632df44bf0dd6a81f076ced56fd725163019f87161677c&
@AI Evy now this is my full promt and it response me this: tool_call_id: 12569193fb1e8713 { "time": "2025-11-27T09:00:00", "timezone": "Europe/Madrid", "name": "David Novo", "email": "", "execution_message": "Done! Your appointment has been scheduled for November 27 at 9:00 AM, under the name David Novo and with the phone number +34 490458604." } {"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-22T11:23:49.356Z","/v2/bookings",{"code":"5","message":"6","details":"7"},"BadRequestException","attendee property is wrong, attendee email or phone property is wrong,Attendee must have at least one contact method (email or phone number) ",{"message":"6","error":"8","statusCode":400},"Bad Request"]"} I have this descriptión in the function "Booking": Add field 'attendeePhoneNumber' https://cdn.discordapp.com/attachments/1441750748550402079/1441752417355038792/message.txt?ex=6922f012&is=69219e92&hm=8f6a3dc26d27151028373d139da14917b61128ba5defa52d874ef7ab1f7e5642&
a
Thanks for the follow-up, @david_novo. I'll get back to you soon.
### Answer --- The issue is that the built-in Cal.com integration in Retell AI has limitations and doesn't support passing the phone number field directly [(1) ]() . The LLM is collecting the phone number correctly, but the Cal.com appointment tool isn't posting it to the appointment . The recommended solution is to create a custom function instead of using Retell's built-in Cal.com tool . This allows you to: 1. Collect the phone number from the caller during the conversation 2. Use the
from_number
and
to_number
that are always sent when a function is called 3. Create the Cal.com appointment with the phone number using Cal.com's API directly The built-in Retell Cal.com integration is limited and meant for trying out the feature . For production use cases where you need to capture phone numbers in appointments, you'll need to implement your own custom function that wraps the Cal.com API with the parameters you want to pass . To implement this: - Remove the built-in
book_appointment_cal
tool - Create a custom tool/function that calls Cal.com's API directly - In your custom function, structure the request to include the phone number in the format Cal.com expects - Use the phone number collected by the LLM as a parameter in your custom function This approach gives you full control over what data gets sent to Cal.com and ensures the phone number is properly included in the appointment . ---
​ To learn more, see the sources I considered: [[1] Cal.com Enter Attendee Phone Number in Appointment?](https://discord.com/channels/1186424376300679209/1253826209444532305) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
Thanks for the follow-up, @david_novo. I'll get back to you soon.
d
@AI Evy I'm trying to configure too the "Check disponibility" function, but aways response me the same "Its busy the date", mi prompt its the same. https://cdn.discordapp.com/attachments/1441750748550402079/1441916163977379922/message.txt?ex=69238892&is=69223712&hm=588b5d8aca4264c948c3f2f8b2b8f0f1e07acb3200c81482a7e11495a3884e13&
a
### Answer The "Check Calendar Availability" function requires proper configuration in your Retell AI agent [(1) ]() . Here's what you need to verify: 1. Ensure you've added the function correctly: - Tool name must be unique within that agent - API Key from Cal.com - Event Type ID - Tool description (example: "Checks availability for 30-minute consultation calls") - Optional: add a timezone to be used in the function 2. Update your prompt to explicitly tell the agent when to invoke the function:
Copy code
When user stated a time range, please check the calendar availability by calling the `check_calendar_availability` function and let user know whether that range work or not.
3. Common issues causing "always busy" responses: - Verify your Cal.com API key is correct and has proper permissions - Confirm the Event Type ID matches the event type you want to check - Ensure the timezone setting matches your Cal.com event type timezone - Check that your Cal.com event type has actual availability configured 4. Test your Cal.com credentials: Make sure you can access your Cal.com API key from Settings → Developer → API Keys , and verify your Event Type ID from the URL when viewing your event type (the number in the URL like ` . If the function continues to return "busy" for all dates, the issue is likely with either the Cal.com API key permissions or the Event Type ID configuration .
​ To learn more, see the sources I considered: [[1] Check Calendar Availability](https://docs.retellai.com/build/check-availability) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
d
@AI Evy This is the response always tool_call_id: 5c594b1d35b8bcb0 {"availability_for_selected_time":[{"date":"Friday, 2025 November 11/28/2025 Pacific Standard Time","availability_range":["From 12:00 AM to 8:00 AM"]}]} tool_call_id: 5c594b1d35b8bcb0 { "start_time": "2025-11-27T15:00:00", "end_time": "2025-11-27T16:00:00", "timezone": null, "execution_message": "Voy a comprobar si hay disponibilidad para el 27 de noviembre a las 15:00." }
a
Thanks for the follow-up, @david_novo. I'll get back to you soon.
### Answer I see the issue - there are timezone mismatches causing incorrect availability results [(1) ]() . Key problems in your response: 1. Timezone is null - Your function call shows
"timezone": null
, but you need to specify a timezone [(2) ]() [(3) ]() 2. Wrong timezone in availability - The response shows "Pacific Standard Time" but you're checking for Europe/Madrid times 3. Date format issues - The availability shows "Friday, 2025 November 11/28/2025" which appears malformed To fix this: 1. Add timezone to your Check Availability function: When setting up the function in Retell, add the timezone parameter (Europe/Madrid in your case) [(2) ]() 2. Update your prompt to include timezone context:
Copy code
## Context 
Today is: {{current_time_Europe/Madrid}}
3. Ensure your Cal.com event type timezone matches: - Go to your Cal.com event type settings - Verify the timezone is set to Europe/Madrid - Check that your availability hours are configured correctly for that timezone 4. Known bug to be aware of: There was a previous bug where AM/PM times were being incorrectly interpreted [(1) ]() . This has been fixed, but ensure you're using the latest version of the Cal.com integration. The core issue is that without specifying
"timezone": "Europe/Madrid"
in your function configuration, the system defaults to a different timezone (Pacific Standard Time) , which is why you're seeing availability at completely different hours than expected [(2) ]() [(3) ]() . **
​ To learn more, see the sources I considered: [[1] When using check_calendar_availability function, I am getting all the times in AM (same timezone)](https://discord.com/channels/1186424376300679209/1291338582388248637) [[2] Check Calendar Availability](https://docs.retellai.com/build/check-availability) [[3] Book Calendar](https://docs.retellai.com/build/book-calendar) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
Thanks for the follow-up, @david_novo. I'll get back to you soon.
### Answer I don't see your prompt attached in your last message. Could you share a screenshot or paste the full prompt text you're currently using? This will help me identify any issues with how you've configured: 1. The main agent prompt - including your booking and availability check instructions 2. The function descriptions - for both "Check Calendar Availability" and "Booking" tools 3. The parameter schemas - especially for the timezone and attendee phone number fields Based on the error patterns you've shown, I suspect there may be issues with: - How the timezone parameter is being passed (or not passed) to the Cal.com functions [(1) ]() - The structure of your booking function parameters for the phone number field [(2) ]() - The prompt instructions telling the LLM when and how to invoke these functions [(3) ]() Once you share the prompt, I can provide specific guidance on what needs to be adjusted.
​ 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] Prompt Engineering Guide](https://docs.retellai.com/build/prompt-engineering-guide) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.