Back to all templates

out of working hours

Triage, auto-reply to, and escalate customer emails that arrive after hours.

Description:

On every new Gmail message, checks whether it arrived within business hours (Mon-Fri, 09:00-17:00 UTC). For emails received outside working hours, OpenAI classifies the urgency, the email is logged to a Google Sheet, and a condition branches: urgent emails get an AI-summarized internal Slack alert plus an urgent auto-reply, while non-urgent emails get an AI-generated helpful auto-reply.

Key Features:
  • New-email trigger
  • Business-hours detection via date helpers
  • AI urgency classification of the incoming email
  • Google Sheets logging of each out-of-hours email
  • Condition-based urgent vs. non-urgent handling
  • AI-generated auto-replies to the sender
  • Slack alerts to the internal team for urgent cases
Prerequisites:
  • Google Mail connection
  • OpenAI API key
  • Google Sheets connection with the logging spreadsheet
  • Slack connection with the alert channel
Ideal For:

Support teams that want after-hours customer emails triaged, auto-acknowledged, and escalated when urgent.

STEPS
  1. Trigger: a new Gmail message arrives.
  2. Get the current timestamp and check whether it falls within business hours.
  3. Condition: continue only if the email arrived outside working hours.
  4. Classify the email's urgency with OpenAI.
  5. Log the email and its classification to a Google Sheet.
  6. Condition: if urgent, generate an internal team message, send an urgent auto-reply, and post a Slack alert; if not urgent, generate and send a helpful auto-reply.
COMPONENTS
Google Mail
Date Helper
Open Ai
CATEGORYSupport

How ByteChef works?

Focus on what matters,
automate the rest.

ByteChef