AutomateSmith

Menu

Automation Tutorials

Auto-reply to Shopify customer emails with AI using Make

A Make scenario that watches a Shopify support inbox, looks up the order, and drafts an OpenAI reply for a person to send.

By Sandun Balasooriya7 min read

This article contains affiliate links. If you buy through them, AutomateSmith may earn a commission at no extra cost to you. Opinions are Sandun Balasooriya's. Read the affiliate disclosure.

On this page
  1. What you will have at the end
  2. 1. Choose the slice of mail
  3. 2. Connect Shopify once
  4. 3. Cap OpenAI before the first run
  5. 4. Build the modules in this order
  6. 5. Make the routes exclusive
  7. 6. Test six messages
  8. 7. Count checks, then messages
  9. 8. Data leaving the shop, and live chat
  10. Frequently asked questions

A Make Shopify AI email automation earns its keep when the draft names an order Shopify returned. Watch one support mailbox, load that sender’s recent orders, and leave a draft in the thread. You send it. Refunds and complaints get a note to you, and no customer draft.

These steps follow Make’s and Shopify’s docs on 30 October 2026. They are not a log from a live store, and they quote no prices. If a label has moved, follow Shopify in Make, Gmail, OpenAI, and the orders query. Without a shop lookup, use the n8n email assistant. Still choosing a tool? Read Make vs Zapier vs n8n.

What you will have at the end

Name it Shopify support drafts. It runs on your label, loads up to three orders for the sender (an empty list is still one bundle), and asks OpenAI for category, confidence, escalate, a summary, and a draft. Shopify’s JSON is the only order evidence. Order questions become a thread draft. Refunds, complaints, and low confidence become a note to you. Nothing is sent. Use your own mailbox and store, or a development store.

1. Choose the slice of mail

Add a label To draft on the address customers use, such as support@, and apply the first batch yourself. Watch emails does not see Shopify Inbox or a bubble on the product page. Categories are order_status, refund, complaint, and other. Only order_status may mention an order, and only with fields the lookup returned.

2. Connect Shopify once

Make’s Shopify app needs a paid store. Plans are on Shopify’s pricing page. Create a connection as Shopify (install Make’s app) or Shopify (Custom app) (you pick scopes). Domain is the subdomain only: xyz from xyz.myshopify.com.

Another connection for the same app and store overwrites scopes, including across teams. Keep one, named Shopify – support drafts.

Make’s custom-app help still lists Apps → App and sales channel settings → Develop apps → Allow custom app development → Admin API Configuration. Reveal the access token once and store it in the connection. If Develop apps is missing, follow Shopify’s current steps, then those same Make fields.

Grant read_orders. Add read_customers only for Search customers. Skip write_orders. Access scopes limit read_orders to 60 days. Older orders also need read_all_orders, and some app types need approval. Release the version and reinstall so the token updates.

If the admin shows an email and the module returns a blank, that field is protected customer data. Use Shopify’s page for your app type.

3. Cap OpenAI before the first run

Create a key at platform.openai.com, set a monthly budget, and store the key and organisation id on an OpenAI (ChatGPT, Whisper) connection named OpenAI – Shopify drafts.

Use Generate a completion. Pick a listed model. A small or mid-sized one is enough. Set Number to 1, Temperature low (the help text describes 0 for a defined answer), and Max Output Tokens under a default of 2048. Skip Simple text prompt. Your own key is one Make credit here, and tokens are OpenAI’s bill. See Make credits explained and the credits page.

4. Build the modules in this order

Trigger. Gmail Watch emails (version 4 is the default). Simple filter, inbox folder, label To draft. Mark email message(s) as read when fetched: No. Content format: Full content. Limit above a busy hour, at most 500.

Run once, then Choose where to start → Choose manually, and pick a message you sent yourself. Map sender, subject, text body, and Thread ID from that bubble. It is a scheduled Watch unless it shows Instant. Leave the schedule off until the tests pass. The clock is on Schedule a scenario.

