Shopify Order Fulfillment Google Sheets Sync with n8n (Free Template)

TL;DR: Every time a new order lands in your Shopify store, this n8n workflow automatically appends a row to a Google Sheet — order ID, customer name, email, total, item count, fulfillment status, and timestamp included. No Shopify Plus required, no Zapier subscription needed. Works on any Shopify plan, takes under 20 minutes to build, and runs in real time.

What this workflow does

Shopify has a built-in order export, but it’s a manual pull. You have to remember to do it, download a CSV, and then copy data somewhere useful. That works until it doesn’t — and it usually breaks the moment your team grows past one person or you start running daily reporting.

This n8n Shopify automation replaces that manual export loop entirely. The moment an order is created in Shopify, a webhook fires to your n8n instance. n8n picks it up, maps the fields you care about, and appends a new row to your designated Google Sheet — all in under two seconds, with zero human involvement.

The resulting sheet becomes a live order log your team can filter, sort, and build dashboards from without ever opening Shopify admin.

Why it beats Shopify’s built-in options

Shopify offers three native paths for this kind of data sync: manual CSV export, Shopify Flow, and third-party apps from the App Store.

Manual export is exactly what it sounds like — a recurring human task that gets skipped when things get busy. Shopify Flow is genuinely powerful, but it’s locked to Shopify Plus, which starts at $2,300 per month. App Store solutions like “Orders to Sheets” or similar connectors typically cost $9–$25 per month per store, push data on a delay rather than in real time, and give you no control over what fields get synced.

n8n costs nothing extra if you’re already self-hosting — one flat VPS bill, unlimited executions. It runs on any Shopify plan. And unlike any App Store app, you can extend the same workflow later: add a Slack alert for high-value orders, trigger a follow-up email sequence via Gmail, or feed the same data into Airtable — all from within the workflow you’re already running.

What you need before you start

You will need a working n8n instance (self-hosted or n8n cloud), a Shopify store with API access enabled, and a Google account. More specifically: an n8n credential for Shopify (a Private App API key works fine), a Google Sheets OAuth2 credential inside n8n, a Google Sheet created in advance with your column headers in row 1, and a Shopify store on any plan — Basic, Grow, and Plus all work.

If you are not yet running n8n, our n8n setup and installation service gets your instance live and fully configured in under 24 hours.

Node-by-node breakdown

The core workflow uses four nodes. Here is what each one does and why it is there.

Shopify Trigger — the entry point. This node registers a webhook directly on your Shopify store for the orders/create event. Every time a new order is placed, Shopify sends the full order payload to n8n automatically. No polling, no cron schedule, no delay.

IF node (optional but recommended) — a filter gate. By default, Shopify fires the orders/create event for all orders, including test orders and orders with a pending payment status. The IF node checks that financial_status equals paid before passing the order downstream. Anything that does not match exits through the false branch and nothing is written to the sheet.

Set node — the field mapper. Shopify’s order payload contains dozens of nested fields. The Set node lets you extract exactly what you want — order ID, customer name, email, total price, line item count, fulfillment status, created_at timestamp — and give each field a clean, predictable name that matches your Google Sheet headers. This keeps the Google Sheets node straightforward and makes the workflow readable six months from now.

Google Sheets (Append Row) — the destination. This node takes the mapped fields from the Set node and appends them as a new row at the bottom of your target sheet. Operation is set to Append Row. You map each field from the Set node to the corresponding column. That is the full workflow.

Step-by-step build

  1. Prepare your Google Sheet. Create a new spreadsheet (or a new tab in an existing one). Add these column headers in row 1: Order ID, Customer Name, Email, Total (USD), Items, Financial Status, Fulfillment Status, Created At. You can add or remove columns — just make sure the Set node maps to the same names you use here.
  2. Add and configure the Shopify Trigger node. In n8n, create a new workflow and add a Shopify Trigger node. Select the orders/create event. If you have not already created a Shopify credential, go to your Shopify admin, navigate to Settings → Apps → Develop apps → Create an app, and give it read access for Orders. Paste the API key and secret into the n8n credential form. Once the credential is saved, n8n registers the webhook in Shopify automatically when you activate the workflow.
  3. Add an IF node to filter by payment status. Drag an IF node onto the canvas and connect it to the Shopify Trigger. Set one condition: value 1 is {{ $json.financial_status }}, operation is Equal To (string), value 2 is paid. The true branch continues to the Set node. The false branch does nothing. Skip this step only if you want every order logged regardless of payment status.
  4. Add a Set node to map fields. Connect a Set node to the true branch of the IF node. Add one assignment for each column you want to populate. Useful expressions: Order ID → {{ $json.id }}, Customer Name → {{ $json.customer.first_name }} {{ $json.customer.last_name }}, Email → {{ $json.customer.email }}, Total → {{ $json.total_price }}, Items → {{ $json.line_items.length }}, Financial Status → {{ $json.financial_status }}, Fulfillment Status → {{ $json.fulfillment_status ?? 'unfulfilled' }}, Created At → {{ $json.created_at }}.
  5. Add the Google Sheets node. Connect a Google Sheets node to the Set node. Set the operation to Append Row. If you have not yet created a Google Sheets credential, click Connect, sign in with your Google account, and authorize the Sheets scope — it takes about 90 seconds. Select your spreadsheet and the target tab. In the column mapping section, match each field name from your Set node to the corresponding header in your sheet.
  6. Test the workflow. Click “Test workflow” in n8n to put it into listening mode. Then open your Shopify admin, go to Settings → Payments → Manage, and enable the Bogus Gateway for testing. Place a test order. Return to n8n — you should see green checkmarks on all nodes. Open your Google Sheet and confirm the new row is there with the correct data.
  7. Activate the workflow. Toggle the workflow to Active. n8n will now process every incoming order automatically. The test order row will remain in your sheet — delete it manually if needed before going live.

Common mistakes

The most common issue is credential scope. When you create a Shopify Private App, read access for Orders is not enabled by default — you have to set it explicitly. If the Shopify Trigger fires but returns an authorization error, go back to your private app in Shopify admin and confirm that Orders is set to Read access, then save and regenerate your API key.

The second common issue is the null fulfillment status. Shopify returns null for orders that have not yet been fulfilled — not an empty string, but an actual null value. If you try to display or filter on this column in Sheets, you will get an empty cell. Use {{ $json.fulfillment_status ?? 'unfulfilled' }} in the Set node to normalize null to a readable string.

Third: column header mismatch. If the field names in your Set node do not exactly match the header row in your Google Sheet, the Append Row operation will create new columns on the right instead of populating the correct ones. Double-check spelling and capitalization — they must be identical.

Fourth: test orders polluting your live data. Shopify test orders fire real webhooks. Either add a second IF condition checking that {{ $json.test }} is false, or point your workflow to a staging sheet during development and switch it to your production sheet before activating.

Cost at realistic volume

At 100 orders per day, this workflow executes 100 times daily — roughly 3,100 executions per month. On n8n cloud’s Starter plan (€20/month, 2,500 executions included) you would need to upgrade. On self-hosted n8n, executions are unlimited; your only cost is the VPS, which typically runs €5–€15 per month depending on provider and region.

Google Sheets is free up to 10 million cells per spreadsheet. At one row per order and eight columns, 100 orders per day gives you 800 cells per day — you could run this workflow for 34 years before hitting the limit. Cost is effectively zero.

Compare this to a $15/month App Store connector that syncs on a 15-minute delay with no field customization. n8n wins on cost, wins on latency, and wins on flexibility.

Get the ready-to-import template

You can build this workflow from scratch using the steps above, or skip the setup and download the pre-built JSON template from the store. Import it into n8n in two clicks, connect your Shopify and Google Sheets credentials, point it at your sheet, and you are live.

Browse the full template library at easyworkflows.net/downloads. If you would rather have someone handle the full deployment — including credentials setup, testing, and a walkthrough — our n8n installation and setup service covers it end to end.

FAQ

Does this workflow work on all Shopify plans?

Yes. The n8n Shopify Trigger uses webhooks, which are available on every Shopify plan including Basic. You do not need Shopify Plus or Shopify Flow to use this workflow — it runs identically on a $39/month Basic store.

What Google Sheets permissions does n8n need?

n8n needs OAuth2 access to your Google account with the Sheets scope (spreadsheets.readwrite). You grant this once when creating the Google Sheets credential inside n8n. No service account, no JSON key file, no Google Cloud Console setup required for basic use.

Can I sync order line items individually instead of just the order total?

Yes. Shopify includes a line_items array in the webhook payload. Add a Loop Over Items node after the Set node to iterate over each product in the order, writing one Google Sheets row per line item. This gives you SKU-level tracking with product name, variant, quantity, and price per row.

Will this handle high order volume without hitting Google Sheets rate limits?

Google Sheets allows 300 write requests per minute per project. At up to 5 orders per minute you are well within that ceiling. For stores processing higher burst volumes, consider batching writes using n8n’s aggregator nodes, or switch to a higher-throughput destination like Google BigQuery for large-scale order analytics.

Can I filter so only paid orders are synced to Google Sheets?

Yes. Add an IF node after the Shopify Trigger and check that financial_status equals paid. Orders with any other status — pending, refunded, or voided — will exit through the false branch and will not appear in your sheet. You can add additional conditions in the same IF node to filter by order value, product tag, or any other field in the payload.

Related guides

If this walkthrough was useful, check out the rest of the collection in our Shopify automation category. We cover inventory low-stock alerts, AI product description generation, new customer welcome emails, and more — all built with n8n, all using the same tool stack.

Shopify New Customer Welcome Email with Gmail and n8n (Full Template)








TL;DR

Set up a shopify new customer welcome gmail n8n workflow that catches every first-time buyer, looks up their order count through the Shopify Admin API, and sends a personalised welcome email from Gmail within seconds of checkout. No Klaviyo subscription, no monthly send limits, and the template is yours to edit forever. Runs for free on your own n8n instance and takes about 20 minutes to wire up end to end.

What this workflow does

When a buyer completes checkout on your Shopify store, Shopify fires an orders/create webhook. The workflow listens on that webhook, pulls the customer record, checks whether this is their first order, and if it is, sends a welcome email through your Gmail account. Repeat buyers are quietly skipped so they never see the same greeting twice.

The email itself is rendered from a template inside n8n. You pass in the customer name, the product they just bought, and a discount code if you want to include one. Because it goes out through Gmail, it arrives from your actual business address with a normal inbox reputation instead of a shared ESP sending domain.

Why this beats the default Shopify welcome flow

Shopify’s built-in notification for a new customer is thin. It cannot easily branch on “is this their first order”, cannot pull extra data from the Admin API mid-send, and cannot be extended to post the same event to Slack or Google Sheets later. Most stores end up installing Klaviyo or Omnisend, which start at around $20 a month and lock your template behind their builder.

An n8n workflow self-hosted on a small VPS costs a few dollars a month total and gives you full control over timing, copy, segmentation and logging. You can add a Google Sheets step tomorrow to track which welcome variant converted best, or route high-value first orders to Slack, without migrating to a bigger plan.

What you need before you start

You will need an active Shopify store on any plan that allows custom apps or webhook access, a Gmail account with an app password or OAuth2 set up in n8n, and an n8n instance you can reach from the public internet so Shopify can POST to its webhook URL. If you are still running n8n on localhost, either use a tunnel or move it to a server first, because Shopify will not retry indefinitely if the endpoint is unreachable.

You also want a Shopify custom app with read access to orders and customers. The Admin API token from that app is what n8n uses to look up the customer’s order count, which is the deciding signal for “first order yes or no”.

Nodes used in the workflow

The finished graph has eight nodes. The Webhook node receives the Shopify event. A Set node normalises the payload into clean fields. An HTTP Request node calls the Shopify Admin API to fetch the customer’s order history. An IF node branches on whether orders_count equals one. The Gmail node sends the welcome. A second Set node builds a row for logging. A Google Sheets node appends that row so you have an audit trail. A final Respond to Webhook node closes the loop cleanly so Shopify marks the delivery as successful.

Step-by-step build

  1. Create a new workflow in n8n and name it Shopify Welcome Email. Add a Webhook node, set the HTTP method to POST, and copy the test URL. You will swap to the production URL later.
  2. In Shopify admin, go to Settings, Notifications, Webhooks, and create a webhook for the event Order creation with format JSON, pasting the n8n webhook URL. Save it and send a test notification to confirm the payload lands in n8n.
  3. Add a Set node right after the webhook. Pull out the fields you actually need: customer.email, customer.first_name, customer.id, line_items[0].title, and order_number. This keeps later expressions short and readable.
  4. Add an HTTP Request node. Method GET, URL https://YOURSTORE.myshopify.com/admin/api/2024-10/customers/{{ $json.customer_id }}.json, and pass the Admin API access token in the header X-Shopify-Access-Token. This returns the full customer object including orders_count.
  5. Add an IF node. Condition: {{ $json.customer.orders_count }} equals 1. The true branch fires the welcome email. The false branch goes to the logging step and exits without emailing.
  6. On the true branch, add a Gmail node. Set the credential, the To address to the customer email, the Subject to something like Welcome to Acme, your first order is in, and the Message body to HTML with expressions for the customer first name, order number, and first product title. Keep it short, human, and signed with a real name.
  7. After the Gmail node, add a Set node that builds one row with the order number, email, product, and a status field of welcome_sent. On the false branch, build the same row with status skipped_repeat_buyer.
  8. Connect both branches into a single Google Sheets node that appends the row to a sheet called Welcome Log. End with a Respond to Webhook node returning a 200 status so Shopify treats the call as delivered.

Once all eight nodes light up green in a test run, switch the Webhook node to production mode and trigger a real test order in Shopify. You should see the email land in your inbox inside 10 seconds and the row appear in the sheet.

