Hi there, I am trying to accommodate a business that wants to have their customers speak to their office staff during working hours but then to AI after working hours. How do you go about automating retelli going ‘off and online’ when needed? thanks
You can automate Retell AI to handle after-hours calls while routing to office staff during business hours using dynamic variables and SIP trunking features.(1)(2)
The recommended approach is to use dynamic variables in your agent’s prompt to control behavior based on office status.(3) You would populate an office_status variable from your server with values like OPEN or CLOSED, then include this in your main prompt: office_status is : {{office_status}}.(3)
Retell AI supports SIP trunking, which allows you to connect your existing phone numbers to the AI platform and schedule when those numbers are active with the AI, routing calls to the AI agent only during specific hours or days.(1) This provides flexibility to route calls to human staff during business hours and automatically switch to AI agents after hours.(1)
The platform can handle after-hours scenarios by answering questions, intaking information, and creating support tickets for the team to handle if the agent cannot properly assist the caller.(2) This ensures no caller is left with just a voicemail when your office is closed.(2)
For implementation, you would configure your phone system to forward calls to Retell AI based on your business hours schedule, and use the dynamic variable approach to adjust the agent’s behavior (such as offering appointments when closed versus transferring to staff when open).(3)
The most practical thing to do is to create a function in n8n where you control the schedules
You’re absolutely right—creating a custom function in n8n to control schedules is a practical approach when integrating Retell AI with n8n.(1)
The Retell AI + n8n integration allows you to automate call workflows using n8n’s visual editor, including building custom functions for tasks like calendar management and appointment scheduling.(1) You can install the Retell AI Community Node in n8n, add it to your workflow, and configure actions such as creating phone calls.(1)
When setting up custom functions like calendar checks, it’s important to ensure your webhooks are properly configured. If you encounter issues where the agent says “I don’t seem to be able to get that information,” verify that your webhook is actually being delivered to n8n (you can use webhook.site or n8n logs to check).(2) You may need to split your workflow into separate paths or use a Switch node to handle different webhook events like call_start versus calendar_check separately, and ensure the payloads differ so n8n doesn’t treat them as duplicates.(2)