Rescheduling automation running into problems

Hello!

I am creating a scenario to take a timeslot from a retell ai agent and reschedule an appointment in Cal.com, I have followed their documentation for my formatting and it is still returning as well as failing to reschedule the appointment,

Here is the mapping function I have used to set the UID variable,

And here is the Value of UID once it is mapped,

Its showing here as an empty set of brackets, I have made a module to Email me the UID data just to make sure there’s nothing there and thee email appears empty as well, I am at a loss in terms of solutions to this, It returns nonspecific 500 errors whenever I run the scenario without error handler modules, I am assuming this is due to the lack of data coming through, Below is a screenshot of my entire scenario.

Please forgive me if I’m omitting anything important, It’s my first time posting here, I’ll gladly provide additional details if they will help.

Any help with this issue would be greatly appreciated.

Thank you for your time.

Hey there,

can you show what the data array looks like?

Hello Stoyan!

Of course, here is the data array

Judging by your formula, you are trying to get the UID where the bookingFieldsResponses.phone matches a phone variable coming from the webhook, but in the screenshot of the data array I don’t see such a field.

1 Like

I think you are right there, didn’t consider that, thank’s for pointing that out, I think the issue now is trying to find a way to source that from the booking, thank you for your help on this.

Hello again!

I have done some more testing and it appears that there is a phone number nested further in the data bundle, did you have a second most likely issue in mind?

Are there more than one attendee per event?

Ideally can you extract the entire output bundle from the HTTP module and paste it here?

Hello, here is the data payload,

Http Drive MR data payload.txt (21.0 KB)

Ok if there is only one attendee per UID, then you need this formula:

{{first(map(1.data.data; "uid"; "attendees[1].phoneNumber"; 2.`phone number`))}}

Just replace 1.data.data and 2.phone number with whatever variables you have

I have changed the map function to the following,

Which, when receiving data now gives me this error

Screenshot 2025-10-01 130544

I apologise if this is me misinterpreting your advice.

Ok but you have 4.data.data twice. The second one should be the phone variable coming from the webhook.

1 Like

Thank you for your help, this has worked and gotten rid of the error from the map function, now I am going to get in contact with cal.com to see where the server error is coming from.

Thanks again :slight_smile: