Back to blog
How-toJuly 26, 2026· 13 min· Victor R
Gmail AutomationAuto ReplyAfter Hours EmailOut of OfficeShared InboxGoogle Apps ScriptAI Email AssistantGmailInboxPilot

Gmail Auto Reply After Hours: Setup and Workarounds

Gmail's vacation responder runs whole days only, 12:00 AM to 11:59 PM, so there is no native after-hours auto reply. Here are three setups that work.

Gmail Auto Reply After Hours: Setup and Workarounds

It is 6:40pm on a Friday. A quote request lands in support@, the person who answers those left at five, and the next human eyes on that inbox arrive Monday at nine. The sender gets nothing back. Not a price, not a timeline, not even a note confirming a real company received it.

So you go looking for the Gmail after-hours auto reply setting, the one that fires only outside business hours. It is not there. What follows is what Gmail actually does, why the obvious workarounds miss, and the three setups that hold up.

Disclosure: we make InboxPilot, an AI email assistant that drafts replies inside Gmail and Outlook using your own documents and policies. Option 3 below is our category, and we are explicit about where it does not belong: no AI should be sending a customer a firm price or a refund decision at 2am with nobody watching.

TL;DR

What a next-morning reply actually costs

Expectations for email are tighter than most teams assume. In 2018, a survey of more than 1,200 consumers by Toister Performance Solutions found that a one-hour email response satisfied 89% of them. At four hours it was 70%, and at twenty-four hours it fell to 56% (Toister Performance Solutions, "How Fast Should a Business Respond to an Email?", 2018).

Share of customers satisfied by email response timeSurvey data from Toister Performance Solutions, 2018, of more than 1,200 consumers. A one hour response satisfies 89 percent of consumers, four hours satisfies 70 percent, and twenty-four hours satisfies 56 percent. A reply sent the next business day falls beyond the range the survey measured.Share of customers satisfied by email response timeToister Performance Solutions, survey of 1,200+ consumers, 2018Within 1 hour89%Within 4 hours70%Within 24 hours56%0%50%100%A Friday evening email answered Monday morning is roughly a 60 hour reply.

That survey is from 2018, and the direction of travel since then has not been gentler. Zendesk's CX Trends 2026 report, based on 11,297 respondents across 22 countries, found 74% of consumers expect customer service to be available around the clock and 88% say they expect faster responses than they did a year ago (Zendesk, CX Trends 2026).

Now do the arithmetic on a Friday evening. An email that arrives at 6:40pm Friday and gets answered at 9am Monday is not a twenty-four-hour reply. It is roughly a sixty-hour one.

How much mail actually lands outside hours? Here the honest answer is that no good public figure exists for customer inboxes. The nearest measurement comes from internal IT help desks: Fixify's 2026 benchmark of more than 50,000 tickets across 30-plus organizations found 76% arrived between 9am and 6pm on weekdays, leaving 24% outside that window (Fixify, "2026 IT Help Desk Benchmark Report").

Treat that 24% as a floor rather than a proxy. Employees file tickets while they are at work. Your customers email whenever they happen to think of it, which skews later, not earlier.

Why Gmail cannot do a true after-hours auto reply

Gmail's vacation responder gives you exactly two scheduling controls: a first day and a last day. Google's own documentation is blunt about what happens between them. As of 2026, the Gmail Help page states that "your automatic reply starts at 12:00 AM on the start date and ends at 11:59 PM on the end date, unless you end it earlier" (Google, Gmail Help, "Send an automatic reply when you're out of office", retrieved 2026-07-26).

A calendar day is the smallest unit it understands. There is no hour field, no "outside these times" checkbox, and no weekday pattern.

That constraint is why the intuitive fix backfires. Say you enable the responder Monday through Friday to cover the evenings. It now also replies to the 10:15am email from a customer you are mid-conversation with, telling them you are away while you sit at your desk. You have not built an after-hours reply. You have told everyone, all week, that nobody is home.

The workaround people try next is toggling it on at close and off at open. That works exactly as long as somebody remembers, which is until the first busy Friday.

The four-day rule that leaves repeat senders in silence

Even when the responder is on, it does not reply to every message. Gmail sends it to a given person again only when "the same person contacts you again after four days and your automatic reply is still on" (Google, Gmail Help, "Send an automatic reply when you're out of office", retrieved 2026-07-26).

For a personal vacation that is thoughtful design. It stops the loop where your responder and someone else's responder email each other all week.