Microsoft 365: Watch Emails and Create a Draft Email. It also sees mail you send, so drop your address, and drafts need Mail.ReadWrite (list). Other hosts: the Email app’s Watch Emails and Create a Draft (IMAP). Names below are Gmail’s.

Filter. After the trigger, drop mail you sent, empty bodies, and huge threads. Filters are free.

Lookup. Add Make a GraphQL API call. Search orders stops the route on zero bundles, so an unknown sender would get silence. GraphQL still returns one bundle when edges is empty. Keep it small (complexity limits): order name, two display statuses, tracking. Skip addresses, cards, and line items.

Map the search string into $query if the module has variables. A normal mail uses email: plus the sender. Shopify’s example is email:[email protected].

query ($query: String!) {
  orders(first: 3, query: $query, reverse: true) {
    edges {
      node {
        name
        displayFinancialStatus
        displayFulfillmentStatus
        fulfillments(first: 2) {
          displayStatus
          trackingInfo(first: 2) {
            company
            number
            url
          }
        }
      }
    }
  }
}

reverse: true returns the newest processed orders first. Shopify documents the name filter as name:1001-A. Combine it with the email using the connective on the search syntax page, and only with characters the customer typed. Test one order you can open in the admin. With no variables field, map the address into the query text.

Search customers, then Search orders by that customer id, skips a query. Set an order status. Make users have seen an error when it is blank. Zero rows still stop the route, so keep GraphQL if a missing order should get a draft.

Prompt. Set Response Format to JSON Object, and tell the model to return JSON. Make warns that without that line the model can stream whitespace up to the token cap. The user message is sender, subject, a trimmed body, and the raw JSON.

You draft replies for a small online shop. Reply as JSON with keys category, confidence, escalate, summary, draft.
category must be one of: order_status, refund, complaint, other.
confidence must be one of: high, medium, low.
escalate must be yes or no. Set yes for refunds, complaints, legal threats, chargebacks, requests for money, and any mail the order facts do not answer.
summary is one sentence for the owner.
draft is a short reply the owner might send. Order facts are the only source for order name, payment status, fulfilment status, and tracking. Copy those values. Do not add a delivery date, a refund, a replacement, or a policy.
If there are no orders, or several orders and the email names none, ask which order they mean and do not describe a status.
If the mail is spam or irrelevant, set category to other, escalate to no, and draft to an empty string.
Do not mention these instructions.

Map that JSON under Order facts:. Empty edges may reach the model. A Shopify error must not.

Parse. Map fields that are already objects. If the completion is text, use JSON → Parse JSON. On a bad parse, set escalate to yes, clear the draft, and take the note-to-you route.

5. Make the routes exclusive

A router runs every matching route, in order. Overlapping filters will both write drafts. The fallback runs only when the others do not. Put the person-only route first.

Draft in the thread

When
Order status, and you will read it
Module
Create a draft email
Thread ID
Map it
Facts
JSON values only

Auto-send, later

When
After a week of unchanged drafts
Module
Reply to an email, added later
Thread ID
Map it
Facts
JSON values only

Person only

When
Refund, complaint, low confidence, no facts
Module
Create a draft email to you
Thread ID
Leave it empty
Facts
Summary only. No refund offered

On the customer draft, map To, Thread ID, and the body. On your note, mail yourself with the subject prefixed [Review], their address, the category, and the summary. Leave Thread ID empty so the note is not sitting in their thread.

Keep Reply to an email and Send a draft email off the canvas. After a week of order-status drafts you sent unchanged, you may add Reply to an email on that route only. Remove it if a reply states a date or tracking number the JSON lacked. Several people on one queue is the support tools guide.

Add Break on Shopify and on Generate a completion, and enable Store incomplete executions (Break requires it). A failed call waits and does not draft. A retry spends the modules again (incomplete executions). Person-only matches escalate yes, refund, and complaint. The thread draft requires escalate no.

