TL;DR: This Shopify pre-order tag and fulfillment routing n8n workflow watches every new order, detects which line items are pre-orders, and writes a clear tag back to the order so your team never ships a backordered item by mistake. Full pre-order carts get a hold tag, mixed carts get a split-shipment tag, and a Telegram alert plus a Google Sheets log keep everyone aligned. In-stock orders pass through untouched.
What it does
Pre-orders are great for cash flow and demand testing, but they quietly break fulfillment. A customer buys a pre-order hoodie and an in-stock sticker pack in the same cart, and now your warehouse either ships half an order early or sits on the sticker pack for three weeks. Either way you get a support ticket.
This workflow removes the guesswork. Every time Shopify creates an order, n8n reads the line items, decides whether any of them are pre-orders, and tags the order so the right thing happens next:
- A cart made entirely of pre-order items is tagged
pre-order, holdso fulfillment knows to wait for stock. - A cart that mixes pre-order and in-stock items is tagged
pre-order, partial-preorderso the team can ship the available items now and hold the rest. - A normal in-stock cart is left alone and keeps moving through your usual flow.
On top of the tag, the team gets a Telegram message describing the order and a row is appended to a Google Sheet so you have a running record of every pre-order routing decision. It is one of the most useful building blocks in any n8n Shopify automation stack because it sits at the exact point where pre-order chaos usually starts.
Why it beats the default
Shopify on its own treats a pre-order line item the same as any other line item. Unless you pay for a dedicated pre-order app with built-in tagging, nothing on the order tells your packer that one item is not in the building yet. Manual tagging works until volume rises, and then someone forgets, an order ships early, and you are issuing a partial refund.
Shopify Flow can tag orders, but its conditions are limited and it cannot run the line-item logic, message Telegram, and log to Sheets in one place without extra connectors. Doing the same in n8n gives you three advantages:
- The detection rule is yours. Match a SKU prefix, a cart property, a vendor, or a tag, and change it in seconds.
- The whole path lives in one workflow you can read top to bottom, version, and reuse for other order types.
- It is self-hosted, so the per-order cost is effectively zero once n8n is running.
What you need
- An n8n instance, either self-hosted or n8n Cloud. New to it? Start with how to set up n8n.
- A Shopify custom app access token with read and write access to Orders.
- A consistent way pre-order items are marked. The most reliable markers are a SKU prefix like
PRE-or a line item property your pre-order app or theme adds to the cart. - A Telegram bot token and the chat ID of your fulfillment channel.
- A Google account with a Sheet ready to receive routing rows.
Node-by-node list
- Shopify Trigger, topic orders/create. Fires once per new order.
- Code node, “Detect pre-order items”. Classifies each line item and computes the new tag string and a plain message.
- IF node. Sends orders that contain at least one pre-order item down the true branch and everything else down the false branch to exit.
- Shopify node, Order, Update. Writes the computed tags back to the order.
- Set node (Edit Fields). Builds the route type label and the notification fields used downstream.
- Telegram node, Send Message. Alerts the fulfillment channel with the order and its routing.
- Google Sheets node, Append. Logs the routing decision as one row.
Step-by-step build
- Add a Shopify Trigger node and select the topic
orders/create. Connect your Shopify access token credential. This is the only trigger in the workflow, and it sits at the start where it belongs. - Add a Code node named “Detect pre-order items”. Loop over
$json.line_itemsand mark an item as a pre-order when itsskustarts withPRE-or it carries a property whose name matches preorder. Split the items into a pre-order list and an in-stock list. SethasPreorderto true when the pre-order list is not empty andallPreorderto true when there are no in-stock items. BuildnewTagsby appendingpre-order, holdfor a full pre-order cart orpre-order, partial-preorderfor a mixed cart to the order’s existing tags. ReturnorderId,orderName,email,hasPreorder,allPreorder, the two item lists as joined strings,newTags, andtotal. - Add an IF node. Set the condition to Boolean, value one
{{ $json.hasPreorder }}, equals true. The false output stays empty so plain in-stock orders simply end here. - On the true branch, add a Shopify node set to resource Order, operation Update. Set Order ID to
{{ $json.orderId }}, then under Update Fields add Tags and set it to{{ $json.newTags }}. This is what stamps the routing decision onto the order itself. - Add a Set node (Edit Fields). Add a string assignment
routeTypeset to{{ $json.allPreorder ? 'Full pre-order (hold)' : 'Partial (ship in-stock, hold pre-order)' }}, and carry forwardorderName,email,preorderItems,inStockItems, andnewTagsso the next two nodes have clean inputs. - Add a Telegram node, operation Send Message. Put your fulfillment chat ID in Chat ID and a Text like:
Pre-order routing | {{ $json.orderName }} | Type: {{ $json.routeType }} | Pre-order: {{ $json.preorderItems }} | In stock: {{ $json.inStockItems }} | {{ $json.email }}. - Add a Google Sheets node, operation Append. Select your spreadsheet and tab, then map columns for date, order, email, route type, pre-order items, in-stock items, total, and tags. Use Define Below to map each column to the matching field.
- Save, then run a test order in Shopify with a known
PRE-SKU. Confirm the order shows the new tags, the Telegram message arrives, and a row lands in the Sheet. Activate the workflow.
Common mistakes
A few things trip people up the first time.
Replacing existing tags instead of appending
The Shopify Update operation overwrites the Tags field. If you set it to just pre-order, you wipe any tags the order already had. The Code node avoids this by reading order.tags first and appending to it, so keep that line in place.
Marking items by guesswork
Do not try to infer a pre-order from inventory levels alone, because a temporary stockout looks identical to a pre-order. Use an explicit marker you control, a SKU prefix or a cart property, so the rule is deterministic.
Expecting the tag to hold the order by itself
A tag is a label, not an action. If you want tagged orders to actually pause, pair the hold tag with a Shopify Flow rule or keep the pre-order lane on manual fulfillment. The tag is the signal that drives that rule.
Forgetting the false branch
If you wire downstream nodes to the wrong IF output, every in-stock order gets tagged too. Leave the false output empty so normal orders exit cleanly.
Cost at realistic volume
On self-hosted n8n this workflow is essentially free. There are no paid API calls in the path: the Shopify Trigger, the order update, Telegram, and Google Sheets are all included with their respective free tiers or your existing plan.
- At 300 orders per month, you run 300 trigger executions and only update and notify on the subset that contains pre-orders. Cost is zero beyond hosting.
- At 3,000 orders per month, the same holds. Telegram and Google Sheets have generous free quotas that this volume stays well under.
- On n8n Cloud, each order counts as one execution against your plan. Even the entry plan covers thousands of executions, so a typical store pays nothing extra.
Compare that to a per-order fee from a dedicated pre-order app, and the workflow pays for itself the moment you have steady pre-order volume.
Ready-to-import template
Want this running today without wiring every node by hand? We package tested, import-ready n8n templates and set them up for you. See our done-for-you services to get the pre-order routing workflow installed, connected to your Shopify store, and validated end to end.
FAQ
How does n8n know which items are pre-orders?
The Code node checks each line item for a SKU prefix such as PRE- or a cart property named preorder. You pick the marker that matches how your pre-order app or theme flags items, so the rule is explicit and no extra Shopify product lookups are needed.
Will this split a mixed cart into two shipments?
The workflow tags a mixed order as partial-preorder so your team can ship the in-stock items now and hold the rest. n8n flags the split for you, then you complete the two fulfillments in Shopify or with your fulfillment app of choice.
Does tagging the order stop it from auto-fulfilling?
Tags alone do not pause fulfillment. Add a hold tag plus a matching Shopify Flow rule that holds tagged orders, or keep the pre-order lane on manual fulfillment and let the tag be the signal your team watches for.
Can I use Slack or email instead of Telegram?
Yes. Swap the Telegram node for a Gmail, Outlook, Slack, or Discord node. The fields built in the Set node stay the same, so only the final notification node changes and the routing logic is untouched.
What happens to normal in-stock orders?
Orders with no pre-order items take the false branch of the IF node and exit without changes. They keep flowing through your existing fulfillment process, so the workflow only ever acts on the orders that genuinely need special routing.