For a shared support inbox it is a trap. Picture a customer who emails Monday at 8pm and, hearing nothing useful, emails again Tuesday at 8pm. The first message gets your auto reply. The second gets nothing at all, because four days have not passed. The sender's reasonable read is that you ignored them, and the second email is usually the more urgent one.

Worth knowing: the four-day rule is measured per sender, not per thread, and it is invisible in the Gmail interface. There is no counter and no log telling you which senders were skipped. Teams who set this up for a support inbox usually discover the gap from a customer complaint rather than from Gmail.

Why filters and templates do not solve it either

The next suggestion in most forum threads is to skip the vacation responder and build a filter that applies a saved template. It is a reasonable instinct, and it fails for a specific reason: Gmail filters match on the message, never on the clock.

Filters are built from Gmail's search criteria, and the date operators there work in days. Google documents after:, before:, older_than: and newer_than:, with relative units of days, months, or years (Google, Gmail Help, "Refine searches in Gmail", retrieved 2026-07-26). There is no recurring time-of-day condition to be had, which is the part that matters: even where an absolute timestamp can be expressed, it describes one fixed moment, not "every evening."

So a filter can reply to everything from a given sender, or everything with "invoice" in the subject. It cannot reply to everything that arrived after 6pm. Wire up a filter with a template and you have built a 24-hour auto responder that also fires at 11am on a Tuesday.

One narrower version does work: if your after-hours volume arrives through a web form that stamps its own subject line, a filter on that subject gets you close. That covers form submissions and nothing else, which for most shared inboxes is a minority of the overnight pile.

Outlook can do time windows, Gmail cannot

This is worth knowing if you run both, or if you are choosing between them. Microsoft's automatic replies include a "Send replies only during a time period" option, and the fields accept start and end times rather than just dates (Microsoft, "How to set up out of office automatic replies in Outlook", retrieved 2026-07-26).

So an Outlook user can genuinely cover 6pm Friday to 9am Monday with the built-in feature. Gmail ships no equivalent, which is why every Gmail answer below lives outside the settings screen.

Outlook stops short of the finish line too, though. The setting takes one date-and-time range, not a recurring nightly schedule, so covering every evening means resetting it each day or scripting it with Power Automate. For a weekend that is tolerable, because a single Friday-evening-to-Monday-morning window covers the whole gap in one go and you set it on your way out the door. For weeknights it means five resets a week, every week, which is precisely the sort of chore that quietly stops happening by Wednesday. If your after-hours problem is really a weekend problem, Outlook's built-in setting may genuinely be enough, and you can stop reading here.

Time-of-day controlRepeats nightlyReplies to repeat senders
Gmail vacation responderNo, whole days onlyNoOnce per sender per four days
Gmail filter plus templateNo, content matching onlyFires 24/7Every time
Outlook automatic repliesYes, start and end timesNo, single windowOnce per sender per run
Apps Script on a triggerYes, whatever you codeYesWhatever you code

Neither platform ships the thing people are searching for, which is why the working answers all live outside the built-in settings.

Let InboxPilot draft your replies.

Option 1: A Gmail after-hours auto reply with Apps Script

This is the free, native-ish route, and it is the right call if you want an acknowledgement message on a precise schedule and you are comfortable maintaining a little code.

Two implementations are common. The script can flip the vacation responder on and off through the Gmail API at your open and close times, which keeps Gmail doing the replying and inherits the four-day rule. Or the script can scan for unread threads that arrived outside hours and reply to each one directly, which sidesteps the four-day rule because you control the logic. The version below does the second, and uses a Gmail label instead of Gmail's own bookkeeping to remember who it already answered.

const BUSINESS_START = 9;    // 9am
const BUSINESS_END = 18;     // 6pm
const TZ = 'America/New_York';
const LABEL = 'after-hours-replied';

function checkAfterHours() {
  const now = new Date();
  const hour = Number(Utilities.formatDate(now, TZ, 'H'));
  const weekday = Number(Utilities.formatDate(now, TZ, 'u')); // 1 = Mon, 7 = Sun
  const openNow = weekday <= 5 && hour >= BUSINESS_START && hour < BUSINESS_END;
  if (openNow) return;

  const label = GmailApp.getUserLabelByName(LABEL) || GmailApp.createLabel(LABEL);

  GmailApp.search('is:unread in:inbox -label:' + LABEL, 0, 25).forEach((thread) => {
    // Never auto-reply to another machine.
    if (isAutomated(thread.getMessages()[0])) {
      thread.addLabel(label);
      return;
    }
    thread.reply(
      'Thanks for writing in. Our office is closed at the moment. ' +
      'We open at 9am and will come back to you then.'
    );
    thread.addLabel(label);
  });
}

