AutomationFlowsE-commerce › Track Shopify Orders in Google Sheets and Send Discord Notifications

Track Shopify Orders in Google Sheets and Send Discord Notifications

Bymoosa @moosa on n8n.io

This workflow tracks new Shopify orders in real-time and logs them to a Google Sheet, while also sending a structured order summary to a Discord channel. Perfect for keeping your team and records updated without checking your Shopify admin manually. Trigger: Listens to event via…

Event trigger★★★★☆ complexity5 nodesShopify TriggerGoogle SheetsDiscord
E-commerce Trigger: Event Nodes: 5 Complexity: ★★★★☆ Added:

This workflow corresponds to n8n.io template #6750 — we link there as the canonical source.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "afd5e841-93cd-4052-a3bb-247e6ef1b097",
      "name": "Shopify Trigger",
      "type": "n8n-nodes-base.shopifyTrigger",
      "position": [
        -256,
        -32
      ],
      "parameters": {
        "topic": "orders/create",
        "authentication": "accessToken"
      },
      "credentials": {
        "shopifyAccessTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "a4616c22-8956-46e7-8464-597bfd482d3c",
      "name": "Append row in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        160,
        -32
      ],
      "parameters": {
        "columns": {
          "value": {
            "Tax": "={{ $('Shopify Trigger').item.json.current_total_tax }}",
            "City": "={{ $('Shopify Trigger').item.json.billing_address.city }}",
            "Country": "={{ $('Shopify Trigger').item.json.billing_address.country }}",
            "Currency": "={{ $('Shopify Trigger').item.json.current_total_discounts_set.shop_money.currency_code }}",
            "Subtotal": "={{ $('Shopify Trigger').item.json.current_subtotal_price }}",
            "Order Date": "={{ $('Shopify Trigger').item.json.customer.created_at }}",
            "Order Link": "={{ $('Shopify Trigger').item.json.order_status_url }}",
            "Order Total": "={{ $('Shopify Trigger').item.json.total_price }}",
            "Order Number": "={{ $('Shopify Trigger').item.json.order_number }}\n",
            "Customer Name": "={{ $('Shopify Trigger').item.json.billing_address.name }}",
            "Customer Email": "={{ $('Shopify Trigger').item.json.email }}",
            "Payment Gateway": "={{ $('Shopify Trigger').item.json.payment_gateway_names[0] }}",
            "Financial Status": "={{ $('Shopify Trigger').item.json.financial_status }}",
            "Line Item Prices": "={{ $json.line_item_prices }}",
            "Line Item Titles": "={{ $json.line_item_titles }}"
          },
          "schema": [
            {
              "id": "Order Number",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Order Number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Customer Email",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Customer Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Customer Name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Customer Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "City",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "City",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Country",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Country",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Order Total",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Order Total",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Currency",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Currency",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Subtotal",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Subtotal",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Tax",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Tax",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Financial Status",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Financial Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Payment Gateway",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Payment Gateway",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Order Date",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Order Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Line Item Titles",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Line Item Titles",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Line Item Prices",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Line Item Prices",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Order Link",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Order Link",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/178dfbyBMouRfyXP2OngRHylputb4qdzkwQV63Lk5Ev0/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "178dfbyBMouRfyXP2OngRHylputb4qdzkwQV63Lk5Ev0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/178dfbyBMouRfyXP2OngRHylputb4qdzkwQV63Lk5Ev0/edit?usp=drivesdk",
          "cachedResultName": "shopify orders"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "a6a9d2f7-9455-4b92-b90f-a2b9274c454b",
      "name": "Code",
      "type": "n8n-nodes-base.code",
      "position": [
        -48,
        -32
      ],
      "parameters": {
        "language": "python",
        "pythonCode": "# Assume the incoming JSON has a top-level \"line_items\" array\nline_items = items[0][\"json\"][\"line_items\"]\n\ntitles = \", \".join([item[\"title\"] for item in line_items])\nprices = \", \".join([str(item[\"price\"]) for item in line_items])\n\nreturn [\n    {\n        \"json\": {\n            \"line_item_titles\": titles,\n            \"line_item_prices\": prices,\n        }\n    }\n]"
      },
      "typeVersion": 2
    },
    {
      "id": "f0ef6c18-5d58-4caa-a030-93a84e8b3592",
      "name": "Discord",
      "type": "n8n-nodes-base.discord",
      "position": [
        576,
        -32
      ],
      "parameters": {
        "content": "={{ $json.content }}",
        "options": {},
        "authentication": "webhook"
      },
      "credentials": {
        "discordWebhookApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "33a7c414-e55f-4ed8-a10f-a561311b69f6",
      "name": "Code1",
      "type": "n8n-nodes-base.code",
      "position": [
        368,
        -32
      ],
      "parameters": {
        "jsCode": "const order = items[0].json;\n\nconst prices = order[\"Line Item Prices\"].split(', ');\nconst titles = order[\"Line Item Titles\"].split(', ');\n\nconst message = `\ud83d\udecd\ufe0f **New Order Received!**\n\n**Order #:** ${order[\"Order Number\"]}\n**Customer:** ${order[\"Customer Name\"]} (${order[\"Customer Email\"]})\n**Location:** ${order[\"City\"]}, ${order[\"Country\"]}\n**Date:** ${order[\"Order Date\"]}\n\n\ud83e\uddfe **Items Ordered:**\n${titles.map((title, i) => `- ${title} (${prices[i]} ${order[\"Currency\"]})`).join('\\n')}\n\n\ud83d\udcb3 **Total:** ${order[\"Order Total\"]} ${order[\"Currency\"]}\n**Subtotal:** ${order[\"Subtotal\"]} | **Tax:** ${order[\"Tax\"]} ${order[\"Currency\"]}\n**Payment Status:** ${order[\"Financial Status\"]}\n**Payment Method:** ${order[\"Payment Gateway\"]}\n\n\ud83d\udd17 [View Order](${order[\"Order Link\"]})\n`;\n\nreturn [{ json: { content: message } }];\n"
      },
      "typeVersion": 2
    }
  ],
  "connections": {
    "Code": {
      "main": [
        [
          {
            "node": "Append row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code1": {
      "main": [
        [
          {
            "node": "Discord",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Shopify Trigger": {
      "main": [
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append row in sheet": {
      "main": [
        [
          {
            "node": "Code1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This workflow tracks new Shopify orders in real-time and logs them to a Google Sheet, while also sending a structured order summary to a Discord channel. Perfect for keeping your team and records updated without checking your Shopify admin manually. Trigger: Listens to event via…

Source: https://n8n.io/workflows/6750/ — original creator credit. Request a take-down →

More E-commerce workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

E-commerce

This workflow automates the synchronization of product prices across Shopify and WooCommerce platforms to ensure retail consistency. It triggers when a price change is detected in either system, appli

Shopify Trigger, Woo Commerce Trigger, WooCommerce +3
E-commerce

This n8n workflow automatically sends WhatsApp notifications to customers when their Shopify orders are fulfilled. It extracts order details, validates customer phone numbers for WhatsApp compatibilit

HTTP Request, Shopify Trigger, Google Sheets
E-commerce

This n8n workflow listens for order cancellations in Shopify, extracts relevant customer and order data, checks if the customer’s phone number is registered on WhatsApp via the Rapiwa API, and sends a

Shopify Trigger, Google Sheets, N8N Nodes Rapiwa
E-commerce

This workflow automates the collection and standardization of sales data from Shopify and WooCommerce into a centralized Google Sheets ledger. It triggers on new orders, normalizes disparate platform

Shopify Trigger, Woo Commerce Trigger, Google Sheets
E-commerce

The workflow triggers on a new checkout event from Shopify and extracts all relevant cart data. It filters carts based on value and age to isolate qualified abandoned checkouts. For each qualified car

Google Sheets, Shopify Trigger, Gmail +2