Common mistakes to avoid

The most frequent failure is sending the welcome email on every order instead of just the first one. The fix is to never trust customer.orders_count from the webhook payload alone, because Shopify sometimes sends that count before incrementing. Always re-fetch the customer through the Admin API, which returns the canonical value.

Second, people forget to verify the HMAC signature on the webhook. In production, add an extra Function node at the top that rejects any request whose X-Shopify-Hmac-Sha256 header does not match. Without it, anyone who guesses the URL can fire fake orders and mail your customers.

Third, Gmail rate limits. A single Gmail account can send about 500 messages a day on a personal plan and 2,000 on Workspace. If your store does more than that, route high volume days through a transactional provider and keep Gmail only for the first 100 welcomes.

Cost at realistic volume

For a store doing 30 first orders a day, the total cost is your n8n hosting. A $5 VPS on Hetzner or DigitalOcean handles thousands of executions a day with room to spare. Gmail is free on a personal account or $7 a month on Workspace if you already pay for it. Google Sheets for logging is free. Compared to Klaviyo’s entry plan, which starts at $20 a month for 500 contacts and climbs fast, this setup pays for itself in the first month and scales without the bill following.

If you run the same flow on 300 orders a day, you are still well inside Workspace limits and n8n is barely working. The only thing that changes is the size of the log sheet, which you can archive quarterly.

Get the ready-to-import template

Grab the full JSON template from our downloads page, import it into your n8n instance, plug in your Shopify and Gmail credentials, and activate. The whole setup takes about 20 minutes if your n8n is already running.

If you would rather skip the setup entirely, our n8n installation service wires this workflow into your Shopify store for a fixed fee, including HMAC verification, DNS records for Gmail sender reputation, and a tested welcome copy template. Delivery in 48 hours.

Related guides

For the broader picture of how these workflows fit together, read the pillar at n8n Shopify automation and browse every post in the Shopify category. A natural next step is the daily sales report to Telegram build, which reuses the same Shopify Admin API connection you just set up here.

FAQ

Does this work on Shopify Basic plan?

Yes. The orders/create webhook and the Admin API with read access to orders and customers are both available on every Shopify plan, including Basic. You only need a paid plan if you want to use Shopify Flow as an alternative, and this workflow replaces the need for that entirely.

Will Gmail flag these welcome emails as spam?

Not if your sending domain has SPF, DKIM and DMARC records set up. Because the email goes out through your actual Gmail account, it inherits your normal sender reputation. Avoid aggressive subject lines and stick to plain text or light HTML for the first few weeks to build trust.

Can I send the welcome from a shared inbox like hello@acme.com?

Yes. Set the Gmail credential to use the shared inbox as the authenticated account, or use the “send as” alias feature in Gmail. The workflow does not care which address sends the message, as long as the credential can authenticate against Google.

What happens if the webhook fails or n8n is down?

Shopify retries the webhook up to 19 times over 48 hours. If n8n is back online within that window, the welcome still goes out, possibly a few minutes late. For stricter reliability, queue the Shopify event to a Google Sheet first and have a second workflow process the queue every five minutes.

How is this different from Shopify Flow?

Shopify Flow is tied to Shopify, cannot make arbitrary HTTP calls without connector apps, and has no native Gmail node. n8n runs on your infrastructure, connects to any API you need, and lets you log, branch and enrich with nodes that Flow simply does not expose. It is also free once self-hosted.

Shopify AI Product Description Generator with n8n (Full Template)








TL;DR

A Shopify AI product description generator n8n workflow listens for new or updated products, sends the title and attributes to OpenAI, and writes a structured SEO description back into Shopify. You get consistent tone, keyword coverage, and minutes-per-product instead of hours. Setup takes about 20 minutes, runs on your own n8n instance, and costs pennies per product at realistic volume.

What this workflow does

Shopify owners lose hours writing product descriptions that sound the same, rank for nothing, and still miss the keyword the customer actually typed. This n8n workflow removes that work. When a product is created or updated in Shopify, n8n fetches the product data, asks OpenAI to write a description using a prompt tuned for your brand voice, logs the result to Google Sheets for review, then updates the product back in Shopify through the Admin API.

The output is structured: a short hook, three to five benefit bullets written as sentences (not SEO sludge), a “Perfect for” line that targets the buyer intent, and a specifications block pulled from the product’s variants and metafields. You can run it on your whole catalog once as a backfill, or leave the webhook live so every new product gets a description the moment it’s published.

Why this beats the default approach

Most stores solve this with a paid Shopify app that charges per description, locks your prompt behind a UI, and stores every draft on the vendor’s server. With n8n you keep three things the apps take away: the prompt (so you can tune it when your brand voice shifts), the model choice (swap GPT-4o for a cheaper model when you’re backfilling 2,000 SKUs), and the data path (descriptions never leave your stack except the single call to OpenAI).

It also beats the classic “paste the title into ChatGPT and copy the result back” loop. That loop is fine at ten products. At two hundred it’s the reason nobody writes descriptions on Tuesdays. The workflow here runs on the Shopify webhook, so there is no copy-paste step and no forgotten product.

What you need before you start

A self-hosted or cloud n8n instance, a Shopify store with Admin API access (custom app token scoped to read_products and write_products), an OpenAI API key, and a Google Sheet you will use as the review log. Total cost to run: roughly $0.002 per description on GPT-4o-mini, or about $0.02 on GPT-4o if you want the premium output. A hosted n8n plan covers the execution cost; a self-hosted instance makes it effectively free.

Node-by-node list

The workflow uses nine nodes, kept deliberately small so you can debug any step without unpicking a giant branch.

  1. Shopify Trigger: listens on the products/create and products/update topics.
  2. HTTP Request (GET product): fetches the full product record including variants and metafields.
  3. Set: normalizes fields like title, vendor, product_type, tags, variants array, existing body_html.
  4. IF: skips the run if the product already has a description longer than 400 characters (prevents infinite loops on update).
  5. OpenAI: sends the structured prompt and receives the description.
  6. Code: cleans the model output, strips any leaked system prose, wraps the body in valid HTML.
  7. Google Sheets: appends a row with product ID, old description length, new description, model, timestamp.
  8. HTTP Request (PUT product): pushes the new description to Shopify Admin API.
  9. Slack or Telegram (optional): alerts the team that a product was auto-described, linking the admin URL.

If you want to link this into the rest of your automation stack, see the pillar guide on n8n Shopify automation for the trigger patterns used across every workflow on the site.

Step-by-step build

  1. Create the Shopify custom app. In your Shopify admin, go to Settings, Apps and sales channels, Develop apps, then Create an app. Give it Admin API access with read_products and write_products scopes. Install the app on your store and copy the Admin API access token. Store it in n8n under Credentials as a Shopify API credential.
  2. Add the Shopify Trigger node. Set topic to products/create. Duplicate the node and set a second trigger to products/update. Connect both into the same branch. n8n will register the webhook with Shopify the moment you activate the workflow.
  3. Add an HTTP Request node to fetch the full product. The webhook payload is light. Call GET https://YOUR-STORE.myshopify.com/admin/api/2024-10/products/{{$json.id}}.json using the same credential. Pull the complete record so you have variants, options, and metafields in one pass.
  4. Normalize the product data in a Set node. Extract the five fields the prompt will actually use: title, vendor, product_type, joined tags, first variant price. A small normalized object keeps your prompt short and the OpenAI bill low.
  5. Add the loop-guard IF node. Check whether body_html.length is greater than 400. If yes, route to a “no-op” branch that stops. This is the single most important piece of plumbing in the workflow. Without it, the products/update webhook fires on your own write, re-triggers the flow, and burns tokens forever.
  6. Configure the OpenAI node. Model: start with gpt-4o-mini. System prompt anchors the brand voice (“write like a confident in-house copywriter, no marketing clichés, no hype words, short sentences”). User prompt injects the normalized product object. Ask for JSON back with three keys: hook, body_html, seo_description.
  7. Parse and clean the response in a Code node. Parse the JSON, enforce a maximum length of 900 characters on body_html, strip any stray backticks, and wrap the body in a single <div> with semantic tags. If parsing fails, route to an error branch that logs the failure and stops. Never push broken HTML to Shopify.
  8. Log to Google Sheets. Append a row to a sheet called Product Description Log with columns product_id, product_title, old_body_length, new_body_html, seo_description, model_used, timestamp. This is your audit trail and the place you’ll look when a description needs a rewrite.
  9. Push the new description back to Shopify. PUT to /admin/api/2024-10/products/{{$json.id}}.json with a body of {"product": {"id": ..., "body_html": "...", "metafields_global_title_tag": "...", "metafields_global_description_tag": "..."}}. The two metafield keys update the SEO title and meta description in one call.
  10. Add the optional Slack or Telegram alert. Send a short message like “New description live for [title]” with a link to /admin/products/{{id}}. For small teams this is the review queue: open the link, skim the copy, edit by hand only if needed.
  11. Activate the workflow and test with one product. Create a draft product with only a title. Save. Within seconds the workflow should fire, log a row in Sheets, and populate the product description. If the loop guard is missing, you’ll see the workflow fire a second time from its own update. Fix that before you turn it on for the full catalog.
  12. Backfill the catalog (optional). Build a second small workflow: Google Sheets trigger reads a list of product IDs you want to regenerate, a Split in Batches node caps throughput at 10 products per minute, and each batch calls the same OpenAI plus Shopify PUT pair. Run it overnight and check the Sheets log in the morning.

Common mistakes to avoid

The first mistake is skipping the loop guard. The products/update webhook fires every time any field on the product changes, including writes from your own workflow. Without the length check, you get an infinite loop that only stops when your OpenAI credit runs out. The second is running GPT-4o on a 5,000-SKU backfill without checking what that costs. At roughly two cents per description you’re looking at $100 to backfill a mid-size store. Fine if you plan for it, painful if you don’t. Start on GPT-4o-mini, sample 50 products, and upgrade only if the quality gap justifies it.

