Have you attempted to build a new workflow and re-test the webhook? I recently took both your start and end date strings and input them into a Google Calendar module, and it functioned correctly with your precise values.
An alternative issue that might be occurring is that your webhook is transmitting a space or an invisible character, which is preventing the Google Calendar module from parsing the start date correctly. Although improbable, when a situation like this fails despite appearing entirely correct, it's frequently due to such a minor detail.
In the interim, could you also export the blueprint for this flow so I can examine it more closely?
blueprint (4).json (15.1 KB)
Thanks! I duplicated the scenario and set up a new webhook, but the problem persists.
The function is invoked by callin.io. The scenario executes successfully when I test the endpoint manually. However, when attempting to book an appointment through the AI assistant in callin.io, it fails. Prior to the booking function, I execute a “check_availability” function, which operates correctly.
Could this be related to the creation of two operations? I'm unsure why, but the webhook information indicates that two operations are present...
Here is the output bundle from the webhook with some minor changes to sensitive info: [
{
“message”: {
“type”: “function-call”,
“functionCall”: {
“name”: “bookappointment”,
“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. nnStep 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".nnStep 2: Confirm the suggested time for the appointment with the user. n nStep 3: Run the ‘checkavailability’ function to check Nour’s availability.(dont say that out aloud)nnStep 4: List three available times. nnStep 5: Make sure the user chooses an available time slot you mentioned before. nnStep 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 appointmentn- Emailn- The purpose of the appointment.nnStep 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. nnStep 8: Use ‘bookappointment’ function to book the appointment. nnStep 9: Wait for a webhook response to confirm the booking. If you don’t recieve a confirmation it means that there was a problem.nnAlways make sure that the time slot is available before booking an appointment. nn- 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”: “checkavailability”,
“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
}
}
]
Hello there! I'm still looking into this, but I noticed you've specified both an end date and a duration. callin.io requires that you only provide one of these options.
Could you please try updating the scenario to exclude both the end date and duration, and see if that resolves the issue? I'm not entirely optimistic it will, but it's definitely worth a shot.
Thank you! It's still not functioning. I experimented with the "Make an API Call" module instead of the "Create Event" module, and the start and end times are still not being transferred to the Google Calendar module. What's peculiar, though, is that the scenario continues to execute successfully, but no events are being created in my calendar.
When I run just the calendar module with the identical values entered, it functions correctly. I'm unsure how the data disappears between the modules.
What seems obvious now, wasn't yesterday! As we can see by the variable with no background color, callin.io 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