# Custom Function pass a dynamic variable to cal.com

**URL:** <https://community.retellai.com/t/custom-function-pass-a-dynamic-variable-to-cal-com/994>\
**Category:** Support Help\
**Tags:** general\
**Created:** [March 7, 2026, 12:23am UTC](https://community.retellai.com/t/custom-function-pass-a-dynamic-variable-to-cal-com/994 "2026-03-07T00:23:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![matthewkwok](https://yyz2.discourse-cdn.com/flex008/user_avatar/community.retellai.com/matthewkwok/32/992_2.png) [@matthewkwok](https://community.retellai.com/u/matthewkwok)\
**Post date:** [March 7, 2026, 12:23am UTC](https://community.retellai.com/t/custom-function-pass-a-dynamic-variable-to-cal-com/994/1 "2026-03-07T00:23:42Z")

</div>

Does anyone know how to setup a custom function for booking a specific cal dot comevent type and also pass along to cal dot com the reason/context for setting up the call that I conveniently saved as a dynamic variable called {{clientInquiry}}. The mapping to the cal dot com meeting is to fill in the {{notes}} header.

The below is the error. You can see that the {{clientInquiry}} is passing into the {{notes}} header.

“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”,“2026-03-07T00:12:02.894Z”,“/v2/bookings?eventTypeId=4768921&notes=I%20just%20need%20help%20with%20immigration%20visa%20to%20Canada”,{“code”:“5”,“message”:“6”,“details”:“7”},“BadRequestException”,"call property is wrong,property call should not exist , name property is wrong,property name should not exist , args property is wrong,property args should not exist , start property is wrong,start must be a valid ISO 8601 date string , attendee property is wrong,attendee should not be null or undefined , eventTypeId or eventTypeSlug + username property is wrong,Either eventTypeId or eventTypeSlug + username or eventTypeSlug + teamSlug must be provided ",{“message”:“6”,“error”:“8”,“statusCode”:400},“Bad Request”]”

This is my JSON schema:

{  
“type”: “object”,  
“required”: [  
“start”,  
“attendee”  
],  
“properties”: {  
“start”: {  
“type”: “string”,  
“description”: “ISO 8601 date string for appointment start time”  
},  
“eventTypeId”: {  
“type”: “number”,  
“const”: 4768921  
},  
“attendee”: {  
“type”: “object”,  
“properties”: {  
“name”: {  
“type”: “string”,  
“description”: “{{clientFullName}}”  
},  
“email”: {  
“type”: “string”,  
“description”: “{{clientEmailAddress}}”  
}  
}  
}  
}  
}

---

<div class="post-metadata">

**Author:** ![dev.developerforge](https://yyz2.discourse-cdn.com/flex008/user_avatar/community.retellai.com/dev.developerforge/32/1012_2.png) [@dev.developerforge](https://community.retellai.com/u/dev.developerforge)\
**Post date:** [March 9, 2026, 7:33pm UTC](https://community.retellai.com/t/custom-function-pass-a-dynamic-variable-to-cal-com/994/2 "2026-03-09T19:33:27Z")

</div>

From what I know, you first have to ensure the fields exist in cal dot com Event settings (under advanced settings) and then use the proper json schema to book i.e.  
{  
“start”: “{{appointmentStart}}”, // this has to be in ISO format like so: 2026-03-10T14:00:00Z  
“eventTypeId”: [event type id] ,  
“attendee”: {  
“name”: “{{clientFullName}}”,  
“email”: “{{clientEmailAddress}}”  
},  
“notes”: “{{clientInquiry}}”  
}

You can either have these variables in notes section of your cal booking or in individual fields. Fields like name, phone, email and notes are predefined.

---

<div class="post-metadata">

**Author:** ![support2](https://yyz2.discourse-cdn.com/flex008/user_avatar/community.retellai.com/support2/32/15_2.png) [@support2](https://community.retellai.com/u/support2)\
**Post date:** [March 9, 2026, 10:37pm UTC](https://community.retellai.com/t/custom-function-pass-a-dynamic-variable-to-cal-com/994/3 "2026-03-09T22:37:12Z")

</div>

| |

| 

![](https://canada1.discourse-cdn.com/flex008/uploads/retell1/original/1X/d0b412fcce037a51852c109a5aed74c70c9b57b3.png)

 |
| 

We’d love to get your feedback!

 |

[

| 

 ![](https://canada1.discourse-cdn.com/flex008/uploads/retell1/original/1X/60f995f8d6bbf20fcb0ef402ecfcc7d5633c8e43.png)

 |

](https://portal.usepylon.com/retell-ai/csat?data=eyJjb250YWN0SUQiOiJjMjFlMjZiNy1lMGUwLTQxOTQtODkyMC0wYmE4NTlhZWQ0NzMiLCJ1c2VySUQiOiIiLCJzdXJ2ZXlJRCI6ImE4NTk3N2FhLWU1YTItNDVkZC04NjAzLWJiMmJhMDQ3YjUxZiIsInNjb3JlIjoxfQ==)[

| 

 ![](https://canada1.discourse-cdn.com/flex008/uploads/retell1/original/1X/afb52356231e1199230a4014a5810534b67bbd80.png)

 |

](https://portal.usepylon.com/retell-ai/csat?data=eyJjb250YWN0SUQiOiJjMjFlMjZiNy1lMGUwLTQxOTQtODkyMC0wYmE4NTlhZWQ0NzMiLCJ1c2VySUQiOiIiLCJzdXJ2ZXlJRCI6ImE4NTk3N2FhLWU1YTItNDVkZC04NjAzLWJiMmJhMDQ3YjUxZiIsInNjb3JlIjoyfQ==)[

| 

 ![](https://canada1.discourse-cdn.com/flex008/uploads/retell1/original/1X/bc969c81de37f5d27a3ef7e6464ce957ec40e3cc.png)

 |

](https://portal.usepylon.com/retell-ai/csat?data=eyJjb250YWN0SUQiOiJjMjFlMjZiNy1lMGUwLTQxOTQtODkyMC0wYmE4NTlhZWQ0NzMiLCJ1c2VySUQiOiIiLCJzdXJ2ZXlJRCI6ImE4NTk3N2FhLWU1YTItNDVkZC04NjAzLWJiMmJhMDQ3YjUxZiIsInNjb3JlIjozfQ==)[

| 

 ![](https://canada1.discourse-cdn.com/flex008/uploads/retell1/original/1X/2147b63ddd3eb5bc510ca24b9956d1991937e31f.png)

 |

](https://portal.usepylon.com/retell-ai/csat?data=eyJjb250YWN0SUQiOiJjMjFlMjZiNy1lMGUwLTQxOTQtODkyMC0wYmE4NTlhZWQ0NzMiLCJ1c2VySUQiOiIiLCJzdXJ2ZXlJRCI6ImE4NTk3N2FhLWU1YTItNDVkZC04NjAzLWJiMmJhMDQ3YjUxZiIsInNjb3JlIjo0fQ==)[

| 

 ![](https://canada1.discourse-cdn.com/flex008/uploads/retell1/original/1X/8b6aa135342e1b0026b612c31bb983877feb21fb.png)

 |

](https://portal.usepylon.com/retell-ai/csat?data=eyJjb250YWN0SUQiOiJjMjFlMjZiNy1lMGUwLTQxOTQtODkyMC0wYmE4NTlhZWQ0NzMiLCJ1c2VySUQiOiIiLCJzdXJ2ZXlJRCI6ImE4NTk3N2FhLWU1YTItNDVkZC04NjAzLWJiMmJhMDQ3YjUxZiIsInNjb3JlIjo1fQ==) [

| 

Powered by

 |

| 

 ![](https://canada1.discourse-cdn.com/flex008/uploads/retell1/original/1X/3da48224fb812a2ab52cd9e53fd647efb094e1da.png)

 | 

Pylon

 |

](https://usepylon.com)

[Unsubscribe](https://subscriptions.pstmrk.it/unsubscribe?m=1.50U6tK8tajo2RAChrqkZDg.KS8FY4vTa9_Vy_w4WblM2px32m_-14LMzXHCvocbNPxKGpDeSkXm5rsgPpsma_FGILCyLK9oTWPtVQAwd-5KWHi1xDnyINzbEpSHc67wXlA0kvtC3WolnhFYjQ5Gd1hmBqugVOWoG5G7ExJ5FKNgGQk2DmjRFGyseFuZrR107KSBMZA2N67jPhZy7tE3Ua9eQQD8WKU5dvzyRigNvaj-pzZtepzbVqtS3VXqffCkfTtntja7vaOA36KYe-aFaJMpG7Lfu1cHfVct12MPzAjQ3xnDP9IvkGdVar3kdXRMXqg4GsmLdxxJSGL7-6vgcH7vMWtX1VoTGMRyqFKH5ha6cxQploGTSKwuC4kLZirWID2dM1u9pmCNxCQ9kxJh--V98v11peBIkGNs-E27XnjmbrNbdb3DvuHr9P0MZubzdXEmXEw8OKxWRDqSCV6_bbcnBbNRytvud_IzuPRaYehxGxxR7mcSX_iaWd9c-CJhBmVJe45Gzfg-aYMVNVTsfLGt16VhPTfBYrU7h0jTdUpmMQ)

![](https://canada1.discourse-cdn.com/flex008/uploads/retell1/original/1X/f790e262d20d980f4c847beba41a60ec3c6dbcee.png)
