@Nunu - Have you tried creating a new workflow and retrying the webhook? I just took both your start and end date strings and put them in a google calendar module and it worked with your exact values.
Another issue that could be happening is your webhook is sending some sort of space or hidden character that is causing the start date to not be parsed properly by the google calendar module. While unlikely, when something like this doesn’t work but appears to be completely correct, it’s often something like this.
In the meantime can you also export the blueprint for this flow and I can take a better look at it?
blueprint (4).json (15.1 KB)
Thank you! I copied the scenaria and created a new webhook… but still the same issue.
The function is called from vapi.ai. The scenario is successful when i test the endpoint manually. However, when I’m trying to book an appointment via the ai assistant in vapi its not successful. Before the booking function I run a “check_availability” function which is working great.
Does it have to do something with the fact that 2 operations are being created? I dont know why but its shown in the webhook info that there are two operations…
Here is the output bundle from the webhook with some minor changes to sensitive info: [
{
“message”: {
“type”: “function-call”,
“functionCall”: {
“name”: “book_appointment”,
“parameters”: {
“name”: “Christina”,
“descr”: “Asking questions”,
“email”: “nu@hotmail.com”,
“startTime”: “2024-04-16T13:00:00.000000+03:00”,
“endTime”: “2024-04-16T14:00:00.000000+03:00”
}
},
“call”: {
“id”: “c123d42d-4039-4aa8-b853-10b43980c6f1”,
“assistantId”: null,
“customerId”: null,
“phoneNumberId”: null,
“type”: “webCall”,
“startedAt”: “2024-04-10T17:08:14.480Z”,
“endedAt”: null,
“transcript”: null,
“recordingUrl”: null,
“summary”: null,
“createdAt”: “2024-04-10T17:08:08.728Z”,
“updatedAt”: “2024-04-10T17:08:15.338Z”,
“orgId”: “4ce32794-8382-4b51-8e58-4995398a607c”,
“cost”: 0,
“twilioCallSid”: null,
“twilioCallStatus”: null,
“webCallUrl”: “https://vapi.daily.co/6saSY6LEnlsAWzJEeq91”,
“assistant”: {
“name”: “cs”,
“model”: {
“model”: “gpt-4”,
“messages”: [
{
“role”: “system”,
“content”: "You are Nour’s assistant and you help users to book an appointment with Nour. The current year is 2024. \n\nStep 1: Ask the user to suggest a date for the appointment. Take their word exactly as it is. Example: If they say "tomorrow", say "tomorrow".\n\nStep 2: Confirm the suggested time for the appointment with the user. \n \nStep 3: Run the ‘check_availability’ function to check Nour’s availability.(dont say that out aloud)\n\nStep 4: List three available times. \n\nStep 5: Make sure the user chooses an available time slot you mentioned before. \n\nStep 6: If the user wants to book an appointment within the available times, ask for the following information. Ask one by one:\n- Name (only ask if it wasn’t mentioned before)\n- Start time of the appointment\n- Email\n- The purpose of the appointment.\n\nStep 7: Confirm the email, start time, and purpose of appointment with the user. Correct if necessary. If you corrected any information, repeated it again to confirm with the user. \n\nStep 8: Use ‘book_appointment’ function to book the appointment. \n\nStep 9: Wait for a webhook response to confirm the booking. If you don’t recieve a confirmation it means that there was a problem.\n\nAlways make sure that the time slot is available before booking an appointment. \n\n- Be sure to be kind of funny and witty!\n- Keep all your responses short and simple. Use casual language, phrases like "Umm…", "Well…", and "I mean" are preferred.\n- This is a voice conversation, so keep your responses short, like in a real conversation. Don’t ramble for too long.\n- Don’t say "hundred" when talking about times. Example: 9am "
}
],
“provider”: “openai”,
“functions”: [
{
“name”: “check_availability”,
“async”: false,
“serverUrl”: “https://hook.eu2.make.com/mbnbz2hs7t317n2ry5uuwnd56s3kqnyv”,
“parameters”: {
“type”: “object”,
“properties”: {
“times”: {
“type”: “string”,
“description”: “The user’s requested date of the appointment.”
}
}
},
“description”: "Use this function to check Nour’s availability. "
},
{
“name”: “book_appointment”,
“async”: false,
“serverUrl”: “https://hook.eu2.make.com/vnvpkg8xdd869hmk7li665eryqsjiae7r”,
“parameters”: {
“type”: “object”,
“properties”: {
“name”: {
“type”: “string”,
“description”: “User’s name.”
},
“descr”: {
“type”: “string”,
“description”: “A description of the appointments purpose.”
},
“email”: {
“type”: “string”,
“description”: “the user’s email”
},
“endTime”: {
“type”: “string”,
“description”: “End time of the slot you want to book. The date and time must be formated like this example:2024-04-18T12:00:00.000000+03:00”
},
“startTime”: {
“type”: “string”,
“description”: “Start time of the slot you want to book. The date and time must be formated like this example:2024-04-18T12:00:00.000000+03:00”
}
}
},
“description”: “Use this function to book the appointment, after you checked for its availability”
}
],
“maxTokens”: 250,
“temperature”: 0.4
},
“voice”: {
“voiceId”: “sarah”,
“provider”: “11labs”,
“stability”: 0.5,
“similarityBoost”: 0.75
},
“parentId”: “b02a926a-7974-45a5-aece-b2cd76d98dc0”,
“serverUrl”: null,
“transcriber”: {
“model”: “general”,
“provider”: “deepgram”
},
“firstMessage”: “Hello this is Mary. How can I assist you today?”,
“hipaaEnabled”: false,
“clientMessages”: [
“transcript”,
“hang”,
“function-call”,
“speech-update”,
“metadata”,
“conversation-update”
],
“endCallMessage”: “Thank you for contacting us. Have a great day!”,
“endCallPhrases”: [
“goodbye”
],
“serverMessages”: [
“end-of-call-report”,
“status-update”,
“hang”,
“function-call”
],
“serverUrlSecret”: null,
“recordingEnabled”: true,
“voicemailMessage”: “You’ve reached our voicemail. Please leave a message after the beep, and we’ll get back to you as soon as possible.”,
“forwardingPhoneNumber”: null,
“endCallFunctionEnabled”: false,
“dialKeypadFunctionEnabled”: false
},
“phoneNumber”: null,
“customer”: null,
“status”: “in-progress”,
“endedReason”: null,
“messages”: null,
“maxDurationSeconds”: null,
“stereoRecordingUrl”: null,
“costBreakdown”: null,
“metadata”: null,
“phoneCallProvider”: null,
“phoneCallProviderId”: null,
“webCallSipUri”: null,
“forwardedPhoneNumber”: null,
“phoneCallTransport”: null,
“phoneCallProviderBypassEnabled”: null,
“phoneCallProviderDetails”: null
}
}
}
]
Hey there @Nunu - I’m still reviewing, but I just noticed you have both an end date and a duration and Make asks that you only specify one or the other.
Can you try and update the scenario to not include an end date or duration and see if that does the trick? I don’t think it will but it’s worth trying.
Thank you! Its still not working. I tried the make an api call module instead of the create event module and still the end and start times are not passed over to the google calender module. Whats strange though, the scenario is still being executed sucessfully but i dont get any events created in my calender.
Running just the calender module with the same values pasted in, works. I have no idea how the data is lost inbetween the modules.
Alright - what seems obvious now, was not yesterday! @Nunu - as we can see by the variable with no background color, Make is trying to tell us that the variable being passed in there is orphaned therefore it will not be getting any value and is the reason why the scenario is failing to get the start date!
Either way glad we were able to connect and solve it!
and a common way to solve this issue is by using the built-in function ifempty
with ignore
e.g.:
{{ ifempty( variable; ignore ) }}
So the field will not be sent with an invalid value if the variable does not exist.
For more information, see