Automatic E-commerce Order Tracking and Discord Alert System - n8n Workflow

Use this powerful n8n workflow to automate tracking for Shopify orders. Instantly log new sales data into Google Sheets and send detailed real-time alerts to a Discord channel.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

E-commerce managers needing real-time visibility into sales.
Technical teams seeking efficient business process automation using n8n templates.
Users looking to centralize e-commerce data without manual entry.
Developers who require immediate notifications for new transactions via Discord.

Overview

Managing high volumes of e-commerce orders often involves repetitive data entry and delays in internal communication. This highly efficient n8n workflow solves this by providing a hands-free, real-time tracking solution. When a customer places a new order on Shopify, this automation instantly captures all the necessary details, transforms the complex line-item data using a custom Python n8n node, and ensures accurate logging into a designated Google Sheet. Furthermore, it generates a clean, readable summary notification and sends it immediately to Discord. Implementing this n8n template ensures that sales records are always up-to-date and that your team receives critical sales alerts without latency, significantly boosting operational efficiency and data accuracy.

How it Works

This automation initiates using a dedicated n8n trigger and executes a five-step process:


  1. Shopify Trigger: The n8n workflow starts immediately upon the creation of a new order on your connected Shopify store. This specific n8n trigger listens for the orders/create topic.

  2. Data Extraction (Code Node): The raw Shopify JSON payload, which contains an array of line items, is passed to a Python n8n node. This code node extracts the titles and prices of the ordered products, concatenating them into comma-separated strings. This transformation is crucial for simplifying the data structure for Google Sheets.

  3. Google Sheets Logging: The Google Sheets n8n node then executes an Append row operation. It maps extensive order details—such as Order Number, Customer Name, Financial Status, Subtotal, Tax, and the newly aggregated Line Item Titles and Prices—into a predefined row in your spreadsheet. This provides a clean historical record.

  4. Notification Formatting (Code1 Node): Following the successful data write, a second Code n8n node (using JavaScript) retrieves the complete, mapped data row and constructs a detailed, Markdown-formatted message. This message is optimized for readability in Discord, including itemized lists and a link to the Shopify order.

  5. Discord Notification: Finally, the Discord n8n node receives the prepared content and posts the rich notification message to the specified webhook, completing the n8n workflow and instantly alerting the team.

Installation Guide

To deploy this n8n workflow successfully, follow these steps:


  1. Import the n8n Workflow: Copy the provided JSON data and import it directly into your n8n instance using the 'New' > 'Import from JSON' option.

  2. Shopify Credentials: Set up credentials for the 'Shopify Trigger' n8n node. You will need a Shopify API access token with readorders and readproducts permissions. After setting credentials, activate the node to generate the webhook URL.

  3. Google Sheets Setup: Create a new Google Sheet document with column headers matching the data mapped in the 'Append row in sheet' node (e.g., Order Number, Customer Name, Order Total, Line Item Titles, etc.). Authenticate the Google Sheets n8n node using OAuth2 and select the correct Spreadsheet ID and Sheet name.

  4. Discord Webhook: Configure the 'Discord' n8n node using a Webhook URL. You must generate this webhook URL within your target Discord channel settings.

  5. Activate: Save the n8n workflow and toggle the main switch to 'Active'. The Shopify n8n trigger will now be listening for new order events.

Node Details

Shopify Trigger (Trigger Node):
Function: Acts as the primary n8n trigger, initiating the workflow when a new order is created in Shopify (orders/create).
Key Configuration: Uses Access Token authentication to securely connect to the Shopify store.

Code (Python):
Function: Processes the line_items array from the Shopify payload, extracting product titles and prices and concatenating them into simple comma-separated strings (Line Item Titles, Line Item Prices) suitable for spreadsheet storage.
Key Configuration: Uses Python to perform list comprehension and string joining for efficient data preparation.

Append row in sheet (Google Sheets n8n node):
Function: Appends a new row to the specified Google Sheet document, mapping detailed transactional data derived from the Shopify n8n trigger and the Code node.
Key Configuration: Operation is set to append. Mapped fields include Order Number, Customer Name, Order Total, Financial Status, and custom Line Item fields.

Code1 (JavaScript):
Function: Takes the consolidated data from the Google Sheet step and formats it into a highly readable, multi-line Markdown message (content) suitable for Discord. This ensures the team receives a rich alert.
Key Configuration: Uses JavaScript string interpolation to build a detailed summary including item breakdowns and financial status.

Discord (Notification n8n node):
Function: Sends the formatted message content to a Discord channel via a webhook, providing instant team communication regarding the new sale.
* Key Configuration: Uses Webhook authentication and injects the dynamic content generated by the previous Code n8n node.

Related n8n Workflows

Free

Nodes: 4 Nodes
Updated: December 26 2025
View all
Created by

Featured*