https://retellai.com/?utm_source=discord&utm_medium=seo logo
Does anyone know how to configure 2 calendars in o...
# ❓・ai-evy-support
k
@AI Evy Does anyone know how to configure 2 calendars in one agent? The goal is, the agent will check the availability depending on what State the caller is in. We have 2 calendars set up for each dedicated State. Thank you for your input, y'all!
a
Thanks for tagging me @katecardenas_67927. I'll look through relevant sources and get back to you shortly.
[(2) ]() 3. Important Considerations - You can use multiple checking functions, but you need to be very specific about which one to use in your prompt [(1) ]() - Be specific in the prompt about what to use as the start and end times when calling the function - For better results, you can also use custom functions and determine which calendar to use on your backend The key is making your prompt logic clear about when to use each calendar based on the caller's state information.
### Answer Yes, you can configure multiple calendars in one agent. You'll need to add separate calendar functions for each state and use your prompt to determine which calendar to check based on the caller's location [(1) ]() . Here's how to set this up: 1. Add Multiple Calendar Functions Add a check calendar availability function for each state in your agent [(2) ]() . Each function should have: - Tool name (must be unique within that agent) - API Key from cal.com - Event Type ID for that specific state's calendar - Tool description (example: "Checks availability for 30-minute consultation calls") - Optional timezone 2. Configure Your Prompt You need to be very specific in your prompt about when to use each calendar function [(1) ]() . Include logic that determines which calendar to check based on the caller's state. For example:
Copy code
When user states their location, determine which state they are in. If they are in [State A], use the check_calendar_availability_state_a function. If they are in [State B], use the check_calendar_availability_state_b function. When user stated a time range, please check the calendar availability by calling the appropriate function and let user know whether that range work or not.
​ To learn more, see the sources I considered: [[1] Multiple calendar availability functions?](https://discord.com/channels/1186424376300679209/1397338184739979395) [[2] Check Calendar Availability](https://docs.retellai.com/build/check-availability) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
k
How do I integrate it using GHL and N8N?
@AI Evy
a
Thanks for the follow-up, @katecardenas_67927. I'll get back to you soon.
### Answer To integrate Retell AI with GoHighLevel (GHL) and n8n for your calendar setup, you'll need to use n8n as the middleware to bridge the connection between GHL and Retell AI [(1) ](

▾

) . ## Setting Up the Integration Step 1: Install the Retell AI Community Node in n8n [(2) ]() - Open your n8n dashboard - Go to Settings → Community Nodes - Search for Retell AI and click Install - Confirm the installation when prompted Step 2: Add the Retell AI Node to Your Workflow - In the n8n workflow editor, click the "+" icon to add a new node - Search for Retell AI - Choose the action you want to automate (e.g., Create a phone call) - Paste in your Retell AI API key from your dashboard ## Integration Architecture For your multi-calendar setup, n8n will serve as the automation platform to create workflows and bridge the connection between GHL and Retell AI [(1) ](

▾

) . GHL functions as your CRM where your calendars are stored, while n8n handles the workflow automation between systems . ## Custom Function Approach For more complex calendar logic based on caller states, you can set up custom functions that connect to your GHL calendars through n8n workflows [(3) ]() . This approach allows you to: - Process incoming requests from Retell AI - Verify the request's authenticity by checking the X-Retell-Signature header - Extract parameters from the request body (like caller state) - Perform necessary operations (database queries to determine appropriate calendar) - Return results in JSON format The n8n integration gives you flexibility to start launching AI-powered phone call workflows without writing code [(2) ](https
://www.retellai.com/integrations/n8n) , while connecting to your GHL calendar system based on the caller's state information. **Security Note**: To verify requests are coming from Retell, check the X-Retell-Signature header, which is an encrypted request body using your secret key [(3) ]() .
​ To learn more, see the sources I considered: [[1] Live Workshop: Retell x GoHighLevel Integration](

https://www.youtube.com/watch?v=TlzrfYgiPLQ▾

) [[2] Connect AI call agent to n8n](https://www.retellai.com/integrations/n8n) [[3] Voice API: Integrate Phone AI Agents with Your System | Retell AI](https://www.retellai.com/blog/how-to-integrate-phone-ai-agents-with-your-existing-api-systems) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.