1. The business
2. A call comes in at...
3. What Twilio gets back (TwiML)
Returned by the Twilio Voice In webhook. Fake 555 numbers.
4. What your AI agent gets (business_status tool)
Vapi or Retell calls this before it offers to transfer. It never transfers in the last few minutes or after hours.
How it works
- Never read the hour from the server. The router reads the clock in your timezone with
Intl, so it works on n8n Cloud, Docker in UTC, or a laptop. - Hours are shifts.
08:00-12:00and13:00-17:00is a lunch break.16:00-02:00runs past midnight and belongs to the day it starts. - Holidays and special hours override a date. The caller hears why and when you open next.
- Last call. In the last 10 minutes it stops ringing the team, so nobody picks up a call at 4:59 they cannot finish.
- Nobody answers? Twilio posts back to Twilio Dial Status. The caller goes to your AI agent or voicemail, and the missed call is handed to your flow.
- Bad settings fail safe. A typo in the timezone or hours means "closed", so callers still reach voicemail and nobody is rung at 3 AM.
Free n8n workflow, tests, and setup: github.com/nobsai-hq/after-hours-router
Want it set up on your number? Text SETUP to (470) 779-2869