After-hours call router for n8n

"Is the shop open right now?" Your server does not know. It runs on its own clock, often UTC or New York. This free n8n workflow checks your hours in your business's timezone, with lunch breaks, holidays, special hours, past-midnight shifts, and daylight saving. Open: it rings your team. Closed: it sends the caller to your AI agent or a voicemail that says when you open.

The forum question it answers: "Attempting to create a Business Hours If statement ... keeps failing no matter the time" (n8n community, Feb 2025).

This page runs in your browser and sends nothing. No forms, no tracking, no network calls after it loads. It runs the same logic.js as the n8n workflow.

1. The business

2. A call comes in at...

Pick a moment.

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

  1. 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.
  2. Hours are shifts. 08:00-12:00 and 13:00-17:00 is a lunch break. 16:00-02:00 runs past midnight and belongs to the day it starts.
  3. Holidays and special hours override a date. The caller hears why and when you open next.
  4. Last call. In the last 10 minutes it stops ringing the team, so nobody picks up a call at 4:59 they cannot finish.
  5. 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.
  6. 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