HomeShopify & E-commerceShopify back in stock email notification…

Shopify back in stock email notification with n8n (Gmail + Google Sheets)

TL;DR: This guide shows how to build a Shopify back in stock email notification with n8n using Google Sheets and Gmail. Shoppers join a waitlist when a product sells out, n8n checks Shopify inventory on a schedule, and the moment stock returns it emails everyone who asked, then marks them as notified so nobody gets a duplicate. No paid back-in-stock app, no monthly subscription, full control over the timing and the message.

What it does

When a popular product sells out, you lose the warmest buyers you will ever have: people who showed up ready to pay and found an empty button. Most stores hand that moment to a third-party app that charges per email or per subscriber. This workflow keeps the whole thing inside n8n.

A small form on your product page collects the shopper’s email and the variant they want. That row lands in a Google Sheet that acts as your waitlist. On a schedule you control, n8n asks the Shopify Admin API for the current inventory level of each waitlisted variant. As soon as a variant goes from zero to in stock, n8n sends a personal Gmail message to every shopper waiting on it, with a direct link back to the product. It then stamps that row as notified so the next run skips it.

The result is a back-in-stock flow that runs for the price of an n8n instance you already own, with messaging you write yourself rather than a template you rent.

Why it beats the default

The default answer for Shopify stores is a restock app from the App Store. Those apps work, but they price on volume. A store with a few thousand waitlist signups a month can pay 30 to 100 dollars monthly for something that sends a templated email. You also hand over your customer list to another vendor and accept whatever sending domain and design they allow.

Running it in n8n flips that. Gmail sends from your own address, so the email lands with your name on it and your reply-to. You decide the schedule, so a flash restock can trigger a check every fifteen minutes while a slow mover checks twice a day. You can branch the logic later, for example sending a different message to customers who waited more than a week, without asking an app vendor to add a feature. And because the waitlist sits in a Google Sheet, your team can read it, sort it, and export it whenever they want.

For a fuller picture of where this sits among store automations, the n8n Shopify automation hub maps out the other flows that pair well with a restock notifier.

What you need

You need a running n8n instance, either cloud or self-hosted. You need a Shopify store with Admin API access, which means a custom app with the read_products and read_inventory scopes. You need a Google account for the waitlist sheet and a Gmail account to send from. That is the entire stack, and every piece of it is on the free or near-free end.

On the Shopify side, create a custom app under Settings, then Apps and sales channels, then Develop apps. Give it the two read scopes above and install it to generate an Admin API access token. On the Google side, one sheet with a few columns is enough to start.

Node by node

The workflow uses eight nodes. The Webhook node receives signups from your product-page form and writes nothing on its own. The Google Sheets append node stores each signup as a new waitlist row. The Schedule Trigger fires the checking half of the workflow on your chosen interval. The Google Sheets read node pulls every row still marked as waiting. The Shopify node, or an HTTP Request node hitting the Admin API, returns the current inventory quantity for each variant. The IF node compares that quantity against zero and keeps only the variants that are back in stock. The Gmail node sends the notification to the matching shopper. The final Google Sheets update node writes the notified flag and a timestamp back to the row.

Step by step build

  1. Create a new workflow in n8n and add a Webhook node set to POST. Copy its production URL and point your product-page back-in-stock form at it. Pass three fields: email, variant ID, and product handle.
  2. Add a Google Sheets node in append mode. Map the incoming email, variant ID, and product handle into columns, add a status column with the value waiting, and a date column with the current timestamp. This branch is now your signup capture.
  3. Start the second branch with a Schedule Trigger. Set it to every fifteen minutes for fast-moving stock, or every few hours if your restocks are planned. Both branches live in the same workflow but run independently.
  4. Add a Google Sheets read node that returns only rows where status equals waiting. Use a filter so you never re-process a customer who was already emailed.
  5. Add a Shopify node, or an HTTP Request node calling GET /admin/api/2024-04/variants/{variant_id}.json with your Admin token. Read the inventory quantity for each waiting row.
  6. Add an IF node that checks whether inventory quantity is greater than zero. Send the true output onward and let the false output end quietly so out-of-stock items stay on the list.
  7. Add a Gmail node on the true branch. Write a short subject like “It is back: {{product name}}” and a body with a direct link to the product page so the shopper can buy in one tap.
  8. Finish with a Google Sheets update node that sets status to notified and records the send time on that row. Save, activate, and test with a real out-of-stock variant you can restock by hand.

Common mistakes

The most common mistake is forgetting to mark rows as notified, which sends the same shopper an email on every single run until they unsubscribe out of annoyance. The update node at the end is not optional. A second mistake is checking inventory too aggressively. Shopify rate-limits the Admin API, so a one-minute schedule across thousands of variants will start returning errors; fifteen minutes is plenty for almost every store.

People also forget that a variant can flicker between one and zero as orders come in. Adding a small threshold, for example only notifying when quantity is at least two, avoids waking your waitlist for a single unit that sells again before they click. Finally, watch your Gmail sending limits. A free Gmail account caps around 500 messages a day, so a large restock should batch across the day or move to a Google Workspace account.

Cost at realistic volume

Assume a store that collects 1,000 waitlist signups a month and restocks often enough to send most of them. Self-hosted n8n on a small VPS runs about 5 to 7 dollars a month and carries this workflow without noticing. Google Sheets is free at this scale. Gmail is free up to its daily limit, or 6 dollars a month on Workspace if you want a higher cap and your own domain. So the realistic monthly cost sits between roughly 5 and 13 dollars, flat, no matter how many signups you collect. A volume-priced restock app at the same 1,000 signups would commonly land in the 30 to 80 dollar range, and it climbs as you grow while this does not.

Ready to import template

You can build this from the steps above, or skip straight to a working version. The ready-to-import JSON template, plus a setup guide and a credentials guide, is available on the downloads page. Import it, paste in your Shopify token and Google credentials, and you are live in a few minutes.

If you would rather have it installed and tested for you on your own n8n instance, the done-for-you setup service handles the Shopify app, the credentials, and the go-live so you can stay focused on selling.

FAQ

Do I need a paid Shopify plan for this?

No. Custom apps with Admin API access are available on every standard Shopify plan, including the entry tier. You only need the read_products and read_inventory scopes, both of which are read-only and safe. The workflow never writes to your store, it only reads inventory and sends email.

Where does the customer’s email come from?

From a small form you place on the product page that appears when a variant is sold out. That form posts the email and variant to the n8n Webhook node. You can build it with a few lines of HTML, a theme app block, or any form tool that can send a POST request to a URL.

Will shoppers get duplicate emails?

Not if you keep the final update node. After a notification sends, that row is marked as notified and the next scheduled run filters it out. Duplicates only happen when the update step is removed or misconfigured, so test it once with a real restock before going live.

Can I use Outlook or SMTP instead of Gmail?

Yes. n8n has native nodes for Outlook and generic SMTP, so you can swap the Gmail node for either one and map the same fields. The rest of the workflow stays identical. Choose whichever sending account has the daily limit and deliverability that fit your store’s volume.

How fast will customers hear about a restock?

As fast as your schedule. A fifteen-minute trigger means the longest anyone waits after stock returns is fifteen minutes, which is quick enough to catch most flash restocks. Tighten it for hype drops or loosen it for planned restocks to stay well inside Shopify’s API limits.

Related guides

Pair this with the Shopify low stock alert so you get warned before products run out, and the Shopify new customer welcome email to greet the buyers this flow brings back. Browse the full Shopify automation category for more store-ready templates.