function isAutomated(message) {
  const from = message.getFrom().toLowerCase();
  const raw = message.getRawContent();
  return /no-?reply|do-?not-?reply|mailer-daemon|postmaster/.test(from) ||
         /^precedence:\s*(bulk|list|junk)/im.test(raw) ||
         /^list-unsubscribe:/im.test(raw);
}
  1. Create the script

    In Gmail, go to script.google.com, start a new project, and paste the code above. Change the two hour constants, the timezone, and the reply text to match your business.

  2. Run it once by hand

    Press Run and approve the Gmail permission prompt. Approving is what creates the label and confirms the script can read and send on your behalf.

  3. Attach a time-driven trigger

    Open the clock icon (Triggers), add a trigger for checkAfterHours, choose a time-driven source, and set a minute timer of every 10 or 15 minutes.

  4. Test it before you trust it

    Email the account from an unrelated address outside your business hours and confirm exactly one reply arrives, then confirm a second email from the same address does not produce a duplicate.

One quota detail that trips people up. Apps Script time-driven triggers can fire "as frequently as every minute" (Google, Apps Script documentation, "Installable Triggers", retrieved 2026-07-26), but consumer Google accounts get only 90 minutes of total trigger runtime per day, against 6 hours for Workspace accounts (Google, Apps Script documentation, "Quotas for Google Services", retrieved 2026-07-26). A once-a-minute trigger is 1,440 runs a day and will burn through that on a personal account. Every 10 or 15 minutes is the sane setting, and it means a 6:05pm email gets answered by 6:20pm rather than 6:06pm.

Be honest with yourself about the rest of what you are signing up for:

  • Timezones and daylight saving. The script's clock and your team's clock have to agree, twice a year, forever.
  • Holidays. Business hours are not just evenings. Christmas Day at 11am is after hours too, and no calendar knows that unless you tell it, which usually means keeping a hardcoded date list current or reading from a Google Calendar you maintain.
  • Loop protection. Replying directly to unread mail means you own the job of not auto-replying to newsletters, bounce messages, and other robots. The isAutomated check above is a starting point, not a complete defense.
  • It is still an acknowledgement. The customer learns that you are closed. They do not learn what their order status is.

That last point is the one that matters most, and it is the reason many teams end up at Option 3.

Option 2: A scheduling layer or shared inbox tool

If you would rather not maintain a script, the shared inbox and helpdesk category solves scheduling as a side effect of being built for teams. Tools in this space generally carry business-hours settings, so out-of-hours rules, SLA timers, and holiday calendars are configuration rather than code.

The tradeoff is the one that always comes with this category: you are adopting a platform. Your team works in the tool's interface instead of Gmail, mail gets pulled into its own ticket model, and pricing is usually per agent. If you already wanted a helpdesk, the after-hours rule is a free bonus. If all you wanted was an evening auto reply, it is a large amount of change for a small problem.

Worth checking before you commit: whether the business-hours rule can send a real answer or only a canned acknowledgement, and whether it counts against a per-agent seat you would rather not buy.

Option 3: Answer the email instead of acknowledging it

Step back from the mechanics for a second. Every option so far is a way to tell someone "we are closed, we will reply Monday." That is worth something. It is not worth much.

Look at what actually arrives in a shared inbox overnight and the pattern is hard to miss. Where is my order. Do you cover my area. What are your hours. Can I still change my booking. Is this covered under warranty. Did you get my last email. Nearly all of it is repetitive, and nearly all of it is answerable from information your business already has written down: an order system, a policy page, a price list, a service-area map.

In the shared inboxes we help teams set up, the overnight pile skews further toward these repeat questions than the daytime pile does, and for a plain reason. Daytime senders who need something complicated tend to phone. The people typing at 9pm are mostly asking things you have answered a hundred times.

An AI assistant grounded in your own documents can answer those instead of deflecting them. Same inbox for your staff, no mailbox migration, no ticket model to adopt.

Here is the shape of it. This exchange is illustrative, and it assumes your order data is connected as a source the assistant can read, because a reply this specific is impossible without that:

Incoming, 9:14pm. "Hi, I ordered a replacement filter last Thursday and it still says processing. Do you know when it ships, and can I change the delivery address to my office?"

Reply, 9:14pm. "Hi Marcus, order #48122 shipped this afternoon with tracking DHL 7719 4402 881, due Friday. The address change I cannot do myself once a parcel is in transit, so I have flagged this for the team and someone will confirm with DHL first thing tomorrow. Nothing needed from you tonight."

