When I use the call function to create, it creates it correctly. However, when I ask to cancel, it doesn’t have the appointment ID, the AI agent passes a random ID.
How can I get the ID of the appointment that was created that is in the create call function and use that same ID in the cancel appointment call function?
Maybe try checking the chat memory table to see if it is saving the appointment ID and prompt the AI to make sure to look for the appointment ID before deleting any appointment. Not sure if that will work but worth a shot.
have the ID returned in the answer of the AI agent when the event is first created…
alternatively, you may have to create a “Get Calendar Events” tool that finds calendar events within a time frame you set, that will return a list of calendar events, then you can specify which one to delete.
It would be interesting if the native function in the calendar already gave this information, rather than having to create a workaround. Is there a simpler way to do this?
If there is I’m not familiar with it… The AI agent I built for personal use has a create event, get events, delete event functions… I typically handle deletion by asking my agent to get events for a certain day then I ask it to delete a specific event after it’s returned a list of events including the event I want it to delete… There might be a better way but if there is I have not discovered it.