A third mistake is asking the model for pure HTML. Models leak formatting, add ```html fences, or hallucinate tags that break Shopify’s editor. Ask for JSON, parse it, and build the HTML yourself in the Code node. The fourth is trusting the first prompt you write. The prompt is the product. Iterate it on ten real SKUs before you activate the webhook, and keep the winning version in a private Google Doc so a teammate doesn’t overwrite it in n8n.

The fifth mistake is forgetting the metafield SEO fields. The body_html shows up on the product page, but metafields_global_title_tag and metafields_global_description_tag drive the search snippet. Update all three in the same PUT call.

Cost at realistic volume

For a store adding 20 new products a week, running on GPT-4o-mini, you’re looking at roughly $0.04 per week in OpenAI costs, less than a rounding error. A one-time backfill of 1,000 existing products on GPT-4o-mini lands near $2. If you prefer GPT-4o for the final output, multiply by about 10: $20 for the same backfill. n8n execution costs are zero on self-host and covered by any Starter plan on n8n Cloud. Google Sheets is free at this volume.

Compare that to the paid Shopify description apps, which typically charge $19–$49 per month plus per-description fees. The n8n version breaks even in the first week and every month after that is pure margin.

Ready-to-import template

The full workflow JSON, with the prompt, the loop guard, the Sheets schema, and the Shopify PUT payload ready to paste, is available on the downloads page. Import it into your n8n instance, swap in your credentials, and activate. If you want it installed on your server with the webhooks verified and the first 20 products backfilled for you, the done-for-you service handles the setup end to end.

FAQ

Will this overwrite my existing product descriptions?

Only if you tell it to. The loop-guard IF node checks the current body_html length. Products with a description over 400 characters are skipped by default. For a deliberate bulk rewrite, run the separate backfill workflow and target the specific product IDs you want regenerated. Never rely on the live webhook for bulk overwrites.

Which OpenAI model should I use?

Start with GPT-4o-mini for everyday operation. The quality is close to GPT-4o on product copy, and the cost is about one-tenth. Move to GPT-4o only if your brand voice is tight, your price points are high, or your SKUs have nuance that mini misses on sampling. Swap the model in a single node, no other changes needed.

Can I run this on WooCommerce instead of Shopify?

Yes. Swap the Shopify Trigger for a WooCommerce webhook, change the GET and PUT URLs to the WooCommerce REST endpoints, and keep everything else the same. The prompt, the loop guard, the Sheets log, and the Code node all port directly. The WooCommerce product object uses description instead of body_html, so update the two field names in the Set and HTTP nodes.

How do I keep the brand voice consistent across 500 products?

The system prompt is your brand voice anchor. Write it once, paste examples of three descriptions you love, and lock the temperature at 0.4. For stores with very distinct collections, add a routing IF node after the Set step that picks a different system prompt based on product_type. This scales to as many voices as you have collections without ever duplicating the workflow.

What happens when OpenAI returns an error or times out?

The Code node’s JSON parse step fails closed. It routes to an error output that logs the failure to a separate Sheets tab and stops. Nothing gets written to Shopify on a bad response. You review the failures the next morning, retry the affected product IDs through the backfill workflow, and move on. The live product page is never in a broken state.

Related guides

Read the Shopify automation category for the full set of n8n workflows built for store operators, including low-stock alerts, daily sales reports, and order-risk scoring. For the broader tool stack, see the daily sales report workflow and the low-stock alert build.


Shopify Inventory Low Stock Alert with n8n (Automated, Real-Time)

TL;DR: Running a Shopify store without inventory alerts is how you end up overselling a product at 2 a.m. This guide shows you how to build a Shopify inventory low stock alert with n8n — a free, self-hosted automation that polls your store every hour, compares stock levels to a threshold you set, and fires an instant notification to Telegram, Slack, or Gmail. No monthly app fees, no flaky third-party integrations, full control over your thresholds.


What this workflow does

The automation runs on a schedule — every 1–4 hours, your choice. It calls the Shopify Admin REST API to pull current inventory levels for every tracked product variant. Then it compares each level to a threshold you define — say, 5 units — and filters out anything that’s still well-stocked. For any product that drops below the line, n8n sends a formatted alert with the product name, SKU, variant title, current quantity, and a direct link to that product’s Shopify admin page so you can act immediately.

You decide where alerts go: a Telegram message to your phone, a Slack notification to your ops team, or a Gmail alert with a subject line that’s hard to miss. Want all three destinations? Add three output nodes. Want to also log every triggered alert to a Google Sheet for trend analysis? Add one more node. The workflow stays on a single canvas — no sub-workflows, no complex branching.

The result is a silent guardian running in the background. You stop finding out about stockouts from frustrated customers. You start restocking before the problem becomes visible.

Why it beats Shopify’s default low-stock notifications

Shopify’s built-in inventory notifications email you when a product hits zero — meaning you’ve already oversold. Third-party apps like Stocky or Out-of-Stock Police cost $15–30 per month and still don’t give you the flexibility to set different thresholds per product, route alerts to different channels, or log every triggered event for reporting.

With n8n, the threshold logic is yours. You can set 5 units as the alert line for a $200 item and 50 units for a $10 consumable — in the same workflow, with a config sheet in Google Sheets driving the per-product values. You can log every alert to a sheet so you can spot which products regularly tank before your next buying cycle. You can add a branch that creates a reorder task in Notion, or emails a supplier template automatically. No app marketplace approval process, no recurring subscription beyond whatever you’re already paying for n8n hosting.

For more Shopify automations built on n8n, the n8n Shopify Automation guide covers the full picture of what’s possible.

What you need before building

Make sure you have these in place before opening n8n:

  • An n8n instance — self-hosted on a VPS or via n8n Cloud. If you don’t have one running yet, the n8n setup service gets you live in under 30 minutes.
  • A Shopify custom app (or private app) with the read_inventory and read_products API scopes enabled. You’ll need the Admin API access token from the app’s credentials page.
  • A notification destination: a Telegram bot token and chat ID, a Slack incoming webhook URL, or Gmail configured via OAuth2 in n8n’s credential manager.
  • Basic comfort with n8n’s canvas interface. No coding is required — the one optional Code node uses roughly 10 lines of straightforward JavaScript.

Node-by-node walkthrough

Here’s every node in the workflow and what it does:

Schedule Trigger — starts the workflow on your chosen interval. Set to every 1 hour in production; drop to every 5 minutes during testing.

HTTP Request — Get Products — calls GET /admin/api/2024-01/products.json?limit=250&fields=id,title,variants with your Shopify store URL and API token in the X-Shopify-Access-Token header. Returns all product variants with their IDs and SKUs.

HTTP Request — Get Inventory Levels — calls GET /admin/api/2024-01/inventory_levels.json?inventory_item_ids=... with batched inventory item IDs. Shopify lets you pass up to 50 IDs as a comma-separated string in a single call, which keeps API usage efficient.

Code node — merges the product data (titles, SKUs) with the inventory response (quantities). About 10 lines of JavaScript. Also attaches your threshold value to each item — either a hard-coded default or a per-product value fetched from a Google Sheet config.

IF node — filters on available < threshold. Items below the threshold go down the true branch (alert). Everything else goes to a no-op false branch or simply ends.

Telegram / Slack / Gmail node — sends the formatted alert message for each low-stock item. If multiple items are below threshold, the node fires once per item (n8n processes them as individual items automatically).

Google Sheets node (optional) — appends each triggered alert to a log sheet with columns: Timestamp, Product Name, SKU, Current Quantity, Threshold. Useful for spotting patterns over time.

Step-by-step build

  1. Open n8n and create a new workflow. Name it “Shopify Low Stock Alert.”

  2. Add a Schedule Trigger node. Set interval to every 1 hour. During testing, switch it to every 5 minutes so you don’t have to wait.

  3. Add an HTTP Request node. Method: GET. URL: https://YOUR-STORE.myshopify.com/admin/api/2024-01/products.json?limit=250&fields=id,title,variants. Under Headers, add X-Shopify-Access-Token with your token value. Enable “Split into items” so downstream nodes process each product separately.

  4. Add a Code node after the products call. Use it to extract the variant list and prepare batches of inventory_item_ids in groups of up to 50, ready for the next API call.

  5. Add a second HTTP Request node. URL: https://YOUR-STORE.myshopify.com/admin/api/2024-01/inventory_levels.json?inventory_item_ids={{ $json.batch_ids }}. Same auth header. This returns the current available quantity for each variant.

  6. Add another Code node to join product titles and SKUs from step 3 with the inventory quantities from step 5. Attach your threshold value here — either a static number or a lookup from a Google Sheet. Output one item per variant with fields: product_title, sku, available, threshold, product_id.

  7. Add an IF node. Condition: Number — {{ $json.available }} is less than {{ $json.threshold }}. This creates the true (low stock) and false (fine) branches.

  8. On the true branch, add a Telegram node (or Slack/Gmail). Format the message body as:

    ⚠️ Low Stock Alert
    Product: {{ $json.product_title }}
    SKU: {{ $json.sku }}
    In stock: {{ $json.available }} units (threshold: {{ $json.threshold }})
    Reorder: https://YOUR-STORE.myshopify.com/admin/products/{{ $json.product_id }}
  9. Optionally, add a Google Sheets — Append Row node on the same true branch to log every alert. Columns: Timestamp ({{ $now }}), Product, SKU, Available, Threshold.

  10. Test the workflow. Temporarily set a threshold higher than one of your current stock levels so the IF node fires. Confirm the alert arrives in Telegram/Slack/Gmail and the sheet row appears. Then restore real thresholds and flip the Schedule Trigger back to hourly.

  11. Toggle the workflow Active in the top-right corner. It now runs every hour without any manual intervention.

Common mistakes to avoid

The most common issue is pagination. Shopify’s API returns a maximum of 250 products per call. If your store has more, you need to follow the cursor-based pagination using the page_info value from the Link response header. n8n’s HTTP Request node doesn’t handle pagination automatically, so you’ll need a loop using a While node or a Code node that accumulates pages until there’s no “next” link in the header. Stores with fewer than 250 products can skip this entirely.

The second common issue is calling inventory_levels one variant at a time. With 500 variants, that’s 500 API calls per hour — you’ll burn through Shopify’s rate limit quickly. Always batch your inventory_item_ids into comma-separated groups of 50 in a single HTTP call. One Code node handles the batching in 5 lines of JavaScript.

Timezone handling catches people off guard when logging to Google Sheets. Shopify returns timestamps in UTC. If you want local time in your logs, add a new Date().toLocaleString('en-US', {timeZone: 'America/New_York'}) conversion in the Code node before the Sheets append. Swap in your own timezone string.

Finally, don’t forget to deactivate the workflow if you’re doing a planned full stockout (like a pre-order launch). A flood of low-stock alerts on a product that’s intentionally empty is just noise that trains you to ignore the real ones.

Cost at realistic volume

A 250-product store running this workflow hourly makes roughly 24 API calls to Shopify per day, well within the free REST API rate limits. Larger stores that batch properly stay under 100 API calls per day even with 1,000+ variants. There are no Shopify charges for reading inventory data.

On the n8n side: each workflow run counts as one execution. Running hourly means 720 executions per month. The n8n Cloud starter plan covers 2,500 executions per month from around $20. If you’re self-hosting on a VPS you already run, the added cost is zero.

Telegram, Slack free tier, and Gmail are all free. Google Sheets is free. Compare that to a $19–$29/month inventory alert app and the math is straightforward — this workflow pays for itself before the first month is up.

Ready to import this workflow?

The ready-to-import JSON template for this Shopify low stock alert is in the downloads section. Download, import into n8n, add your Shopify API token and Telegram (or Slack/Gmail) credentials, set your thresholds, and activate. Setup takes under 15 minutes on an existing n8n instance.

If you’d prefer someone else handle the setup — Shopify API permissions, n8n credential config, threshold customization, testing — the n8n automation service covers end-to-end workflow installation. You get a working alert system without touching a single node yourself.


FAQ

Does this Shopify low stock alert work with Shopify Plus?

Yes. The Admin REST API used here is available on all Shopify plans, including Shopify Plus. Plus accounts actually have higher API rate limits, so the workflow performs better on larger Plus stores. No plan-specific adjustments needed.

Can I set different thresholds for different products?

Yes. The cleanest approach is a Google Sheet with two columns — SKU and threshold. The workflow fetches that sheet at the start of each run, then joins the data with the inventory response before the IF filter. You get full per-product control without touching the workflow logic when you update thresholds.

What if my products have inventory across multiple locations?

Shopify’s inventory_levels endpoint returns one record per inventory item per location. You can filter by a specific location_id in the API call to check one warehouse, or sum quantities across all locations in the Code node before comparing to your threshold. Both approaches work; pick based on how your store manages stock.

Can the workflow automatically create a purchase order when stock is low?

Not in a single step, but extending it is straightforward. Add a branch that appends low-stock items to a Google Sheet reorder queue. A second n8n workflow monitors that sheet and either emails your supplier a pre-built order template or creates a draft order directly in Shopify. The two workflows hand off cleanly through the shared sheet.

How often should I run this workflow?

Hourly works well for most stores. High-volume operations selling fast-moving items should consider every 15–30 minutes. Very low-volume stores can run every 4 hours without missing anything actionable. Adjust the Schedule Trigger interval based on how fast your bestselling products move on a typical day.


Related guides

For more Shopify automation templates built with n8n, browse the Shopify automation category or start with the full overview: n8n Shopify Automation — The Complete Guide.

Shopify Daily Sales Report to Telegram with n8n (Template Inside)

TL;DR: A Shopify daily sales report Telegram n8n workflow pulls yesterday’s orders from your Shopify Admin API, calculates revenue, order count, AOV, top product, and refund totals, then posts a formatted summary to your Telegram chat every morning at 8 AM. Setup takes about twenty minutes, runs free on self-hosted n8n, and replaces the three dashboards most store owners refresh manually before their first coffee.

What this workflow does

Every morning at the same time, the workflow queries the Shopify Admin API for orders created in the previous 24 hours. It aggregates the raw order data into the numbers a store owner actually reads: gross revenue, net revenue after refunds, number of orders, average order value, best-selling product by units, best-selling product by revenue, and the split between new vs returning customers. Those numbers land in a single Telegram message on your phone before you open your laptop.

Unlike Shopify’s native email reports, this one is on Telegram (so you see it instantly), it includes yesterday only (not a rolling 30-day view), and the format is fully editable. If you want refunds broken down by reason, or a per-staff-member sales total, or a flag when revenue drops below a threshold, you change one node. No subscription, no third-party dashboard.

Why it beats the default Shopify report

Shopify Admin gives you analytics inside the dashboard and an optional daily email summary. Both have real limitations for an operator running more than one store or glancing at numbers on a phone:

The native email arrives at an hour you cannot control, it is missing the refund figure for the same day, and it does not adapt to the timezone of your warehouse if that differs from your store currency. The dashboard is fine at a laptop but heavy on mobile. Third-party apps like Lifetimely or Polaris cost $30 to $120 a month for what is, at its core, a SQL query and a formatted message.

Running this on n8n for Shopify automation gives you the exact numbers you want, on the channel you already check, at the hour you pick, for zero recurring cost. And because the workflow lives in your own n8n instance, adding a second store means duplicating two nodes, not buying a second seat.

What you need before you start

You need a running n8n instance (self-hosted or cloud), a Shopify store where you are the owner or have a staff account with read access to orders and products, and a Telegram account. Budget ten minutes to create a custom Shopify app for API credentials and five minutes to create the Telegram bot. Total prep time is under twenty minutes if you are comfortable copying tokens between browser tabs.

For the Shopify side you will create a custom app inside Shopify Admin and grant it read_orders, read_products, and read_customers scopes. Shopify issues an Admin API access token that n8n uses as a Bearer credential. For Telegram you talk to BotFather, get a bot token, then send your bot a message and grab the chat ID from the getUpdates endpoint.

Node-by-node list

The finished workflow has seven nodes. Here is what each one does and why it exists.

Schedule Trigger: fires once a day at 08:00 in your store timezone. You set the timezone inside n8n settings, not in the node, so every scheduled workflow agrees on time.

Set – Date Window: computes the ISO string for “yesterday 00:00” and “yesterday 23:59:59” in your timezone. Using a dedicated Set node keeps the date math in one place, which matters when daylight saving shifts or when you move the workflow to a new server.

HTTP Request – Shopify Orders: calls GET /admin/api/2024-10/orders.json with status=any, created_at_min, and created_at_max query parameters. Using HTTP Request instead of the Shopify node gives you control over pagination and field selection, which matters for high-volume stores.

Code – Aggregate Metrics: JavaScript that reduces the orders array into the numbers you want in the report. It sums total_price, counts orders.length, divides for AOV, iterates line_items to find the top product by units and revenue, and separates refunded amounts using refunds[].transactions[].amount.

HTTP Request – Refund Totals: optional second call to /admin/api/2024-10/orders.json?financial_status=refunded&processed_at_min=... for refunds processed yesterday on orders created earlier. You merge this into the main totals in the Code node.

Set – Format Message: builds the Telegram message string with markdown. Emojis are optional, but a green circle for revenue up vs red for revenue down makes the message readable at a glance.

Telegram – Send Message: posts to your chat with parse_mode: "Markdown". Disable web page preview in the node options so any store URL in the message does not generate a huge preview card.

Step-by-step build

1. In Shopify Admin, go to Settings, Apps and sales channels, Develop apps, Create an app. Name it “n8n Daily Report”. Under Configuration grant read_orders, read_products, read_customers. Install the app. Copy the Admin API access token that starts with shpat_.

2. In n8n, create a new credential of type “Header Auth”. Name header X-Shopify-Access-Token, value is the token from step 1. Save.

3. Open Telegram, search @BotFather, send /newbot, give it a name, copy the HTTP API token it returns. Send your new bot any message, then open https://api.telegram.org/bot<YOUR_TOKEN>/getUpdates in a browser to grab the chat.id of your chat.

4. Create a new n8n workflow. Add a Schedule Trigger node set to “Every Day at 08:00”.

5. Add a Set node. Create two string fields: fromISO with value ={{ DateTime.now().setZone('Africa/Casablanca').minus({days: 1}).startOf('day').toISO() }} and toISO with value ={{ DateTime.now().setZone('Africa/Casablanca').minus({days: 1}).endOf('day').toISO() }}. Replace the zone with your own.

6. Add an HTTP Request node. Method GET. URL https://YOUR-STORE.myshopify.com/admin/api/2024-10/orders.json. Authentication: Generic, Header Auth, credential from step 2. Query parameters: status=any, created_at_min={{$json.fromISO}}, created_at_max={{$json.toISO}}, limit=250, fields=id,total_price,subtotal_price,currency,line_items,customer,refunds,created_at.

7. Add a Code node. Paste the aggregation script (included in the downloadable JSON template). The script returns one item with fields revenue, orders, aov, topProduct, newCustomers, refunded, net.

8. Add a Set node that builds the message. Example value for a text field: 📊 *Daily Sales — {{$json.date}}*\n\nOrders: *{{$json.orders}}*\nRevenue: *{{$json.currency}} {{$json.revenue}}*\nRefunded: {{$json.currency}} {{$json.refunded}}\nNet: *{{$json.currency}} {{$json.net}}*\nAOV: {{$json.currency}} {{$json.aov}}\n\nTop product: {{$json.topProduct}}\nNew customers: {{$json.newCustomers}}.

9. Add a Telegram node. Operation: Send Message. Chat ID: your ID from step 3. Text: ={{$json.text}}. Additional Fields: Parse Mode Markdown, Disable Web Page Preview true. Save the credential with your bot token.

10. Run the workflow manually with a date window you know contains orders. Verify the Telegram message matches what you see inside Shopify Admin Analytics for the same day. Activate the workflow.

Common mistakes

The timezone trap catches everyone. If your n8n server runs UTC but your store reports in Casablanca or New York time, a naive new Date() call returns yesterday according to the server, not according to your store. Always set the zone explicitly with Luxon inside the Set node, and match it to your Shopify store locale.

Pagination is the second trap. Shopify returns a maximum of 250 orders per call. A store doing more than that in 24 hours needs pagination via the Link header or via cursor-based queries using page_info. The downloadable template includes a loop node for stores above this volume.

Refund logic is the third. The total_price on an order does not change when a refund happens. You have to sum refunds[].transactions[].amount separately and subtract from the gross. Skipping this step produces a revenue number that looks great but is wrong by the end of the first refund-heavy week.

The fourth mistake is sending the report from a bot you added to a group without disabling privacy mode. Telegram group bots cannot see their own outgoing messages correctly in some clients when privacy is on. For a daily report, send to a private chat with yourself or to a small ops group where you have toggled privacy off in BotFather with /setprivacy.

Cost at realistic volume

A store doing 100 orders a day makes 2 Shopify API calls per run, well under the 40 calls per second limit on the standard plan. One Telegram message costs zero. Self-hosted n8n on a $5 VPS handles hundreds of workflows like this without breathing hard.

If you run n8n Cloud instead, the workflow uses roughly 4 executions per day (trigger plus pagination on a busy day), which fits inside every n8n Cloud tier. Annual cost at the Starter tier prorated for this workflow alone is under $2. Compared to a $30 per month Shopify analytics app, the payback is the first day.

Get the ready-to-import template

The complete JSON template, a setup PDF, and a credentials guide are bundled on our downloads page. Import the JSON into n8n, paste your tokens, change the timezone string, and activate. Two minutes from download to first report.

If you want it installed for you on your own n8n server (or you want the two-store, multi-currency version with a weekly rollup on Sundays), the team at easyworkflows handles the install, credentials, and first test run. See our services page for options.

FAQ

Does this work with Shopify Plus?

Yes. The Admin API endpoint is identical across Shopify Basic, Shopify, Advanced, and Plus. Plus stores often want the multi-location inventory and per-channel sales variant, which the extended template includes. API rate limits are also higher on Plus, so pagination for very large order volumes is faster.

Can I send the report to Slack instead of Telegram?

Yes. Replace the Telegram node with a Slack node, map the same text field to the Slack message body, and switch Markdown to mrkdwn syntax in the formatting node (Slack uses *bold* without underscores around italics). Everything upstream stays identical.

What if I want the report weekly instead of daily?

Change the Schedule Trigger to “Every Week on Monday at 08:00” and change the date window in the Set node to seven days back instead of one. The aggregation code works the same way because it reduces any order array into one summary.

How do I add a comparison with the previous day?

Add a second HTTP Request that pulls the day before yesterday using a different date window, run it through a duplicate of the Code node, and reference both in the format node. A simple percentage change calculation gives you the up/down arrow most operators want to see first.

Is this compliant with Shopify API policies?

Yes. The workflow uses the Admin API with scopes you granted in a custom app you own. There is no scraping, no reselling of data, and no third-party sharing. You stay inside the Shopify Partner Program terms because the app is private to your store.

Related guides

For more Shopify workflows, see the Shopify category on easyworkflows. The order risk alert template and the new customer welcome email workflow pair well with this report: together they cover the three things a store operator checks first thing in the morning. Revenue, risk, and who just signed up.

Shopify Order AI Risk Alerts to Slack and Telegram with n8n (Template Inside)

TL;DR: Every new Shopify order posts to Slack and Telegram with the customer’s lifetime value, order count, and a one-line AI risk flag (“repeat customer, low risk” / “first order, high value — confirm shipping address” / “multiple disputes on file”). Your fulfillment team sees the context before they ship. Full n8n workflow below, all using tools you probably already have.

Shopify’s native “new order” email is useless for a busy store. It doesn’t tell you if the customer is a VIP or a chargeback risk. You end up opening Shopify, clicking the customer, checking their history, reading notes — every single order. For a store doing 20+ orders a day, that’s an hour of clicks nobody has time for.

This workflow replaces that with a 5-second glance at Slack or Telegram.

What this workflow does

A new order hits Shopify. n8n picks it up via webhook, pulls the customer’s full history (order count, total spent, prior disputes, last order date), feeds all that to GPT-4o with a short prompt, gets back a one-line risk summary, and posts a clean message to Slack and a matching one to Telegram. Everything is logged to Google Sheets for later analysis.

Example Slack message the workflow produces:

🟢 Order #1247 — $189.00
Sarah Chen · Toronto, CA · sarah@example.com
Products: Linen shirt (M) × 1, Canvas tote × 2
Customer: 4th order, $712 LTV, no disputes
AI flag: Repeat customer, low risk, standard fulfillment

For a risky order:

🟡 Order #1248 — $640.00
Unknown buyer · Lagos, NG · protonmail address
Customer: First order, high value
AI flag: High order value from new customer with anonymous email. Recommend address verification before shipping.

Why this beats Shopify’s default order email

  • Context at a glance — LTV, order history, and risk in one line. No clicking into Shopify.
  • Two channels, one workflow — Slack for the team, Telegram for the owner’s phone. Both get the same data formatted correctly for each platform.
  • AI that actually thinks — GPT-4o reads the customer history and writes a human-sounding flag. Not a rule engine. It catches patterns rigid rules miss.
  • Paper trail — every order gets logged to Google Sheets with the AI flag. You can audit later why a dispute happened.
  • Free to run — Shopify API is free, Slack webhooks are free, Telegram bots are free, Google Sheets is free. Only OpenAI costs money: roughly $0.0008 per order using gpt-4o-mini.

What you need before starting

  • Shopify store with Admin API access
  • n8n instance (Cloud or self-hosted)
  • OpenAI API key (any paid plan; gpt-4o-mini is recommended for cost)
  • Slack workspace with permission to add an Incoming Webhook
  • Telegram bot (takes 2 minutes to create via @BotFather)
  • Google Sheet for logging

The workflow, node by node

  1. Shopify Trigger — topic: orders/create
  2. Shopify node — get the customer by ID (orders/create payload has customer_id)
  3. Edit Fields (Set) — build a compact JSON of order + customer history
  4. OpenAI node — ask gpt-4o-mini for a one-line risk assessment
  5. Edit Fields — format the Slack message (Markdown)
  6. Slack node — post to #orders channel
  7. Edit Fields — format the Telegram message (HTML)
  8. Telegram node — send to the owner’s chat
  9. Google Sheets node — append row with order ID, customer, total, AI flag, timestamp
  10. Error Trigger — separate branch, sends failures to Telegram so nothing fails silently

Ten nodes. One webhook. No custom code.

How to build the Shopify order AI risk workflow in n8n

1. Create Shopify API credentials

  1. In Shopify admin go to Settings → Apps and sales channels → Develop apps.
  2. Click Create an app, name it n8n order alerts.
  3. Under Admin API access scopes enable: read_orders, read_customers.
  4. Install the app. Copy the Admin API access token.

2. Add the Shopify Trigger in n8n

  1. New workflow → add Shopify Trigger node.
  2. Add Shopify credential: shop subdomain (yourstore.myshopify.com) + access token.
  3. Set Topic: orders/create.
  4. Activate. n8n registers the webhook with Shopify automatically.

3. Fetch the customer’s full history

The orders/create payload gives you the customer_id but not the full profile. Add a Shopify node:

  • Resource: Customer
  • Operation: Get
  • Customer ID: {{ $json.customer.id }}

This returns orders_count, total_spent, created_at, tags, addresses, and email — all the history you need.

4. Build the context object for the AI

Add an Edit Fields (Set) node. Keep Mode: Manual Mapping. Build these fields:

order_id        = {{ $('Shopify Trigger').item.json.name }}
order_total     = {{ $('Shopify Trigger').item.json.total_price }}
items           = {{ $('Shopify Trigger').item.json.line_items.map(i => i.title + ' x ' + i.quantity).join(', ') }}
customer_name   = {{ $json.first_name + ' ' + $json.last_name }}
customer_email  = {{ $json.email }}
customer_city   = {{ $json.default_address?.city || 'n/a' }}
customer_country= {{ $json.default_address?.country_code || 'n/a' }}
orders_count    = {{ $json.orders_count }}
lifetime_value  = {{ $json.total_spent }}
customer_since  = {{ $json.created_at }}
customer_tags   = {{ $json.tags }}

5. Ask the AI for a risk flag

Add an OpenAI node. Resource: Text → Message a Model. Model: gpt-4o-mini.

System message:

You are a fulfillment assistant for a Shopify store. Given a new order and the customer's history, write ONE line (max 25 words) describing the risk level and any action the shipping team should take. Use plain language. Start with one of: "Repeat customer, low risk" / "First order" / "High-value order" / "Unusual pattern". Never invent data not present in the input.

User message:

Order: {{$json.order_id}} — {{$json.order_total}} — {{$json.items}}
Customer: {{$json.customer_name}} ({{$json.customer_email}}) from {{$json.customer_city}}, {{$json.customer_country}}
History: {{$json.orders_count}} previous orders, ${{$json.lifetime_value}} lifetime. Customer since {{$json.customer_since}}.
Tags: {{$json.customer_tags}}

Keep temperature at 0.3 — you want consistent output, not creativity.

6. Format and post to Slack

Add a Slack node. Authentication: either OAuth or an Incoming Webhook URL (simpler). Channel: #orders. Message format (Slack mrkdwn):

🟢 *Order {{$('Set context').item.json.order_id}}* — ${{$('Set context').item.json.order_total}}
{{$('Set context').item.json.customer_name}} · {{$('Set context').item.json.customer_city}}, {{$('Set context').item.json.customer_country}} · {{$('Set context').item.json.customer_email}}
Products: {{$('Set context').item.json.items}}
Customer: {{$('Set context').item.json.orders_count}} orders, ${{$('Set context').item.json.lifetime_value}} LTV
AI flag: *{{$('OpenAI').item.json.message.content}}*

7. Send to Telegram too

Create a Telegram bot with @BotFather, get the token, add your chat as a recipient (send /start to the bot, then grab chat_id from https://api.telegram.org/bot<TOKEN>/getUpdates).

Add a Telegram node → Send Message. Parse mode: HTML. Body:

🟢 <b>Order {{$('Set context').item.json.order_id}}</b> — ${{$('Set context').item.json.order_total}}
{{$('Set context').item.json.customer_name}} · {{$('Set context').item.json.customer_city}}
{{$('Set context').item.json.items}}
<b>AI:</b> {{$('OpenAI').item.json.message.content}}

8. Log to Google Sheets

Add a Google Sheets → Append Row node. Columns: timestamp, order_id, customer_email, country, order_total, orders_count, ltv, ai_flag. This is your audit log and the basis for later analysis — dispute patterns, country-level risk, AI flag accuracy.

9. Handle errors

Create a second workflow start with an Error Trigger. Connect it to a Telegram node that posts ❌ Order alert workflow failed: {{error.message}}. Silent failures on a revenue-critical workflow are how you find out three days later that you’ve shipped 40 risky orders blind.

Common mistakes and how to avoid them

Using the full order JSON as the AI prompt. Shopify order payloads are huge (hundreds of fields). Feeding the whole thing to OpenAI burns tokens and dilutes the model’s focus. Always build a compact context object first — the Set node is non-negotiable.

Letting the AI invent data. Without the “Never invent data not present in the input” line in the system prompt, models occasionally make up prior disputes or tag the wrong country. That instruction fixes it 95% of the time.

Double-firing on order edits. Shopify sends orders/create exactly once, but if you swap the trigger to orders/updated (tempting for tag changes) you’ll get the same alert multiple times. Stay on orders/create for this use case.

Skipping the error branch. OpenAI hiccups. Slack tokens expire. Telegram rate-limits. You need one place where failures surface. Five minutes of setup, hours saved when something breaks.

Cost at realistic volume

  • n8n: $5/month self-hosted, $20 Cloud starter
  • Shopify API: free
  • OpenAI (gpt-4o-mini): ~$0.0008 per order. 1,000 orders/month = $0.80.
  • Slack, Telegram, Google Sheets: free at this volume

Total operating cost for a 1,000-order/month store: roughly $6. You save the fulfillment team 30+ minutes a day. The math is not complicated.

Get the ready-to-import template

Build it from scratch in about 40 minutes if you’ve used n8n before.

Or import the template: Browse all downloads →

Included: cleaned JSON, Setup PDF with screenshots for every step, Credentials Guide PDF covering the Shopify app, OpenAI key, Slack webhook, and Telegram bot, Google Sheets template with the columns pre-created.

If you’d rather have us install it on your store: Single Install — $149. Delivered in 48 hours, tested on your live store, 30-minute walkthrough included.

Frequently asked questions

Does Shopify have built-in AI order risk scoring?

Shopify shows a basic “fraud risk” indicator on orders (low, medium, high) based on internal signals, but it doesn’t push alerts anywhere and the reasoning is a black box. This workflow adds a readable AI explanation plus delivery to Slack and Telegram where your team actually works.

Will the AI ever flag a good customer as risky?

Occasionally. The workflow is advisory, not enforcing — it adds context to a Slack message, it doesn’t block or cancel orders. Your team still makes the call. Review the Google Sheets log weekly and refine the system prompt if you see a pattern.

Can I use a cheaper model than gpt-4o-mini?

Yes. The prompt works with any capable instruction-following model — Gemini 1.5 Flash, Claude 3.5 Haiku, or a local Llama via Ollama. At gpt-4o-mini prices, switching isn’t worth the setup time for most stores.

Can this run on n8n Cloud?

Yes. Every node used is standard. No community nodes required. On n8n Cloud’s Starter plan, 1,000 orders a month fits comfortably inside the execution limit.

What if I don’t use Slack?

Remove the Slack node, keep Telegram. Or swap Slack for Discord, Mattermost, or Gmail. The workflow structure is identical — only the final delivery node changes.

Related guides

How to Build Voice AI Customer Support for WooCommerce with n8n and VAPI

Imagine a customer calls your store on a Friday evening asking about their order status—but your team has already left for the weekend. The phone rings unanswered. The customer leaves frustrated and takes their business elsewhere. This scenario plays out thousands of times every day in e-commerce. Now imagine if your WooCommerce store had a tireless AI agent that could answer customer calls 24/7, look up orders, provide tracking information, and answer FAQs using your own knowledge base—all through a simple phone call.

Prefer to skip the setup? Grab the ready-made template → and be up and running in under 10 minutes.

In this guide, you’ll learn how to build exactly that: a voice AI customer support system that combines multiple cutting-edge AI technologies (VAPI for voice, GPT-4o-mini for intelligent conversations, Gemini for knowledge retrieval, and Qdrant for vector search) with n8n as the orchestration engine. By the end, you’ll have a fully functional voice assistant that handles post-sales support and product questions.

What You’ll Build

This n8n workflow creates a complete voice AI customer support solution with two primary flows:

  1. Post-Sales Agent Flow — A GPT-4o-mini powered conversational agent that customers can call to ask about their orders. It verifies identity using email and order number, retrieves real-time order information from WooCommerce, fetches tracking details via a sub-workflow, and speaks the results back to the caller through VAPI.
  2. RAG Q&A Flow — A Retrieval-Augmented Generation system using Google Gemini 1.5 Flash that searches a Qdrant vector database for product information, policies, and FAQs, delivering contextual answers directly to customers asking product questions.
  3. Tracking Sub-Workflow — A helper workflow that queries the WooCommerce REST API using the YITH tracking plugin to extract shipping carrier URLs, tracking codes, and pickup dates.

All three flows are triggered via webhooks from VAPI, your voice AI platform, and connected to Twilio phone numbers for inbound calling.

The Big Picture: How It All Works Together

Here’s a visual representation of the system architecture:

┌────────────────────────────────────────────────────────────────────┐
│                       CUSTOMER CALLS TWILIO NUMBER                    │
└──────────────────────────────┬──────────────────────────────────────┘
                                │
                                ▼
                      ┌───────────────────────┐
                      │   VAPI Voice AI        │
+                      │   (Processes Speech)  │
                      └───────┬───────┬───────┘
                              │       │
                     ┌────────┘       └────────┐
                    ▼                           ▼
      ┌──────────────────────────┐   ┌──────────────────────┐
      │  POST-SALES AGENT FLOW   │   │  RAG Q&A FLOW       │
      │  (Order Lookups)         │   │  (Product Questions) │
      └────────┬─────────────────┘   └──────────┬───────────┘
               │                              │
               ▼                               ▼
      ┌──────────────────────────┐   ┌──────────────────────┐
      │  n8n Post-Sales Webhook  │   │ n8n RAG Webhook      │
      │                         │   │                       │
      │ 1. GPT-4o-mini Agent     │   │ 1. Question & Answer │
      │ 2. WooCommerce API Call  │   │ 2. Gemini 1.5 Flash  │
      │ 3. Tracking Sub-Workflow │   │ 3. Qdrant Vector DB  │
      │ 4. Format Response       │   │ 4. Return Response   │
      └────────┬─────────────────┘   └──────────┬───────────┘
               │                               │
               └────────────┬──────────────────┘
                              ▼
                    ┌─────────────────────┐
                   │  VAPI Returns Audio │
                   │  to Caller          │
                   └─────────────────────┘

Prerequisites

Before you start building, make sure you have access to these services and accounts:

  • WooCommerce Store — A working WooCommerce installation with REST API enabled. We’ll authenticate using API keys (Consumer Key & Consumer Secret).
  • VAPI Account — Sign up at vapi.ai to create voice assistants. You’ll need to create tools that point to your n8n webhooks.
  • Twilio Account — Create a Twilio account to provision inbound phone numbers. VAPI integrates directly with Twilio.
  • OpenAI API Key — For GPT-4o-mini and OpenAI embeddings. Ensure you have billing enabled.
  • Google Gemini API Key — For the Gemini 1.5 Flash model used in the RAG flow.
  • Qdrant Vector Database — Either a cloud Qdrant instance or self-hosted. You’ll need the API key and collection name with pre-populated embeddings.
  • n8n Instance — Cloud or self-hosted n8n with execution enabled.
  • YITH WooCommerce Order Tracking Plugin — Free plugin to store tracking metadata. Install it on your WordPress site.

Building Flow 1: Post-Sales Agent

The post-sales agent handles customer calls asking about their orders. Here’s how to build it step-by-step:

Step 1: Create the VAPI Post-Sales Webhook

Start with a webhook node that receives requests from VAPI. This node waits for incoming POST requests containing customer data (email address and order number) sent by VAPI when a customer calls the dedicated phone number.

In n8n, add a Webhook node and configure it as follows:

  • Set HTTP Method to POST
  • Set Response Mode to responseNode (we’ll send the response later from a dedicated response node)
  • Copy the webhook URL to use in VAPI later
💡

Tip: The webhook path is auto-generated. Note it down—you’ll paste this URL into VAPI’s tool configuration.

Step 2: Add the GPT-4o-mini Agent Node

The agent is the brain of your post-sales support system. It’s a GPT-4o-mini powered node with tools that can look up orders, retrieve customer information, and get tracking details.

Add an Agent node (type: @n8n/n8n-nodes-langchain.agent) and configure:

  • Language Model: Connect your OpenAI credentials and select gpt-4o-mini
  • Input Text: Set to ={{ $json.body.email }} and {{ $json.body.n_order }} to pass the customer email and order number from the webhook
  • System Message: Paste a detailed prompt telling the agent its role, how to verify customer identity, and which tools to use (see the workflow for the full prompt)

The system message is critical. It instructs the agent to:

  • Always verify that the email matches the order number
  • Refuse to share order details if the email is incorrect
  • Use available tools (get_order, get_orders, get_user, get_tracking, Calculator) to answer questions
  • Provide clear, professional responses suitable for voice output

Step 3: Connect Tool Nodes for Order Lookup

The agent needs tools to retrieve information. Add four WooCommerce tool nodes:

get_order Node: Retrieves a single order by ID.

  • Resource: order
  • Operation: get
  • Order ID: Leave this for the agent to fill dynamically via $fromAI()
  • Connect WooCommerce credentials with your store URL/li>

get_orders Node: Searches for multiple orders (e.g., by customer email).

  • Resource: order
  • Operation: getAll
  • Search: Leave for agent to fill via $fromAI()

get_user Node: Retrieves customer profile information by email.

  • Resource: customer
  • Operation: getAll
  • Filter by Email: ={{ $fromAI('Email', '', 'string') }}

Calculator Node: Allows the agent to perform math (e.g., calculate shipping costs, discounts). Use the built-in calculator tool from LangChain.

Connect all four of these nodes to the agent’s ai_tool output.

📌

Security Note: The agent’s system prompt includes strict identity verification logic. Always ensure that order details are only shared after email verification. Never allow the agent to bypass this check.

Step 4: Add the Tracking Sub-Workflow Tool

Instead of querying WooCommerce directly for tracking, we call a separate workflow using a tool workflow node. This keeps your main workflow clean and allows the tracking sub-workflow to be tested independently.

Add a Tool Workflow node (type: @n8n/n8n-nodes-langchain.toolWorkflow):

  • Name: get_tracking
  • Workflow ID: Select the tracking sub-workflow (you’ll create this in the next section)
  • Description: “Get tracking number for a specific order by providing the order number. The tool retrieves the unique tracking code that allows customers to monitor their shipment’s current status and location.”
  • Input Schema: Define one input parameter: order_number (string)

Connect this to the agent’s ai_tool output as well.

Step 5: Format and Return the Response

After the agent generates an answer, format it and send it back to VAPI.

Add a Set node to extract the agent’s output message:

  • Assignment: Set a field called message to ={{ $json.output }}

Then add a Respond to Webhook node:

  • This sends the JSON response back to VAPI with the agent’s message
  • VAPI will convert this text to speech and play it to the caller

Building Flow 2: RAG Q&A System

The second flow handles customer questions about products, policies, and FAQs by searching your knowledge base. Here’s how to build it:

Step 1: Create the RAG Webhook

Add another Webhook node for the RAG flow:

  • HTTP Method: POST
  • Response Mode: responseNode
  • Path: Give it a distinct path like rag-webhook

This webhook will receive search queries from VAPI when customers ask product questions.

Step 2: Add the Question & Answer Chain

Add a Chain Retrieval QA node (type: @n8n/n8n-nodes-langchain.chainRetrievalQa):

  • Input Text: ={{ $json.body.search }} to use the search query from VAPI
  • System Prompt Template: Set a prompt that instructs the model to use retrieved context to answer questions. Example: “You are an assistant for question-answering tasks. Use the following pieces of retrieved context to answer the question. If you don’t know the answer, just say that you don’t know.”
  • Prompt Type: define

This node will automatically search the vector store and synthesize an answer based on retrieved documents.

Step 3: Connect the Language Model (Gemini 1.5 Flash)

Add a Chat Google Gemini node (type: @n8n/n8n-nodes-langchain.lmChatGoogleGemini):

  • Model: models/gemini-1.5-flash (the fastest and most cost-effective Google model)
  • Add your Google Gemini API credentials

Connect this to the Question & Answer Chain’s ai_languageModel input.

Step 4: Set Up Vector Store Retrieval

Add a Vector Store Retriever node (type: @n8n/n8n-nodes-langchain.retrieverVectorStore):

  • Top K: 5 (retrieve the 5 most relevant documents)

Connect this to the Question & Answer Chain’s ai_retriever input.

Step 5: Connect Qdrant Vector Store

Add a Qdrant Vector Store node (type: @n8n/n8n-nodes-langchain.vectorStoreQdrant):

  • Add your Qdrant API credentials
  • Collection: Select the collection name containing your product embeddings (e.g., “product-knowledge”)

Connect this to the Vector Store Retriever’s ai_vectorStore input.

Step 6: Add OpenAI Embeddings

Add an Embeddings OpenAI node (type: @n8n/n8n-nodes-langchain.embeddingsOpenAi):

  • Add your OpenAI API credentials
  • This generates embeddings for the search query to match against your Qdrant collection

Connect this to the Qdrant Vector Store’s ai_embedding input.

💡

Tip: Make sure your Qdrant collection was populated with embeddings from the same OpenAI model (text-embedding-3-small or similar). Mismatched embeddings will give poon search results.

Step 7: Return RAG Response

Add a Respond to Webhook node to send the RAG answer back to VAPI. The Question & Answer Chain’s output will automatically include the synthesized answer in $json.output.

Building the Tracking Sub-Workflow

The tracking sub-workflow is a separate workflow that the main workflow calls. This keeps your logic modular and testable. Here’s how to build it:

Step 1: Add Workflow Trigger

Create a new workflow and add an Execute Workflow Trigger node (type: n8n-nodes-base.executeWorkflowTrigger):

  • Input Source: jsonExample
  • JSON Example: { "order_number": "order number" }

This allows the main workflow to pass an order number to this sub-workflow.

Step 2: Query WooCommerce REST API

Add an HTTP Request node:

  • Method: GET
  • URL: https://YOUR_STORE_URL/wp-json/wc/v3/orders/{{ $json.order_number }}
  • Authentication: Use HTTP Basic Auth with your WordPress credentials

This fetches the full order object from WooCommerce, including the meta_data field where YITH stores tracking information.

Step 3: Extract Tracking Details

Add a Set node to parse the tracking metadata:

Assignments:
- tracking_code: $json["meta_data"].find(item => item.key === "ywot_tracking_code").value
- carrier_url: $json["meta_data"].find(item => item.key === "ywot_carrier_url").value
- pick_up: $json["meta_data"].find(item => item.key === "ywot_pick_up_date").value

These fields come from the YITH plugin’s meta data structure. The agent will use these fields to provide tracking links and pickup information to customers.

📌

Important: Make sure the YITH plugin is installed and configured on your WooCommerce store. If the meta_data fields don’t exist, this node will error. Test with a real order that has tracking information.

VAPI Configuration: Connecting Voice to Your Workflows

Now that your n8n workflows are built, connect them to VAPI so that incoming phone calls trigger the workflows.

Step 1: Create API Request Tools in VAPI

Log in to your VAPI dashboard and navigate to the Tools section.

Create Tool 1: WooCommerce Order Lookup

  • Tool Type: API Request
  • Name: Check Order Status
  • Request Method: POST
  • Request URL: Paste the webhook URL from your VAPI Post-Sales Webhook node
  • Request Body Format: JSON
  • Parameters:
    • Name: email, Type: string, Description: “Customer’s email address”
    • Name: n_order, Type: string, Description: “Order number to look up”

Create Tool 2: Product Knowledge RAG

  • Tool Type: API Request
  • Name: Search Product Knowledge
  • Request Method: POST
  • Request URL: Paste the webhook URL from your RAG Webhook node
  • Request Body Format: JSON
  • Parameters:
    • Name: search, Type: string, Description: “Search query for product information, policies, or FAQs”

Step 2: Create or Update Your Voice Assistant

In VAPI, go to the Assistants section and create a new assistant or edit an existing one:

  • Name: “WooCommerce Support Agent”
  • Model: Select your preferred model (GPT-4 Turbo, Claude, etc.)
  • System Prompt: Craft a prompt that tells the voice assistant to greet customers, explain the available tools, and guide them to either check their order status or ask product questions. Example:

    “You are a friendly customer support agent for an online store. When someone calls, greet them warmly and ask whether they want to (1) check on an existing order by providing their order number and email, or (2) ask a product question. Use the appropriate tool based on their request.”

  • Voice: Choose a voice under the Voice tab (e.g., “Alloy” for a neutral tone, “Juniper” for friendliness)
  • Tools: In the Tools tab, add the two tools you created above

Step 3: Set Up Twilio Phone Number

In your VAPI dashboard, go to Phone Numbers and either:

  • Create a new phone number with VAPI (it provisions through Twilio), or
  • Import an existing Twilio phone number into VAPI

Configure the phone number as “Inbound” and associate it with your WooCommerce Support Assistant.

Once configured, any call to this number will trigger your VAPI assistant, which will prompt the caller, and route requests to your n8n workflows via the webhooks.

💡

Tip: Test the end-to-end flow by calling the Twilio number from your phone. Listen for the greeting, and try asking about an order or a product question. Check your n8n execution logs to debug any issues.

Testing and Debugging

Once everything is wired up, test thoroughly before going live:

Test the Post-Sales Agent

  1. Create a test order in WooCommerce with a known order number and email address
  2. Call your Twilio number and ask to check the order status
  3. Provide the correct email and order number when prompted
  4. Verify that the agent retrieves and reads the order information correctly
  5. Try with an incorrect email to verify the security check works (agent should refuse)

Test the RAG Q&A

  1. Call the Twilio number and ask a product question (e.g., “What are your return policies?” or “Do you ship internationally?”)
  2. Verify that the assistant searches your Qdrant collection and returns relevant answers
  3. Check the n8n execution logs to see which documents were retrieved

Check n8n Execution Logs

In your n8n dashboard, navigate to the execution history of your workflows. Look for:

  • Successful webhook trigger (check the request body has the correct email and order number)
  • Agent node executing without errors
  • WooCommerce API calls returning data
  • Correct JSON response sent back to VAPI

If any step fails, the agent will explain the error to the caller, so listen carefully and check the logs.

Frequently Asked Questions

Can I use a different LLM instead of GPT-4o-mini for the post-sales agent?

Yes, absolutely. The workflow uses GPT-4o-mini because it’s fast and cost-effective, but n8n supports many LLMs: Claude (Anthropic), Gemini Pro, Mistral, Llama, and others. You can swap it out by changing the language model node’s credentials and model selection. Just ensure the model supports function calling (tool use) for the agent to work properly.

How do I populate my Qdrant collection with product knowledge?

You need to create a separate n8n workflow or script that:

  1. Fetches your product data (from WooCommerce, a CSV, or a documentation site)
  2. Chunks the data into smaller pieces (e.g., 500-1000 characters per chunk)
  3. Generates embeddings using OpenAI’s embedding model
  4. Uploads the chunks and embeddings to your Qdrant collection

The n8n marketplace and documentation have templates for this. Once set up, you can keep your Qdrant collection updated with new products automatically using a scheduled workflow.

What happens if a customer doesn’t provide a valid order number or email?

The agent is instructed to ask the customer to provide the correct information. If the email doesn’t match the order, it politely refuses to share details and asks them to provide the correct email. The agent never reveals what email is associated with an order—this is a critical security feature to prevent unauthorized access.

Can I customize the voice assistant’s personality or tone?

Yes! Both in n8n and in VAPI. In the agent’s system prompt (the Post-Sales Agent node), you can adjust the tone and instructions. In VAPI, you can choose different voices and customize the opening greeting. Together, these let you create a brand-aligned assistant—friendly, professional, playful, or formal.

Will this workflow handle multiple customers calling at the same time?

Yes! Both VAPI and n8n scale horizontally. When multiple customers call, VAPI handles multiple concurrent conversations independently, and each call triggers a separate n8n workflow execution. As long as your n8n instance is configured for concurrent executions (it is by default), you can handle multiple simultaneous callers. If you reach scale limits, you can upgrade your n8n or VAPI plan.

What’s Next: Advanced Enhancements

Your voice AI assistant is now live, but you can keep improving it. Here are some ideas:

  • Sentiment Analysis: Add a sentiment analysis node after the conversation to detect if the customer is frustrated. Route frustrated customers to a human agent queue.
  • Call Recording & Transcription: Enable VAPI’s call recording and use n8n to transcribe calls and log them to a database for training or compliance.
  • CRM Integration: After each call, push the conversation summary and customer info to your CRM (HubSpot, Salesforce, Pipedrive) automatically.
  • Multi-Language Support: Use VAPI’s language detection and route to different language-specific workflows in n8n.
  • Proactive Outbound Calls: Use n8n to trigger VAPI outbound calls for shipping notifications or follow-ups when orders ship.
  • Dynamic Pricing Lookup: Extend the agent to query real-time pricing or inventory from WooCommerce before answering product questions.
  • Live Agent Handoff: Add a “transfer to human agent” tool that routes the call to your support team in a queuing system like Zendesk or Twilio Flex.

Final Thoughts

Building a voice AI customer support system once seemed like a luxury for large enterprises, but with VAPI, n8n, and modern LLMs, it’s now accessible to any online store owner. Your WooCommerce customers can now call 24/7 and get instant support—no waiting, no frustration, just answers.

The workflows you’ve built today are production-ready, but they’re also highly customizable. Adjust the system prompts, add more tools, change the models, integrate other services—n8n’s visual builder makes all of it possible without writing code.

Start small: test with a single phone number and a small set of test orders. Once you’re confident, promote it to your customers via email, your website, and social media. The result? Better customer satisfaction, reduced support costs, and a competitive edge in your market.

🚀 Ready to Deploy This Workflow?

Get the complete, production-ready n8n workflow with all nodes pre-configured, detailed documentation, and setup guides.

Download the Workflow Template •

Instant download · Works on n8n Cloud and self-hosted

voice-ai
n8n
vapi
woocommerce
customer-support
rag
vector-search
gpt-4o
gemini
twilio
automation

Shopify Ai voice store manager n8n 

Managing a Shopify store means checking the dashboard, hunting for order IDs, editing products one by one, and emailing customers manually. Every one of those tasks takes you away from actually growing the business. This n8n Shopify AI agent changes that completely. First, you send a voice note or text message on WhatsApp. Next, the AI understands your command, queries your live store, and takes action — updating orders, managing products, sending customer emails, and logging everything to Google Sheets. As a result, your entire store becomes controllable from your phone, hands-free, in English, Arabic, or French.

Prefer to skip the build? Grab the ready-made template → and be managing your Shopify store by voice in under 20 minutes.

What You’ll Build

  1. You send a WhatsApp text or voice note to your business number — “How many orders came in today?” or “Update the price of the blue hoodie to $49.”
  2. If it’s a voice note, ElevenLabs transcribes the audio to text automatically before passing it to the AI.
  3. The AI agent reads your command, calls the right Shopify tool — get orders, update a product, create a listing, delete a variant — and executes it against your live store.
  4. Order data is written to a Google Sheet for tracking, and customer emails are sent via Gmail when you ask.
  5. The AI replies back to WhatsApp: text if you typed, a voice note in the same Charlie voice if you spoke.
  6. Every conversation is remembered per WhatsApp contact, so context carries forward across messages.

How This n8n Shopify AI Agent Works — The Big Picture

The workflow has two entry paths that merge at the AI agent, and two exit paths that split again based on whether the original message was text or audio. In between, the AI has six Shopify tools it can call autonomously, plus Google Sheets and Gmail. Here is the full picture:

┌──────────────────────────────────────────────────────────────────────────────┐
│  N8N SHOPIFY AI AGENT — WHATSAPP VOICE STORE MANAGER                        │
│                                                                              │
│  [WhatsApp Trigger]                                                          │
│          │                                                                   │
│          ▼                                                                   │
│  [Switch: text or audio?]                                                    │
│     │ text                   │ audio                                         │
│     ▼                        ▼                                               │
│  (straight to          [Get Media URL]                                       │
│   AI Agent)            [Download Audio Binary]                               │
│                        [ElevenLabs: Speech-to-Text]                         │
│                              │                                               │
│                    ──────────┘                                               │
│                    ▼                                                         │
│           [AI Agent — Store Manager]                                         │
│            │  Tools available:                                               │
│            ├─ [Shopify: Get Orders]                                          │
│            ├─ [Shopify: Get Products]                                        │
│            ├─ [Shopify: Update Order]                                        │
│            ├─ [Shopify: Create Product]                                      │
│            ├─ [Shopify: Update Product]                                      │
│            ├─ [Shopify: Delete Product]                                      │
│            ├─ [Google Sheets: database (append/update)]                      │
│            └─ [Gmail: Send Email]                                            │
│            │  Memory: Simple Memory (per WhatsApp contact)                  │
│            │  Model:  OpenRouter Chat Model                                  │
│                    │                                                         │
│                    ▼                                                         │
│           [Switch1: was original text or audio?]                             │
│             │ text                    │ audio                                │
│             ▼                         ▼                                      │
│    [WhatsApp: Send text]    [ElevenLabs: Text-to-Speech]                    │
│                             [Code: Set MIME → audio/mpeg]                   │
│                             [WhatsApp: Send voice note]                     │
└──────────────────────────────────────────────────────────────────────────────┘

What You’ll Need

  • n8n — self-hosted or n8n Cloud (v1.30+). See the n8n hosting documentation for setup options.
  • WhatsApp Business API — a verified Meta business phone number with a permanent access token. See the WhatsApp Cloud API getting-started guide.
  • Shopify store — with a private app or OAuth app that has read/write access to Orders and Products.
  • ElevenLabs account — free tier works for testing; choose any voice from your library.
  • OpenRouter account — to power the AI agent; Claude, GPT-4o, or Llama 3 all work.
  • Google Sheets — one spreadsheet with an “orders” tab containing the 14-column schema shown below.
  • Gmail account — connected via OAuth2 in n8n for sending customer emails.

Estimated build time: 60–90 minutes from scratch, or under 20 minutes with the ready-made template.

Part 1 — Receiving the WhatsApp Message

1 WhatsApp Trigger

This node opens a webhook endpoint that Meta’s WhatsApp Cloud API calls every time a message arrives on your business number. It listens for the messages event type, which covers both text messages and media (audio, images, documents). Every incoming message delivers a payload with two fields the rest of the workflow relies on: messages[0].type (either text or audio) and contacts[0].wa_id (the sender’s phone number, used as the session key for memory).

// Incoming WhatsApp payload — text message example
{
  "messages": [
    {
      "type": "text",
      "text": { "body": "How many orders are pending today?" }
    }
  ],
  "contacts": [
    { "wa_id": "15551234567", "profile": { "name": "Sarah Thompson" } }
  ]
}
📌

Note: Your WhatsApp webhook must be registered in the Meta Developer Console pointing to your n8n webhook URL. The verification token is set in the WhatsApp Trigger node credentials. Make sure your n8n instance is publicly reachable — it cannot run on localhost.

2 Switch — Text or Audio?

First, the Switch node reads $json.messages[0].type. If it equals text, the message goes directly to the AI Agent. If it equals audio, the message takes a detour through three nodes to transcribe the voice note before the AI sees it. This routing is what makes the workflow truly voice-native — the AI always receives clean text, regardless of how the user communicated.

// Switch routing logic
{
  "route_text":  "messages[0].type === 'text'",
  "route_audio": "messages[0].type === 'audio'"
}

Part 2 — Transcribing Voice Messages

3 Download Media (WhatsApp)

When the message is audio, this node calls the WhatsApp media endpoint to get the audio file’s download URL. It passes $json.messages[0].audio.id — the media ID from the trigger payload — and receives back a temporary URL that expires after a few minutes.

4 Download Audio (HTTP Request)

Next, this HTTP Request node fetches the actual audio binary from the URL returned by the previous step. It uses the WhatsApp API credentials for authentication, since Meta’s media URLs require a valid access token in the request headers. The output is a binary file that ElevenLabs can process.

5 Transcribe Audio (ElevenLabs)

ElevenLabs Speech-to-Text converts the audio binary into plain text with high accuracy, including for Arabic and French — matching the multilingual capability of the AI agent. The transcribed text arrives as $json.text, which the AI Agent reads via its Audio input: {{ $json.text }} prompt field.

💡

Tip: ElevenLabs handles background noise, accents, and mixed-language voice notes well. For store managers recording quick commands while walking around a warehouse, this reliability is critical. If you want to reduce API costs, you can swap ElevenLabs for OpenAI’s Whisper node, which is cheaper for high-volume transcription.

Part 3 — The AI Store Manager Agent

6 AI Agent — Store Manager

This is the brain of the entire workflow. The AI Agent node receives either the text body or the transcribed audio, then decides which tools to call and in what order to fulfill the command. Its system prompt defines its role as a Shopify store manager, its available tools, its language capabilities, and one important rule: always call Get orders before updating an order, to retrieve the order ID first.

The agent prompt sets the behavior clearly. For example, the current system prompt instructs:

role: You are a smart AI voice Store Manager for my Shopify Store.
tasks:
- Always use 'Get orders' to get order/sales details
- Before you update orders, always get the order ID first from 'Get orders'
tools: shopify tool, Google Sheets 'database', Gmail
languages: English, Arabic (Modern Standard Arabic), French
💡

Tip: The system prompt mentions “Pet_shop” as the Gmail sender name — update this to your actual store name in both the AI Agent system prompt and the Gmail Tool node’s senderName field before going live.

7 OpenRouter Chat Model

The AI Agent is powered by OpenRouter, which gives you access to 100+ language models through a single API key. The default model is not hardcoded — you choose it in the OpenRouter Chat Model node’s dropdown. For store management commands (structured data retrieval, product updates), Claude 3.5 Sonnet or GPT-4o Mini deliver excellent results at low cost. Switch models any time without touching the rest of the workflow.

8 Simple Memory

The memory node gives the agent a 20-message conversation window, keyed to each contact’s WhatsApp phone number (wa_id). This means when a user follows up with “Actually, add a note to that order saying urgent delivery,” the agent remembers which order they were discussing without being told again. Each WhatsApp contact gets a fully isolated conversation context — 50 customers messaging simultaneously creates 50 separate memory streams.

Part 4 — Shopify Tools the Agent Can Use

The AI agent has six Shopify tools available. It calls them autonomously — you never have to specify which tool to use in your WhatsApp message. Just describe what you want in plain language, and the agent decides.

ToolWhat it doesExample command that triggers it
Get Orders Fetches all orders from Shopify. The agent controls returnAll and limit via $fromAI() based on your request. “Show me today’s orders” / “How many pending orders do we have?”
Get Products Fetches all products from the catalog. Returns titles, prices, variants, and inventory levels. “List all products under $30” / “Do we still have the red sneakers in stock?”
Update an Order Updates an order by ID. First calls Get Orders to find the correct ID, then applies changes like notes or tags. “Add a note to order #1023 saying the customer requested gift wrapping.”
Create a Product Creates a new product with a title and optional additional fields (description, price, images). “Create a new product called Summer Linen Tote Bag at $24.99.”
Update a Product Updates a product’s title and HTML body description by product ID. First calls Get Products to find the ID. “Update the Blue Hoodie description to add washing instructions.”
Delete a Product Permanently deletes a product from Shopify by product ID. “Remove the discontinued Winter Scarf from the catalog.”
📌

Important: The Delete a product tool is permanent. There is no confirmation step — if the AI identifies the product and you asked it to delete, it will. Add a safety confirmation step (an IF node or a WhatsApp confirmation reply) if you want to prevent accidental deletions in production.

Part 5 — Database and Email Tools

9 Google Sheets — Database Tool

Every time the agent retrieves or acts on an order, it can write the data to your Google Sheet using the appendOrUpdate operation. The Order ID column is the matching key — so re-running a command on the same order updates the existing row rather than duplicating it. All 14 fields are populated via $fromAI() expressions, meaning the agent extracts each value from the Shopify response and maps it automatically.

10 Gmail — Send Email Tool

When you ask the agent to email a customer, it calls this tool, filling the To, Subject, and Message fields via $fromAI(). The sender name is set to your store name. For example, you can say: “Email james.carter@gmail.com and tell him his order shipped today” — and the agent writes and sends the email entirely on its own.

Part 6 — Sending the Reply

11 Switch1 — Reply in Text or Voice?

After the AI agent finishes, a second Switch node checks the original message type again. If you sent text, you get a text reply. If you sent a voice note, the agent converts its response to speech and sends a voice note back. The reply always matches the input format — a voice conversation stays a voice conversation.

12 Convert Text to Speech (ElevenLabs)

For audio replies, this node sends the AI agent’s text output to ElevenLabs using the “Charlie — Deep, Confident, Energetic” voice. The settings are configured for natural, professional delivery: stability at 1.0, similarity boost at 1.0, and speed at 0.82 (slightly slower than default, which works better for information-dense store management replies). The output format is MP3 at 22050 Hz.

13 Convert to MPEG (Code Node)

WhatsApp’s API is strict about audio MIME types. This Code node sets mimeType to audio/mpeg and renames the file to voice.mp3 — without this step, WhatsApp rejects the audio upload and the voice reply fails silently.

for (const item of $input.all()) {
  if (item.binary && item.binary.data) {
    item.binary.data.mimeType = 'audio/mpeg'
    item.binary.data.fileName = 'voice.mp3'
  }
}
return $input.all();

14 Send Message / Send Message1 (WhatsApp)

Two WhatsApp send nodes handle the two reply paths. Send message1 (text path) sends the AI output as a plain text body. Send message (audio path) sends the MPEG binary as an audio message. Both always reply to the original sender using $('WhatsApp Trigger').item.json.contacts[0].wa_id.

The Data Structure — Google Sheets Order Database

Create a Google Sheet with one tab named orders. The column names below are case-sensitive — the agent uses them as keys when writing rows via $fromAI().

Column NameTypeExample ValueDescription
Order IDText5678901234Shopify order ID — used as the matching key to prevent duplicate rows
Order NameText#1023Human-readable order name shown in the Shopify dashboard
Order DateTextMarch 18, 2026Date the order was placed
Customer NameTextJames CarterFull name from the Shopify order
Customer EmailTextjames.carter@gmail.comUsed when sending confirmation emails via Gmail
Customer PhoneText(555) 867-5309Contact number from the order
Product TitleTextBlue Hoodie — Size MProduct name and variant from the order line item
QuantityText2Number of units ordered
Product PriceText$49.00Unit price at time of order
Total Order AmountText$98.00Full order total including all line items
CurrencyTextUSDCurrency code from the Shopify order
Payment StatusTextpaidShopify financial status: paid, pending, refunded
SourceTextonline_storeOrder source channel from Shopify
Agent NoteTextCustomer requested express shippingAI-generated note about the order based on conversation context
📌

Setup step: Create the sheet with these exact headers before activating the workflow. The Order ID column is the matching key — a second write with the same ID updates the existing row instead of creating a duplicate. Name the tab exactly orders (lowercase) to match the workflow configuration.

Full System Flow — n8n Shopify AI Agent End to End

You send a WhatsApp message: "Update the Blue Hoodie price to $44"
          │
          ▼
[WhatsApp Trigger] → { messages[0].type: "text", text.body: "Update the Blue Hoodie price to $44" }
          │
          ▼
[Switch: type = "text"] → routes to AI Agent directly
          │
          ▼
[AI Agent — Store Manager]
  → calls [Get Products] → finds Blue Hoodie, product_id: 7890123456
  → calls [Update a Product] → sets title + new price on Shopify
  → calls [Google Sheets database] → logs order/product change
  → generates reply: "Done! Blue Hoodie updated to $44.00 in your store."
          │
          ▼
[Switch1: original type = "text"]
          │
          ▼
[WhatsApp: Send text reply] → "Done! Blue Hoodie updated to $44.00 in your store."

────────────────────────────────────────────────────────────

You send a WhatsApp voice note: "Send an email to James about his order"
          │
          ▼
[WhatsApp Trigger] → { messages[0].type: "audio", audio.id: "media_id_xyz" }
          │
          ▼
[Switch: type = "audio"] → routes to audio transcription path
          │
[Download Media URL] → { url: "https://lookaside.fbsbx.com/..." }
[Download Audio Binary] → binary MP3 file
[ElevenLabs: Speech-to-Text] → { text: "Send an email to James about his order" }
          │
          ▼
[AI Agent — Store Manager]
  → calls [Get Orders] → finds James Carter, order #1023, james.carter@gmail.com
  → calls [Gmail: Send Email] → sends order update email to james.carter@gmail.com
  → generates reply: "Email sent to James Carter at james.carter@gmail.com for order #1023."
          │
          ▼
[Switch1: original type = "audio"]
          │
[ElevenLabs: Text-to-Speech] → MP3 audio of reply in Charlie voice
[Code: Set mimeType = audio/mpeg]
[WhatsApp: Send voice note] → 🔊 Voice reply delivered to sender

Testing Your n8n Shopify AI Agent

  1. In n8n, activate the workflow and copy the WhatsApp webhook URL. Register it in the Meta Developer Console under your app’s webhook settings.
  2. Send a text message to your WhatsApp business number: “List all products.” Confirm the AI responds with your actual Shopify catalog.
  3. Send a voice note saying: “How many orders do we have this week?” Confirm the audio is transcribed, the AI calls Get Orders, and you receive a voice reply with the count.
  4. Send: “Create a test product called Test Widget at $9.99.” Check your Shopify Products dashboard to confirm it appeared.
  5. Send: “Delete the Test Widget product.” Confirm it’s removed from Shopify. Then send the same command again — the AI should respond that the product no longer exists, demonstrating it uses Get Products before acting.
  6. Send: “Email emily.rodriguez@outlook.com and tell her order #1001 has shipped.” Check your Gmail Sent folder to confirm the email was sent with the correct content.
  7. Open your Google Sheet and confirm order rows are being written or updated correctly.
ProblemLikely CauseFix
Webhook not receiving messages n8n URL not registered in Meta Developer Console, or instance not publicly accessible Verify the webhook URL and token in Meta Developer Console → WhatsApp → Configuration. Use ngrok for local testing.
Voice reply fails — audio not delivered Missing MIME type fix or wrong phone number ID Confirm the “Convert to mpeg” Code node runs before the send node. Replace YOUR_WHATSAPP_PHONE_NUMBER_ID with your actual Phone Number ID from the Meta console.
AI says “I can’t find that product” but it exists Agent is not calling Get Products before Update Product Add an explicit instruction to the system prompt: “Always call Get Products before updating or deleting any product.”
Google Sheet not updating Column names don’t match exactly (case-sensitive) Compare sheet headers character-by-character against the schema table above. Make sure the tab is named orders.
Gmail not sending OAuth2 token expired or incorrect sender name Reconnect the Gmail OAuth2 credential in n8n. Update senderName in the Gmail Tool node from “Pet_shop” to your store name.
AI responds in the wrong language Language detection relies on user input — mixed messages can confuse it Update the system prompt to specify a default language: “If the language is unclear, respond in English.”

Frequently Asked Questions

Does this n8n Shopify AI agent work with Shopify Basic, Grow, or Advanced plans?

Yes. The workflow uses the Shopify REST API via n8n’s native Shopify nodes, which are available on all paid Shopify plans. You need to create a custom app in your Shopify admin under Settings → Apps → Develop apps and grant it read/write access to Orders and Products. The API credentials generated there connect directly to the Shopify nodes in the workflow.

Can multiple team members use the same WhatsApp number to control the store?

Yes. The Simple Memory node isolates each conversation by WhatsApp phone number, so two managers messaging the same business number get completely separate conversation contexts. There is no cross-contamination — one manager asking about orders does not affect the other’s session. For team use, consider adding an authorization check at the start of the workflow to restrict commands to known wa_id numbers.

Which AI model should I use with OpenRouter for best results?

For store management tasks — structured queries, product lookups, order updates — Claude 3.5 Sonnet or GPT-4o Mini both perform excellently. Claude handles Arabic and French more naturally, making it the better choice if your team works in multiple languages. For pure speed and lowest cost, GPT-4o Mini is the most efficient. Avoid smaller models (7B parameters or less) as they tend to mis-call tools on complex multi-step commands.

Can I add more Shopify actions beyond what’s included?

Absolutely. n8n’s Shopify Tool node supports many additional operations: creating customers, managing fulfillments, updating inventory levels, and more. To add a new capability, duplicate one of the existing Shopify Tool nodes, change the operation, connect it to the AI Agent’s tools input, and add a brief description of what the tool does in the node’s description field — the AI will use it automatically when appropriate.

What happens if the AI tries to delete the wrong product?

By design, the agent calls Get Products first to look up the product ID before deleting. However, there is no confirmation step in the base workflow. For production use, it is strongly recommended to add a safety layer: before the Delete node fires, send a WhatsApp message asking “Are you sure you want to delete [product name]? Reply YES to confirm.” Then use a Wait node and a conditional check on the reply before proceeding.

Can I connect this to a customer-facing WhatsApp number instead of an internal one?

The workflow as built is designed for internal store manager use. Connecting it to a customer-facing number would require a completely different system prompt and much stricter guardrails — the current prompt gives full write access to products and orders, which customers must never have. For a customer-facing chatbot, see our separate AI WooCommerce Chatbot guide which is designed specifically for that use case.

🚀 Get the n8n Shopify AI Agent Template

Download the ready-to-import workflow JSON, the Google Sheets order database template with all 14 columns pre-configured, and a step-by-step credential setup guide — so you can manage your Shopify store by WhatsApp voice in under 20 minutes.

Get the Template →

Instant download · Works on n8n Cloud and self-hosted

What’s Next?

  • Add a daily sales report — wire a Schedule Trigger that fires every morning and sends you a voice note summarizing the previous day’s orders, revenue, and top-selling products.
  • Add inventory alerts — extend the Get Products tool call to check stock levels and automatically send a WhatsApp alert when any product drops below a minimum quantity you define.
  • Connect Telegram as a second channel — duplicate the WhatsApp input/output nodes and replace them with Telegram nodes so the same AI agent is accessible from both apps with shared memory.
  • Add a safety confirmation step — before any destructive action (delete product, cancel order), add a WhatsApp reply asking for confirmation, then a Wait node and an IF check on the response.
  • Browse all our automation guides on the EasyWorkflows n8n blog →

How to Build an AI Customer Service Chatbot for Your WooCommerce Store with n8n

How to Build an AI Customer Service Chatbot for Your WooCommerce Store with n8n

A multilingual AI agent that answers product questions, collects orders conversationally, and logs every buyer to Google Sheets — fully automated, zero code.

Running an online store means fielding the same questions at all hours — “Do you have this in my size?”, “How much does shipping cost?”, “Can I order online?” Every answer is manual, every missed message is a lost sale. This n8n workflow replaces that cycle with a multilingual AI agent that knows your entire WooCommerce product catalog in real time, handles customer conversations in Arabic, English, or French, collects order details when a buyer is ready, and writes everything to a Google Sheet for your fulfillment team — without you lifting a finger.

Prefer to skip the setup? Grab the ready-made template → and be up and running in under 10 minutes.

What You’ll Build

  1. A customer opens your store’s chat widget and sends a message — the agent immediately asks which language they prefer (Arabic, English, or French).
  2. The AI queries your live WooCommerce product catalog in real time before answering any product question — it never guesses or invents details.
  3. If a product isn’t in stock, the agent politely asks whether the customer would like you to source it, then waits for a response.
  4. When the customer is ready to order, the agent collects their name, email, phone, address, country, and item through natural conversation — no form required.
  5. The order details are automatically appended to a Google Sheet row, ready for your fulfillment team to action.

How It Works — The Big Picture

The workflow has a single entry point — the n8n Chat Trigger — and routes every incoming message through an input guard before passing it to the AI agent. The agent has four tools it can call autonomously: a live product lookup, a Google Sheets writer, a calculator, and a “Think” reasoning step.

┌──────────────────────────────────────────────────────────────────────┐
│  AI ECOMMERCE CHATBOT (n8n)                                          │
│                                                                      │
│  [Chat Trigger] ──► [If: chatInput exists?]                         │
│                              │                                       │
│               ┌──────────────┴──────────────┐                       │
│            true (has input)             false (empty)               │
│               │                              │                       │
│               ▼                              ▼                       │
│      [Store Manager AI Agent]     [Respond to Webhook]              │
│       ┌───────┴────────┐          "How can I assist you?"           │
│       │   AI Tools:    │                                             │
│       │ • Get Products │ ◄── Live WooCommerce product data          │
│       │ • Customer DB  │ ──► Append row to Google Sheets            │
│       │ • Calculator   │ ◄── Price / quantity math                  │
│       │ • Think        │ ◄── Internal reasoning step                │
│       └───────┬────────┘                                             │
│               ▼                                                      │
│      [Respond to Webhook 1] ──► Customer sees AI reply in chat      │
└──────────────────────────────────────────────────────────────────────┘

What You’ll Need

  • n8n — self-hosted or n8n Cloud (any recent version)
  • WooCommerce store with REST API enabled and API keys generated
  • OpenRouter account — free tier available; choose your LLM (GPT-4o, Claude, Llama, etc.)
  • Google account with a Sheets spreadsheet set up as the customer database
  • A front-end chat widget that POSTs to an n8n webhook (the built-in n8n chat UI works out of the box)

Estimated build time: 45–60 minutes from scratch, or under 10 minutes with the ready-made template.

Part 1 — Receiving and Validating the Message

1 When Chat Message Received (Chat Trigger)

This is the entry point of the entire workflow. n8n’s built-in Chat Trigger node opens a publicly accessible webhook endpoint and provides a ready-made chat UI you can embed anywhere. Every customer message fires this node and passes two fields downstream: chatInput (the message text) and sessionId (a unique ID tying all messages in one conversation together).

Set Public to true so the chat interface is accessible without authentication. Leave Initial Messages blank — the AI will send the first language-selection greeting itself.

// Data shape from the Chat Trigger
{
  "chatInput": "Do you carry trail running shoes?",
  "sessionId": "user_a8f3k2"
}
💡

Tip: Embed the widget on your store by copying the script URL from the Chat Trigger node and adding it to your theme’s footer. No plugin required.

2 If — Guard Against Empty Input

Browser pre-flight requests and widget load events can hit your webhook with an empty body. This If node checks whether $json.chatInput exists. If it does, the message goes to the AI agent. If not, a friendly default response fires immediately — no wasted tokens, no errors.

📌

Note: The condition uses strict type validation and checks for exists, correctly handling null, undefined, or a missing key — all of which would otherwise crash the agent.

Part 2 — The Store Manager AI Agent

3 Store Manager (AI Agent)

The Store Manager is the brain of the workflow — an n8n AI Agent node that reads the customer’s message, decides which tools to call, executes them, and formulates a natural-language response. Its entire behavior is controlled by the system prompt, which you can customize directly in the node settings.

The system prompt instructs the agent to:

  • Always open by asking for the customer’s preferred language (Arabic, English, or French)
  • Respond only in the chosen language for the rest of the conversation
  • Never invent product details — always call Get Products first
  • Collect order information conversationally only after the customer expresses intent to buy
  • Keep responses short and human — no JSON, no bullet lists unless asked
💡

Tip: The system prompt references the store name “MoroccoVibe”. Replace it with your own store name so the agent introduces itself correctly on the very first message.

4 OpenRouter (Language Model)

OpenRouter routes the agent to 100+ LLM providers. Switch between GPT-4o, Claude Sonnet, Mistral, Llama 3, and more by changing a single dropdown — no other configuration needed. Add your OpenRouter API key in the credentials panel.

💡

Tip: For customer service, Claude 3 Haiku or GPT-4o Mini offer excellent quality at very low cost — typically under $0.01 per full conversation.

5 Simple Memory (Session Buffer)

The Simple Memory node gives the agent a 20-message conversation window keyed to each sessionId, so every customer’s chat is isolated and contextual. When a customer says “the second one you mentioned” four messages later, the agent knows exactly what they mean.

{
  "sessionKey": "{{ $json.sessionId }}",
  "contextWindowLength": 20
}

6 Get Products (WooCommerce Tool)

This tool gives the agent live, read-only access to your WooCommerce catalog. Whenever a customer asks about a product, the agent calls this tool automatically before answering — no hardcoded product lists, always fresh data. Connect your WooCommerce API credentials (Consumer Key + Consumer Secret) found under WooCommerce → Settings → Advanced → REST API.

📌

Note: If your store has more than 100 products, filter by search term rather than returning everything — fetching the full catalog on every message adds latency and increases token cost.

7 Customer Database (Google Sheets Tool)

Once the agent has collected all six required fields, it calls this tool to append a new row to your Google Sheet. Column values are written using $fromAI() expressions — the agent extracts each field from the conversation context and maps it directly, no manual field setup needed beyond the initial schema.

8 Think & Calculator (Reasoning Tools)

Think lets the agent reason internally before complex answers — useful for matching vague product descriptions or deciding whether to ask a clarifying question. Calculator handles all arithmetic (totals, discounts, unit quantities) to guarantee exact results and avoid LLM number drift.

The Data Structure

Create a Google Sheet with these exact column names before activating the workflow. The names are case-sensitive — the agent uses them as keys when writing rows.

Column NameTypeExample ValueDescription
Items NameTextTrail Running Shoe — Size 10Product(s) the customer wants to order
Full NameTextJames CarterCustomer’s full name as provided in chat
Home addressText742 Evergreen Terrace, Springfield, IL 62704Full delivery address
Email AdresseTextjames.carter@gmail.comMatching key — prevents duplicate rows
Phone NumberText(555) 867-5309Contact number for delivery follow-up
CountryTextUnited StatesDestination country for shipping
NoteTextPrefers express shippingExtra notes from conversation (note the leading space in the column name)
📌

Important: Email Adresse is the matching key — a second submission with the same email updates the existing row instead of creating a duplicate. The Note column has a leading space; keep this exactly as shown.

Full System Flow

Customer types in chat widget
          │
          ▼
[Chat Trigger] → { chatInput: "Do you carry trail running shoes?", sessionId: "user_a8f3k2" }
          │
          ▼
[If: chatInput exists?]
    │ true                            │ false
    ▼                                 ▼
[Store Manager Agent]       [Respond to Webhook] → "How can I assist you today?"
    │
    ├──► [Think] ← reasons about customer intent
    ├──► [Get Products] ← live WooCommerce catalog query
    │      └─ returns: [{ name: "Trail Runner Pro", price: "$89.00", stock: "In stock" }]
    ├──► (customer wants to order)
    │      [Customer Database] ← appends Google Sheet row:
    │        James Carter | james.carter@gmail.com | (555) 867-5309 | Springfield, IL | Trail Runner Pro
    └──► [Calculator] ← exact price/quantity arithmetic
          │
          ▼
[Respond to Webhook 1] → AI reply delivered to customer chat

Testing Your Workflow

  1. Click Test workflow in n8n, then open the Chat Trigger node and click Open Chat to launch the built-in test interface.
  2. Send “Hello” — verify the agent responds asking for language preference.
  3. Reply “English”, then ask about a real product in your WooCommerce store. Confirm the agent returns accurate, live data.
  4. Say “I’d like to buy it” and walk through the information collection. Verify all six fields are captured correctly.
  5. Open your Google Sheet and confirm a new row was appended with the correct data.
  6. Send an empty message to confirm the fallback route fires the default greeting.
ProblemLikely CauseFix
Agent says “I don’t have that information” WooCommerce API key has insufficient scope Ensure the key has Read access to products under WooCommerce → Settings → REST API
Google Sheet row not created Column names don’t match schema exactly Compare headers character-by-character, including the leading space in Note
Agent forgets earlier messages Session ID not passing through correctly Confirm the Chat Trigger is set to Public and sessionId is present in the payload
Agent responds in the wrong language Language wasn’t chosen on the first message Clear session memory and start a fresh conversation — language selection must happen on message #1
No response in the chat widget Webhook response format mismatch Check that Respond to Webhook 1 is set to allIncomingItems

Frequently Asked Questions

Can I use a different AI model instead of OpenRouter?

Yes. The OpenRouter node is interchangeable with any n8n-supported language model — OpenAI, Anthropic, Google Gemini, Mistral, and others all work as drop-in replacements. Just swap the model node on the agent’s Chat Model input and reconnect the credential. Nothing else changes.

What languages does the chatbot support?

Out of the box: Arabic, English, and French. Add or remove languages by editing the list in the Store Manager system prompt — the AI handles the rest as long as your chosen LLM supports those languages, which most modern models do.

Will the agent handle multiple customers simultaneously?

Yes. Each conversation is isolated by its sessionId. The Simple Memory node stores history per session key, so 50 simultaneous customers each get their own private conversation context with no cross-contamination.

What happens if a customer submits their info twice?

Since Email Adresse is the matching key, a second submission with the same email updates the existing row rather than creating a duplicate — keeping your sheet clean even if a customer changes their order details mid-conversation.

Does this work with WooCommerce variable products (sizes, colors)?

The Get Products node fetches product data including variations when available via the WooCommerce API. For more complex variant selection, consider adding a second WooCommerce node that fetches variations by product ID once the customer has chosen a base product.

Is the chat widget included in the template?

The n8n Chat Trigger provides a built-in widget accessible via a unique URL — embed it in your WooCommerce theme as an iframe or script. Any front-end chat library that POSTs JSON to a webhook URL also works: Tidio, Crisp, or a fully custom implementation.

🚀 Get the AI Ecommerce Chatbot Template

Download the ready-to-import workflow JSON, the Google Sheets setup template, and a step-by-step credential guide — everything you need to go live in under 10 minutes.

Get the Template →

Instant download · Works on n8n Cloud and self-hosted · 14-day refund guarantee

What’s Next?

  • Order confirmation emails — add a Gmail node after the Sheets tool to send an automated confirmation to the customer’s email the moment their details are saved.
  • Slack fulfillment alerts — ping your team channel with the customer name and item every time a new order row is created.
  • Inventory warnings — extend the WooCommerce tool call to check stock levels and proactively warn customers when an item is running low.
  • Multi-store support — duplicate the workflow and swap credentials to run the same agent for multiple storefronts, each with its own brand persona in the system prompt.
n8n WooCommerce AI Agent Google Sheets OpenRouter Customer Service Ecommerce Automation Multilingual Chatbot No Code