Home › Free Automations › AI Customer Email Draft Assistant

AI Customer Email Draft Assistant

Opening-hours e-mails get a ready-to-send reply draft based on your real hours. You press Send.

Level
Beginner
Setup time
About 45–60 minutes the first time*
You need
n8n, Gmail, Google Sheets
Template
Free · tested

*Our estimate for a first-time setup.

What this automation does

Illustration: an inbox full of opening-hours questions and a draft reply with a You press Send button
Illustration The problem: the same questions, again and again.

Every week your inbox fills with "Are you open this Sunday?", "What time do you close on Saturday?" Each answer is quick, but together they eat your morning.

This automation watches your Gmail inbox. When a customer asks about opening hours, it looks up your real hours in a Google Sheet and writes a short, friendly reply. It saves that reply as a draft in the same e-mail conversation. You read it, and if it's right, you press Send.

Diagram: customer e-mail, AI decides if it is an opening-hours question, rules work out the day, hours read from your Google Sheet, AI writes a reply, code checks the reply, draft saved in Gmail, you press Send
Diagram The whole automation at a glance.

Who this is useful for

  • Gift shops and boutiques
  • Cafés and bakeries
  • Salons and studios
  • Repair shops
  • Any shop whose hours change by season

What you will have when finished

  • Opening-hours e-mails get a reply draft within about a minute.
  • Each draft sits in the customer's conversation in Gmail, ready to send.
  • All other e-mails are left exactly as they are.
Gmail conversation: customer asks Are you open this Sunday? and a draft reply below says Hi! Yes, we are open this Sunday from 11 AM to 4 PM. We would love to see you! with a Send button
Real result A real draft from our test run. The customer is a fictional test account, and the addresses are hidden. Nothing is sent until the owner clicks Send.

Before you begin

  • An n8n account: n8n Cloud (free trial) or self-hosted.
  • The Gmail account your customers write to. This guide uses Gmail. Other mail services need a different first step.
  • A second e-mail address you own, used as a pretend customer while testing. A free Gmail address works.
  • An Anthropic (Claude) account for the API key.

Time: About 45–60 minutes the first time (our estimate).

How much it costs

The template itself is free. Running it uses a few services. Some are free and some charge you. Here is every one of them, in plain English.

