Eric Chong | HSFM
11/20/2024, 4:29 AMVapi
11/20/2024, 4:32 AMVapi
11/20/2024, 4:32 AMEric Chong | HSFM
11/20/2024, 4:55 AMShubham Bajaj
11/20/2024, 5:45 PMEric Chong | HSFM
11/21/2024, 2:39 AMShubham Bajaj
11/21/2024, 12:07 PMadvanced-date-and-time-usage
https://docs.vapi.ai/assistants/dynamic-variables#advanced-date-and-time-usage. Do let me know if you face any difficulty or require further help.Eric Chong | HSFM
11/22/2024, 4:19 AMReferred By
}}"
}
}
{{{{now}} | date: "%b %d, %Y, %I:%M %p", "{{1.timezone}}"}}
https://cdn.discordapp.com/attachments/1308650480821338123/1309372552753188904/image.png?ex=674157b7&is=67400637&hm=a9fefab49a3ed6166485f80a562d46d244cdd2853df34ef8ebd060ecb8511003&Eric Chong | HSFM
11/22/2024, 4:19 AMEric Chong | HSFM
11/22/2024, 4:40 AMEric Chong | HSFM
11/22/2024, 4:42 AMShubham Bajaj
11/22/2024, 2:18 PM""appointmentTime"": ""now" | date:}}%Y-%m-%dT%H:%M:%SAmerica/Los_Angeles"
inside your prompt as visible in the docs.Shubham Bajaj
11/22/2024, 2:18 PMEric Chong | HSFM
11/23/2024, 1:37 AMEric Chong | HSFM
11/23/2024, 1:38 AMEric Chong | HSFM
11/23/2024, 3:55 AM{{
as variables, which alters the formatting of your request.
To send the correct request to VAPI, I recommend using the toString() function for both opening and closing curly brackets, as shown in the screenshot below:
ā{{toString("{{")}}"now" | date: "%b %d, %Y, %I:%M %p", "America/New_York"{{toString("}}")}}
This approach ensures that the curly brackets are treated as plain text rather than variables, allowing the rest of the required code to remain intact. Hope it helps!
I've tried in all three locations and its still not passing, so make it sending the request but its seems its giving an error.
https://cdn.discordapp.com/attachments/1308650480821338123/1309728919812833290/Snag_7e28082.png?ex=6742a39c&is=6741521c&hm=c9c6142dbcd513e5124566b729b1763a9d433190ba30ef23db7daff614887b05&
https://cdn.discordapp.com/attachments/1308650480821338123/1309728920018485308/Snag_7e287c6.png?ex=6742a39c&is=6741521c&hm=f8ad5f10c1ed84eb042358dd2acf520dcc4cf897c16db33db544ac83b41b3a60&
https://cdn.discordapp.com/attachments/1308650480821338123/1309728920328736768/Snag_7e29090.png?ex=6742a39c&is=6741521c&hm=bea19b96205d0d3673a004e77efb56d07b938aa7629094e1d810ff7199941fd4&Eric Chong | HSFM
11/23/2024, 3:55 AMShubham Bajaj
11/27/2024, 9:11 AMtoString
curl -X POST https://api.vapi.ai/call \
-H "Authorization: Bearer token-here" \
-H "Content-Type: application/json" \
-d '{
"assistantId": "insert-assistant-id-here",
"assistantOverrides": {
"variableValues": {
"currentDateTimeInUTC": "{{\"now\" | date: \"%b %d, %Y, %I:%M %p\", \"America/New_York\"}}"
},
"metadata": {
"referredBy": "<insert-refered-by-here> {{\"now\" | date: \"%b %d, %Y, %I:%M %p\", \"America/New_York\"}}\n"
}
},
"phoneNumberId": "insert-phone-number-id-here",
"customer": {
"numberE164CheckEnabled": false,
"number": "insert-customer-number-here",
"name": "insert-customer-name-here"
}
}'
Joe Merritt
11/30/2024, 5:49 PMShubham Bajaj
12/03/2024, 9:18 AM