Open your Shopify orders page after a busy week and it is a wall of identical-looking rows. Which ones came from repeat buyers? Which crossed the threshold where you want to send a thank-you gift? Which shipped overseas and need a customs note? Without tags you are scrolling and guessing, and your apps and email flows have nothing to segment on.
A Shopify order tagging automation in n8n fixes that at the source. The moment an order is created, it gets sorted and labeled by your own rules, so every order that lands in your admin is already filterable. This guide walks through the full build, node by node, with the exact configuration for each step. It is part of our wider n8n Shopify automation library.
Prefer to skip the setup? Grab the ready-made template below and have it tagging orders in under 10 minutes.
TL;DR
This Shopify order tagging automation n8n build watches for every new order, runs it through a set of rules, and writes tags like VIP, First-time, Repeat, and International straight back onto the order in Shopify. No paid app and no manual sorting. You get clean, filterable orders the second they come in, plus a Slack message so your team sees exactly how each order was classified and why.
What it does
The workflow has one job: classify orders automatically. Here is the flow from a buyer hitting checkout to a labeled order in your admin.
- A customer places an order on your Shopify store.
- n8n receives the order data instantly through the Shopify Trigger.
- A Code node checks the order against your rules (value, customer history, country, discount use).
- Matching tags are merged with any existing tags and written back to the order through the Shopify Admin API.
- A short Slack message confirms the order number and the tags that were applied.
The result: an order from a returning customer in Austin who spent 240 dollars shows up tagged VIP, Repeat before you even open the order. An app like Klaviyo, a discount automation, or a simple admin filter can act on those tags right away.
Why it beats the default
Shopify gives you two native options, and both have a real cost.
The first is tagging by hand. It works for ten orders a day and falls apart at fifty. People forget, apply tags inconsistently, and the data you wanted to segment on becomes unreliable.
The second is Shopify Flow. It can tag orders, but it is locked to Shopify Plus, which starts at over 2,000 dollars a month. If you are on Basic, Shopify, or Advanced, Flow is simply not available to you.
The n8n build talks to the standard Admin API that every paid Shopify plan already includes. You write the rules once in plain JavaScript, you own them, and you can branch on any field Shopify returns rather than the limited set Flow exposes. Below is how the pieces fit together.
┌──────────────────────────────────────────────────────────────┐ │ SHOPIFY ORDER TAGGING AUTOMATION │ │ │ │ [Shopify Trigger] → [Code: rules] → [HTTP Request] → [Slack]│ │ orders/create build tags PUT tags notify │ │ │ └──────────────────────────────────────────────────────────────┘
What you need
- An n8n instance, either n8n Cloud or a self-hosted setup.
- A Shopify store on any paid plan with an Admin API access token (created from a custom app).
- A Slack workspace if you want the team notification. This step is optional and can be removed.
- About 40 minutes to build from scratch, or 10 minutes with the template.
For background on getting n8n running, see our n8n Shopify automation guide.
Node-by-node list
The whole automation is four nodes. Here is what each one is and the version to use.
| Node | Type | Version | Role |
|---|---|---|---|
| Shopify Trigger | shopifyTrigger |
1 | Fires on every new order |
| Build Tags | code |
2 | Runs the rules, merges tags |
| Update Order Tags | httpRequest |
4.2 | Writes tags back to Shopify |
| Notify Slack | slack |
2.3 | Posts the result to a channel |
Step-by-step build
1 Add the Shopify Trigger
Create a new workflow and add a Shopify Trigger node. Set the topic to orders/create. Connect your Shopify Admin API credential, or create one with an access token from a custom app (Settings, then Apps and sales channels, then Develop apps). Give the app the read_orders and write_orders scopes. n8n registers the webhook with Shopify automatically when you activate the workflow.
When an order comes in, the trigger outputs the full order object. The fields the rules care about look like this:
{
"id": 5123987456012,
"order_number": 1042,
"total_price": "240.00",
"total_discounts": "20.00",
"tags": "",
"customer": { "orders_count": 4 },
"shipping_address": { "country_code": "US" }
}
Use a test order or Shopify’s “Send test notification” to pull a real payload into n8n before building the rules. It makes the field names concrete.
2 Build the tagging rules in a Code node
Add a Code node named Build Tags right after the trigger. This is where your logic lives. The script reads the order, starts from the tags it already has so nothing is lost, applies your rules, and returns a clean comma-separated string.
const order = $input.first().json;
// Start from existing tags so we never wipe manual ones
const tags = new Set(
(order.tags || '').split(',').map(t => t.trim()).filter(Boolean)
);
const total = parseFloat(order.total_price || '0');
const ordersCount = order.customer?.orders_count ?? 0;
const country = order.shipping_address?.country_code || '';
// Value tier
if (total >= 200) tags.add('VIP');
else if (total >= 100) tags.add('High value');
// Customer history
if (ordersCount <= 1) tags.add('First-time');
else tags.add('Repeat');
// Geography
if (country && country !== 'US') tags.add('International');
// Discount used
if (parseFloat(order.total_discounts || '0') > 0) tags.add('Used discount');
return [{
json: {
orderId: order.id,
orderNumber: order.order_number,
tags: Array.from(tags).join(', ')
}
}];
For the sample order above, this returns:
{
"orderId": 5123987456012,
"orderNumber": 1042,
"tags": "VIP, Repeat, Used discount"
}
Adjust the thresholds to your average order value. A store selling 30-dollar items wants a far lower VIP line than one selling furniture.
3 Write the tags back with an HTTP Request
Add an HTTP Request node named Update Order Tags. The Shopify node does not expose order tag updates directly, so a direct API call is the clean way to do it.
- Method:
PUT - URL:
https://YOUR_STORE.myshopify.com/admin/api/2024-10/orders/{{ $json.orderId }}.json - Authentication: Predefined Credential Type, then Shopify Access Token API (the same token from step 1).
- Set Send Body to on, and Body Content Type to
JSON. - Switch the body to Using JSON and paste the expression below.
{
"order": {
"id": {{ $json.orderId }},
"tags": "{{ $json.tags }}"
}
}
Shopify replaces the entire tags field with this string. Because step 2 already merged in the existing tags, the order keeps everything and gains the new labels.
Keep the API version (2024-10 here) current. Shopify retires old versions on a rolling schedule, so check yours once or twice a year.
4 Notify your team in Slack
Add a Slack node named Notify Slack. Set the resource to Message and operation to Send. For the channel, use the From list selector and pick your channel, for example #orders. In the message text field, paste:
=🏷️ Tagged order #{{ $json.orderNumber }} → {{ $json.tags }}
Now connect the nodes in order: Shopify Trigger to Build Tags, Build Tags to Update Order Tags, Update Order Tags to Notify Slack. Save, then toggle the workflow Active. Your team sees a line like 🏷️ Tagged order #1042 → VIP, Repeat, Used discount within seconds of each sale.
Common mistakes
- Skipping the merge step. If the Code node does not seed the set with the order’s current tags, the PUT wipes any tag you or another app added. Always read existing tags first.
- Sending the body as a plain object instead of JSON. In HTTP Request v4.2, set Body Content Type to JSON and use the Using JSON option, otherwise Shopify rejects the payload.
- Forgetting the
write_ordersscope. A token with read access alone returns a 403 on the PUT. Recreate the custom app token with both read and write order scopes. - Hardcoding a store URL with a trailing slash or the wrong API version. The endpoint must be exact, with no extra slash before
orders. - Treating the customer object as always present. Guest checkouts can arrive without a full customer record, so the optional chaining (
?.) in the script matters.
Cost at realistic volume
The tagging logic itself is free. Your only real consideration is n8n executions, and this workflow uses one execution per order.
| Store volume | Orders / month | n8n executions | Typical cost |
|---|---|---|---|
| Growing store | 500 | 500 | Free tier or low self-hosted |
| Established | 3,000 | 3,000 | Covered by Starter Cloud plan |
| High volume | 15,000 | 15,000 | Self-hosted, server cost only |
Compare that to Shopify Flow, which requires a Shopify Plus plan starting north of 2,000 dollars a month. For tagging alone, the n8n route is a rounding error. The Shopify Admin API itself does not charge for these calls, and you stay well inside its rate limits at one call per order.
🚀 Get the Shopify order tagging template
Want it done for you? Our team sets up this workflow on your n8n, wires it to your store, and tunes the tagging rules to your products and margins so it works on day one.
Works on n8n Cloud and self-hosted · Rules tuned to your store
Frequently asked questions
Will this overwrite tags I already added in Shopify?
No, as long as you keep the merge step. The Shopify API replaces the whole tags field on every update, so the Code node reads the order’s current tags first and combines them with the new ones before writing back. Remove that merge and you would lose manual tags.
Do I need Shopify Plus to use order tagging automation?
No. Shopify Flow, the built-in tool, is limited to Shopify Plus plans. This n8n build talks to the standard Admin API, which every paid Shopify plan includes, so a Basic or regular Shopify store can tag orders automatically without upgrading.
Can I add my own tagging rules?
Yes. The rules live in plain JavaScript inside the Code node, so you can tag by product, SKU, discount code, shipping country, line-item count, or any field Shopify returns. Add an if statement, push a tag into the set, and the rest of the workflow handles the write.
What happens if Shopify sends two orders at the same time?
n8n runs each trigger event as its own execution, so two simultaneous orders are tagged independently with no collision. Each execution reads that order’s own current tags before writing, so there is no risk of one order’s tags landing on another.
Will tagging old orders work, or only new ones?
The trigger only fires on new orders. To backfill existing orders, swap the trigger for a Schedule node plus a Shopify node that lists past orders, then loop them through the same Code and HTTP Request nodes. The tagging logic stays identical.
Related guides
- Shopify new order alerts with n8n
- High-value customer Slack alerts
- Shopify refund tracker in Google Sheets
- Browse the full Shopify automation category for more n8n templates.