https://retellai.com/?utm_source=discord&utm_medium=seo logo
<@1145576664366055464> need to create custom funct...
# ❓・ai-evy-support
d
@AI Evy need to create custom function to cancel appointment on cal.com or google calendar when someone needs to cancel on the call
a
Thanks for tagging me @deelowdeeznuz. I'll look through relevant sources and get back to you shortly.
----------------------------- **While I generate an answer, here are some sources that might be helpful**: * [Book Calendar]() * [LLM WebSocket]() * [Integrate LLM]() * [Automate Scheduling with AI Appointment Booking | Retell AI]() -----------------------------
### Answer Based on the available documentation, I can provide guidance on creating a custom function for appointment cancellation. Here's what we know: Custom Function Setup: To create a custom function for cancellation, you'll need to: [(1)]() 1. Configure a unique function name and description 2. Add an endpoint URL where Retell will send POST requests 3. Define parameters using JSON schema format Here's an example structure for defining parameters (adapted from the documentation):
Copy code
javascript
{
  "type": "object",
  "properties": {
    "city": {
      "type": "string",
      "description": "The city of the weather"
    }
  },
  "required": [
    "city"
  ]
}
For calendar integration specifically: [(2)]() - Currently, Retell AI natively integrates with Cal.com - For Google Calendar integration, you'll need to write a custom function to connect For verifying requests from Retell, you can use this verification pattern: [(1)]()
Copy code
javascript
import { Retell } from "retell-sdk";

this.app.post("/check-weather", async (req: Request, res: Response) => {
  if (
    !Retell.verify(
      JSON.stringify(req.body),
      process.env.RETELL_API_KEY,
      req.headers["x-retell-signature"] as string,
The available documentation doesn't provide specific implementation details for cancellation functionality. You would need to implement the cancellation logic in your custom function endpoint using the appropriate calendar API (Cal.com or Google Calendar) based on your needs.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.