Daily Shopify sales summary on WhatsApp

Every morning, get yesterday's order count and revenue sent to your WhatsApp.

Medium Saves ~3 hours/month E-commerceBy Flowngn team

Works with n8n · Make · Zapier

How it works

Trigger: Schedule — every day at 8:00
  1. Get all Shopify orders created in the last 24 hours.
  2. Add up the order totals and count the orders.
  3. Format a short message: "Yesterday: 14 orders, $1,240 revenue".
  4. Send it to your number with the WhatsApp Business Cloud API.

Diagram

Every day 8:00Schedule TriggerSGet yesterday's ord…Shopify{ }Summarize salesCodeWSend WhatsAppWhatsApp Business Cloud
Trigger App Code

Code

JavaScript used in the Code step — already included in the template below.

Summarize sales · Code node
// Adds up yesterday's orders into one WhatsApp-ready message.
const orders = $input.all().map((item) => item.json);
const revenue = orders.reduce((sum, o) => sum + parseFloat(o.total_price || 0), 0);
const currency = orders[0]?.currency || "";

return [{
  json: {
    message: `📊 Yesterday: ${orders.length} orders, ${revenue.toFixed(2)} ${currency} revenue`,
  },
}];

Build it

Pick your tool — same automation, step by step.

Copy and paste straight into an n8n canvas (Ctrl+V), or download and use Import from File. Then connect your own credentials and replace every YOUR_… placeholder.

Workflow JSON
Show code (128 lines)
{
  "name": "Daily Shopify sales summary on WhatsApp (Flowngn)",
  "nodes": [
    {
      "parameters": {
        "content": "## Daily Shopify sales summary on WhatsApp\nEvery morning, get yesterday's order count and revenue sent to your WhatsApp.\n\n**Setup**\n1. Open each node and connect your own credentials.\n2. Replace every YOUR_… placeholder.\n3. Test once, then activate.\n\nFree template from Flowngn",
        "height": 260,
        "width": 340
      },
      "id": "458210f1-f980-4989-a1ec-07858e8eaece",
      "name": "Setup notes",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -420,
        -60
      ]
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 8
            }
          ]
        }
      },
      "id": "458210f1-f980-4989-a1ec-07858e8eaece",
      "name": "Every day 8:00",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        0,
        0
      ]
    },
    {
      "parameters": {
        "operation": "getAll",
        "returnAll": true,
        "options": {
          "createdAtMin": "={{ $now.minus({ days: 1 }).toISO() }}"
        }
      },
      "id": "458210f1-f980-4989-a1ec-07858e8eaece",
      "name": "Get yesterday's orders",
      "type": "n8n-nodes-base.shopify",
      "typeVersion": 1,
      "position": [
        300,
        0
      ]
    },
    {
      "parameters": {
        "jsCode": "// Adds up yesterday's orders into one WhatsApp-ready message.\nconst orders = $input.all().map((item) => item.json);\nconst revenue = orders.reduce((sum, o) => sum + parseFloat(o.total_price || 0), 0);\nconst currency = orders[0]?.currency || \"\";\n\nreturn [{\n  json: {\n    message: `📊 Yesterday: ${orders.length} orders, ${revenue.toFixed(2)} ${currency} revenue`,\n  },\n}];"
      },
      "id": "458210f1-f980-4989-a1ec-07858e8eaece",
      "name": "Summarize sales",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        600,
        0
      ]
    },
    {
      "parameters": {
        "operation": "send",
        "phoneNumberId": "YOUR_PHONE_NUMBER_ID",
        "recipientPhoneNumber": "YOUR_WHATSAPP_NUMBER",
        "textBody": "={{ $json.message }}"
      },
      "id": "458210f1-f980-4989-a1ec-07858e8eaece",
      "name": "Send WhatsApp",
      "type": "n8n-nodes-base.whatsApp",
      "typeVersion": 1,
      "position": [
        900,
        0
      ]
    }
  ],
  "connections": {
    "Every day 8:00": {
      "main": [
        [
          {
            "node": "Get yesterday's orders",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get yesterday's orders": {
      "main": [
        [
          {
            "node": "Summarize sales",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Summarize sales": {
      "main": [
        [
          {
            "node": "Send WhatsApp",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "tags": []
}

Open in the playground to edit →

Tips

  • WhatsApp business-initiated messages need an approved message template.
  • Add the top-selling product to the message for extra insight.

Related flows