Note what that reply does with the second question. It answers the part it can verify and hands off the part it cannot, saying so plainly. That is the whole discipline.

Which categories are safe to send unattended

After-hours is precisely where human-in-the-loop approval breaks, because the human is asleep. Draft-and-approve is our default recommendation during the day, and at 2am there is nobody to approve. So the rule has to be set per category, before you turn anything on.

Reasonable to send unattended:

  • Order and shipment status pulled from a system of record
  • Business hours, locations, service areas, lead times
  • Policy and FAQ answers grounded in a document you control
  • A specific acknowledgement that names what happens next and when

Draft it and hold it for the morning:

  • Firm quotes, prices, and discounts
  • Refunds, credits, and goodwill decisions
  • Complaints, or any message with an angry tone
  • Anything legal, medical, contractual, or safety-related
  • Anything where the assistant has no grounded source and would be guessing

Two practical notes. Check that your draft quota covers a weekend spike, because overnight volume is lumpy and a Saturday backlog can burn through a small monthly allowance. And read your first week of overnight sends line by line before you widen the categories. InboxPilot starts free with 25 drafts specifically so you can watch it work on a real inbox before it touches a customer unsupervised.

Which after-hours auto reply fits your inbox

Your situationUse this
Solo, occasional evenings awayThe vacation responder, on and off by hand
Fixed hours, want a precise acknowledgement, comfortable with codeApps Script on a time-driven trigger
Already buying a helpdesk, need SLA and holiday rulesA shared inbox tool with business-hours settings
Repetitive overnight questions you would rather have answeredAn AI assistant grounded in your own documents
Firm quotes and refunds arriving overnightDraft overnight, approve in the morning

The honest summary: if all you need is to tell people you are closed, Apps Script gets you there for free and Gmail alone does not. If what bothers you is that a customer with a two-second question waited fourteen hours for it, no auto reply of any kind fixes that, because the auto reply was never the point.


Sources, all retrieved 2026-07-26. Gmail and Outlook behavior is cited from Google and Microsoft product documentation; both vendors change these settings without notice, so confirm against the current help pages before you build on them. Response-time expectations: Toister Performance Solutions, "How Fast Should a Business Respond to an Email?" (survey of 1,200+ consumers, April 2018), and Zendesk CX Trends 2026 (11,297 respondents across 22 countries, fieldwork June 2025). After-hours share: Fixify, "2026 IT Help Desk Benchmark Report" (50,000+ tickets, 30+ organizations), which measures internal IT help desks rather than customer inboxes and is cited above as a floor, not a proxy. InboxPilot is the publisher of this article.

Frequently asked questions

Can Gmail send an auto reply only after business hours?

Not natively. Gmail's vacation responder has two controls, a first day and a last day, and Google's documentation states the reply runs from 12:00 AM on the start date to 11:59 PM on the end date. A calendar day is the smallest unit it understands, so it cannot switch on at 6pm and off at 9am.

How do I set up an after-hours auto reply in Gmail with Apps Script?

Write a script that checks the current hour against your business hours, then either toggles the vacation responder through the Gmail API or replies directly to unread threads. Attach a time-driven trigger running every 5 to 15 minutes. Consumer accounts cap total trigger runtime at 90 minutes a day, so do not poll every minute.

Why did my Gmail auto reply only send once to the same person?

That is the four-day rule. Gmail sends the vacation responder to a given sender again only if they contact you a second time after four days have passed and the responder is still on. For an after-hours support inbox this means a customer who emails Monday evening and again Tuesday evening gets one reply and then silence.

Can Outlook do an after-hours auto reply when Gmail cannot?

Partly. Outlook's automatic replies include a Send replies only during a time period option that accepts start and end times, not just dates, so you can cover a single evening or weekend. It still does not repeat nightly, so you would be resetting it by hand every day or scripting it with Power Automate.

Should an AI reply to customers overnight without anyone approving it?

Only for the categories where a wrong answer is cheap to fix. Order status, business hours, service areas, and policy questions grounded in your own documents are safe to send. Firm quotes, refunds, complaints, and anything legal or medical should be drafted and held for a person to approve in the morning.

Let InboxPilot draft your replies.

Connect your inbox and InboxPilot drafts a reply on every email, automatically. Free, no card.

View pricingNo credit card required

Start with the emails you're tired of.

Connect Gmail or Outlook, point InboxPilot at a few documents, and see your first drafts today.

No credit card. Nothing sends without your approval.