ServiceWhy you need itFree option?When might you pay?
n8n CloudRuns your automation 24/7Free trial, no credit card needed (trial limit: 1,000 runs)After the trial. Starter is listed at €20/month billed annually for 2,500 runs a month. Pro is €50/month billed annually for 10,000. Paying monthly costs more. n8n pricing
n8n on your own computer or server (alternative)Same automation, run by youYes, the community edition is freeFor the server it runs on. It must be online all the time and reachable from the internet. This is the more technical option.
Claude AI (Anthropic API)Reads messages and writes short repliesNew accounts get some free credits (Anthropic doesn't state the amount)Pay as you go. Claude Haiku 5.5 is $0.10 per million tokens read and $0.50 per million tokens written (a token is a small piece of a word). One real run of this template cost about $0.0002 (our estimate, see below). Anthropic pricing
Google SheetsStores your opening hoursYes, with a personal Google accountOnly if you choose Google Workspace for your business
GmailReads new customer e-mails and saves reply draftsYes, with a personal Google accountIf you want a business address like [email protected] through Google Workspace (paid per user)

Download the template

A template is a ready-made automation saved as a small file. The file ends in .json, which is simply the format n8n uses to save workflows. You don't need to open or edit it. You'll import it into n8n in the setup steps below.

small-shop-agents-email-draft.json

Free · no sign-up · contains no passwords or personal data · tested with n8n 2.48.7

Download Free Template

See exactly what we tested in our template testing report.

Step-by-step setup

  1. Write your opening hours in a Google Sheet

    1. Open sheets.new and name the file, for example Shop Info.
    2. Rename the tab at the bottom to exactly Business Hours.
    3. Copy this block and paste it into cell A1, then change the hours to yours:
    day	is_open	hours_text	note
    Monday	TRUE	10 AM – 6 PM	
    Tuesday	TRUE	10 AM – 6 PM	
    Wednesday	TRUE	10 AM – 6 PM	
    Thursday	TRUE	10 AM – 6 PM	
    Friday	TRUE	10 AM – 6 PM	
    Saturday	TRUE	10 AM – 6 PM	
    Sunday	TRUE	11 AM – 4 PM	
    Google Sheet tab Business Hours with columns day, is_open, hours_text, note and seven weekdays
    Real result Our test sheet. One row per day of the week.
    • day: the full English weekday name.
    • is_open: TRUE if you're open, FALSE if you're closed that day.
    • hours_text: written like 10 AM – 6 PM (with AM/PM). Leave it empty on closed days.
    • note: for your own notes. The automation ignores it.
  2. Open n8n (or create a free n8n Cloud account)

    n8n is the program that runs your automation. Think of it as a very reliable assistant that follows a checklist every time something happens.

    • If you don't have n8n yet: go to n8n.io and start the free n8n Cloud trial. You don't need a credit card. Pick a name for your account when asked. It becomes part of your n8n address, for example yourshop.app.n8n.cloud.
    • If you already use n8n: just sign in.

    You'll land on the Overview page, which lists your workflows. A workflow is n8n's word for one automation.

  3. Import the template

    1. Click the Create workflow button in the top-right corner of the Overview page. An empty canvas opens.
    2. Click the three dots (⋯) next to the workflow name at the top.
    3. Point to Import, then click From file.
    4. Choose small-shop-agents-email-draft.json from your Downloads folder.
    5. If n8n asks "Importing this from an AI tool?", click Skip.
    n8n Overview page with the Create workflow button highlighted
    Real screenshot ① Click Create workflow. (n8n 2.48.7. Your list of workflows will be empty at first.)
    The workflow menu opened, with Import and From file highlighted
    Real screenshot ① Three dots → ② Import → ③ From file.
    A dialog titled Importing this from an AI tool? with the Skip button highlighted
    Real screenshot If this question appears, click ① Skip. You don't need it for this guide.
    The imported AI Customer Email Draft Assistant workflow on the n8n canvas
    Real screenshot The template is now on your canvas. The blue Start here note lists what to connect. Each box is one step, and the grey text under each box says what it does.
  4. Connect the AI (Claude)

    The AI steps need permission to use Claude. That permission is an API key (a long secret password that lets one program use another. Treat it like a bank PIN).

    A. Create the key

    1. Go to platform.claude.com and sign up or sign in.
    2. Open Settings → API keys and click Create key. Name it n8n shop automations.
    3. Copy the key. It starts with sk-ant-. You'll paste it into n8n in a moment. Don't paste it anywhere else.
    4. If Anthropic asks you to add billing, follow their steps. New accounts get some free credits.

    B. Add the key to n8n

    1. On the canvas, double-click the round Anthropic (classify) step.
    2. Click the Credential box at the top and choose Create new credential.
    3. Paste your key into API Key, then click Save. n8n stores it encrypted. It never appears in your template file.
    4. Double-click Anthropic (write) and choose the same credential in its Credential box.
    The Anthropic (classify) step opened, with the Credential box highlighted
    Real screenshot ① The Credential box of the Anthropic (classify) step. (On our test computer an account was already connected. Yours will be empty until you create one.)
    The new Anthropic credential window with the empty API Key field and the Save button highlighted
    Real screenshot ① Paste your key into API Key, then ② click Save. The field in this screenshot is empty on purpose. Never share a picture of your real key.
  5. Connect your Google account (Gmail and Google Sheets)

    Each Google step needs your permission to use your Google account. On n8n Cloud this is quick: n8n's docs describe it as "Sign in with Google directly on n8n, with no setup required on the Google Cloud Console."

    1. Double-click the Google step named below, click the Credential box and choose Create new credential.
    2. Click the button to sign in with Google. A Google window opens.
    3. Pick the Google account that owns your spreadsheet and inbox, then click Allow on the permissions page. You type your Google password only into Google's own window, never into n8n.
    4. Back in n8n, you'll see a success message. Close the credential window.
  6. Tell the Google Sheets step which spreadsheet to use

    Every Google spreadsheet has an ID, a long code in its web address. Here's how to copy it:

    1. Open your spreadsheet in Google Sheets. Look at the address bar: docs.google.com/spreadsheets/d/1AbC…xyz/edit
    2. Copy only the part between /d/ and /edit. That's the ID.
    3. In n8n, double-click the Look Up Business Hours (Sheet) step.
    4. Check that ① Credential shows your Google account.
    5. In ② Document, replace PASTE_YOUR_SPREADSHEET_ID_HERE with your ID.
    6. Check that ③ Sheet says Business Hours, exactly the name of your tab.
    The Google Sheets step with Credential, Document and Sheet highlighted
    Real screenshot ① Your Google account · ② the spreadsheet ID · ③ the tab name.
  7. Choose whose e-mails are read (start with a test address)

    For safety, the template only reads e-mails from addresses you list. While testing, that should be just your second, pretend-customer address.

    1. Double-click New Customer Email (Gmail). Check ① Credential. Then scroll down to Filters and, in ② Sender, replace [email protected] with your test address.
    2. Close it and double-click Only Test Customer. In the code box, use your browser's search (Ctrl+F or ⌘+F) to find const allowed = ["[email protected]"]; near the bottom, and type your test address between the quotes. Change nothing else in this box.
    The New Customer Email Gmail trigger with the Credential highlighted and Filters below
    Real screenshot ① Your Gmail account. The Sender filter is further down, under Filters. The trigger checks for new unread e-mails every minute.
  8. Put your shop name into the reply

    Double-click AI Writes the Reply. In the large text box that starts with "Write a short, friendly…", replace The Corner Shop (our fictional demo shop) with your shop's name. Change nothing else.

  9. Check the draft step

    Double-click Save Draft — Not Sent (Gmail). Check ① Credential, and that ② the operation is Create (a draft). There's no Send step in this workflow, and you shouldn't add one.

    The Save Draft Gmail step with Credential and the Create operation highlighted
    Real screenshot ① Gmail account · ② Create draft. It saves a draft and doesn't send.

Test your automation

  1. Publish the workflow

    Click Publish (top right). Gmail-triggered automations check your inbox on a schedule, so they need to be published to run on their own. You can unpublish any time.

  2. Send a test e-mail

    From your test address, send an e-mail to your shop's Gmail. Use the subject Quick question and the text Are you open this Sunday?

  3. Wait about a minute

    The automation checks every minute. Leave the e-mail unread, because it only picks up unread mail.

  4. Open the e-mail in Gmail

    Open the conversation. You should see a draft reply under the customer's message. Read it. If it's right, you can send it to your test address.

  5. Try an unclear question

    Send Are you open next Sunday? from your test address. No draft should appear, because "next Sunday" could mean two different days. That one is left for you.

What success looks like

  • A draft like "Hi! Yes, we're open this Sunday from 11 AM – 4 PM. We'd love to see you!" appears in the conversation, using your hours.
  • Nothing has been sent. Check your Sent folder.
  • In n8n, the Executions tab shows a green, Succeeded run.
n8n execution of the email assistant with all steps green and Succeeded highlighted
Real screenshot A real successful run (execution #45 from our demo video).
Output of Check Draft Against Facts showing the hours from the sheet, the AI draft, draft_source ai and an empty list of problems
Real screenshot Inside Check Draft Against Facts: the hours from the sheet, the AI's draft, and draft_problems: [] (no problems found). The test customer's address is blurred.

Troubleshooting

No draft appeared.
Check that: the workflow is published; the e-mail came from the address in both the Sender filter and the Only Test Customer list; the e-mail was still unread; and it clearly named one day ("this Sunday", "tomorrow", "on Saturday"). Then look at Executions to see which step stopped it.
"No row for Sunday in the Business Hours sheet — refusing to guess."
Your sheet has no row for that day, or the tab or column names differ. Compare it with step 1. The automation stops instead of inventing hours.
The draft says something simple like "Hi! Yes, we're open Sunday from 11 AM to 4 PM."
That's the safety fallback. The AI's version didn't pass the hours check, so a fixed reply built from your sheet was used. The step output shows draft_source: "template_fallback".
Every e-mail starts a run.
Once you allow all senders (see "Turn it on"), every new e-mail starts a run. Most of them stop at the first check. Each still counts toward your n8n plan.
A Gmail step says "invalid_grant" or "unauthorized".
Reconnect Google in that step's credential.

How to turn the automation on for real customers

  1. Test with a few friendly addresses first

    Add more addresses to the Sender filter and the Only Test Customer list, for example your own other accounts or a family member who agreed to help.

  2. Open it to every customer

    When you're happy with the drafts:

    1. In New Customer Email (Gmail), clear the Sender filter.
    2. In Only Test Customer, change the list to const allowed = ["*"];. The star means "anyone". Drafts are still only drafts.
    3. Click Publish again to save the published version.
  3. Turn it on: click Publish

    While you build, the automation only runs when you test it. To make it run on its own, all day, every day:

    1. Click Publish in the top-right corner of the canvas.
    2. Confirm in the window that opens.
    The Publish button in the top-right corner of the n8n editor, highlighted
    Real screenshot ① Publish switches your automation on. (Older n8n versions called this "Activate".)

    From now on, every opening-hours question gets a draft for you to review.

    To switch it off later, open the same menu next to Publish and unpublish it.

How to keep it working

  • Look at Executions once a week. Open your workflow and click the Executions tab at the top. Green means it worked. Red means a step failed. Click a red one to see which step and why.
  • Reconnect Google if it stops. If a Google step fails with "unauthorized" or "invalid grant", open the step, click the credential and sign in with Google again.
  • Watch your AI credits. In the Claude Console you can see what you've used and set a spending limit. If credits run out, the AI steps fail.
  • Watch your n8n run count in your n8n account, especially in your first month.
  • Update your sheet, not the workflow. When your hours change, change the sheet. The automation reads it every time.
  • Get an e-mail when something fails (optional): n8n can run an "error workflow" that alerts you. See n8n's error handling guide.

Security and privacy

  • Keep keys inside n8n. Paste API keys only into n8n's credential window. Never e-mail them, put them in a spreadsheet, or show them in a screenshot or video.
  • Exported files are safe to share. When you download a workflow, n8n leaves your credentials out. Still, check for e-mail addresses you typed into steps.
  • Customer messages are untrusted text. The templates tell the AI to only read and classify them and to ignore any instructions inside them. The important decisions are made by fixed rules, not by the AI.
  • Collect only what you need. Don't ask customers for card numbers, passwords or ID numbers in your forms.
  • Tell customers. Mention in your own privacy policy that messages are processed by automation tools (n8n, Google, Anthropic).
  • Use a test sheet first. Make a copy called "(TEST)" while you try things out.

Running it on n8n Cloud

More free automations