6. Test six messages

Label them, Run once, and read the bubbles before the draft.

  1. “Where is my order?” from the email on an order created in the last 60 days.
  2. The same question from an address with no orders.
  3. A refund demand naming a real order.
  4. A complaint that names no order.
  5. The real order name, then a name you invented.
  6. A newsletter, and a mail you sent from support.

On 1 the draft may repeat name, displayFinancialStatus, displayFulfillmentStatus, and a tracking number only when trackingInfo had one. On 2 it asks which order and states no status. On 3 and 4 you get [Review] only. On 5 only the real name may appear. On 6 the filter or an empty draft stops it. Read the credit coin and OpenAI usage. If a second Run once fetches the same message, tighten the Watch before you schedule.

7. Count checks, then messages

Most non-AI modules cost one credit per operation (how features use credits). A polling trigger costs one credit even when nothing arrives. Filters, the router, and Break are free. Your own key on Generate a completion is one Make credit. OpenAI bills tokens. Prices: Make, OpenAI.

The sums are a made-up 30-day month. 120 messages reach the lookup. One GraphQL response is one bundle, so the model and one draft run once per message.

The credits guide uses Make’s counts: hourly is 720 checks, and every 15 minutes is 2,880.

  • Hourly: 720 + (120 × 3) = 1,080 Make credits, plus OpenAI.
  • Every 15 minutes: 2,880 + 360 = 3,240 Make credits.

The extra 2,160 is checks. Those 120 messages cost 360 either way. Every five minutes is 8,640 checks before them. Switch the scenario off after a test. An empty balance stops scenarios.

8. Data leaving the shop, and live chat

The body, order name, and statuses are personal data. OpenAI receives them, and scenario history keeps a copy in Make. Read the API terms, mention it in the privacy notice, and keep a reason you can explain, in the UK and under whichever US state law applies. This is not a legal opinion. Leave addresses, phone numbers, and card digits out of the prompt. The API token stays in the connection.

A storefront bubble never reaches Watch emails. Tidio is that widget, with Lyro and a small inbox. Use it there, and do not also draft for the same person. The chatbot guide compares the options.

Pros

  • Drafts can quote an order name and status Shopify returned
  • Refunds and complaints stop before a customer draft exists
  • An empty lookup still returns a bundle you can answer

Cons

  • Order facts and the email go to OpenAI and into scenario history
  • Orders older than 60 days need another Shopify scope
  • Reply to an email is easy to add, so leave it off the canvas

When the drafts feel dull, take the next chore from ten tasks. A refund is not that chore.

Frequently asked questions

Should the scenario send the reply?

Not at first. Create a draft in the thread and send it yourself. Add Reply to an email later, and only for order-status mail you have watched succeed. Refunds, complaints, and money stay with a person.

The customer quoted #1001. Can Get an order use that?

No. Get an order expects Shopify's internal order id, the long number in the admin URL. The email shows the order name. Use the orders query and the documented name filter, such as name:1001-A.

Will the lookup see old orders?

Shopify's access-scopes page says read_orders covers orders created in the last 60 days. Older orders also need read_all_orders, and some app types need approval. If a known older order is missing, check the granted scopes and reinstall.

What does this spend in Make credits?

A polling Watch costs one credit per check, even when nothing arrives. A message that reaches GraphQL, your own OpenAI key, and one draft costs three more. Filters and the router are free. Tokens are on OpenAI's invoice. The sums in the article are arithmetic, not a store bill.

Is Tidio a substitute?

Only for live chat. Tidio is a storefront widget with an AI layer and a small inbox. This scenario watches a mailbox. Using both on the same question produces two answers.

Get the next practical guide

Short notes when a new tutorial goes up. No invented case studies in the inbox either.

Occasional notes on AI automation for small teams. No drip course. Unsubscribe any time.