{
  "name": "Send weekly WooCommerce sales KPIs to Slack and Google Sheets",
  "nodes": [
    {
      "id": "1df3f4e4-65ae-429d-9715-2be475ab7b89",
      "name": "Configure WooCommerce Store",
      "type": "n8n-nodes-base.set",
      "position": [
        -1136,
        112
      ]
    },
    {
      "id": "db720a54-3a7a-4b0a-bf0f-6df9a78f785b",
      "name": "Weekly Sales KPI Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1712,
        112
      ]
    },
    {
      "id": "b9ff054d-eb89-4692-882d-33435e919e9d",
      "name": "Calculate Last Week Date Range",
      "type": "n8n-nodes-base.code",
      "position": [
        -1424,
        112
      ]
    },
    {
      "id": "ae5186e8-6b3e-417b-b6f8-957639c2367b",
      "name": "Get Weekly Orders (Sales Data)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -688,
        -80
      ]
    },
    {
      "id": "8655c59e-5b04-45f2-8253-75c3a2abf3c2",
      "name": "Calculate Order & Revenue KPIs",
      "type": "n8n-nodes-base.code",
      "position": [
        -480,
        -80
      ]
    },
    {
      "id": "f602936b-dc44-47a8-9458-42343ac24212",
      "name": "Calculate Refund KPIs",
      "type": "n8n-nodes-base.code",
      "position": [
        -464,
        176
      ]
    },
    {
      "id": "d1dc6a51-0b14-4c3d-b683-69077ffd03f1",
      "name": "Calculate Top  Products by Revenue",
      "type": "n8n-nodes-base.code",
      "position": [
        -464,
        400
      ]
    },
    {
      "id": "71841e06-9b6e-4403-a625-0e14717d4165",
      "name": "Merge Weekly KPI Results",
      "type": "n8n-nodes-base.merge",
      "position": [
        112,
        64
      ]
    },
    {
      "id": "59b51c31-ae96-4f6a-8570-1d05cd73903f",
      "name": "Send Weekly KPI Report to Slack",
      "type": "n8n-nodes-base.slack",
      "position": [
        1024,
        96
      ]
    },
    {
      "id": "c4806fca-61be-4a36-ae8f-dd330d3f8b79",
      "name": "Prepare Final KPI Report Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        304,
        96
      ]
    },
    {
      "id": "6d9de6e2-347e-45a5-b100-56e879815e80",
      "name": "Store Weekly KPIs in Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        768,
        96
      ]
    },
    {
      "id": "3b4ad615-1a1f-42c0-b031-cc36dfbc9f18",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1808,
        -64
      ],
      "parameters": {
        "width": 864,
        "height": 384,
        "content": "## Workflow Trigger & Store Setup\nThis section starts the workflow on a weekly schedule and calculates the previous week’s date range. It also defines the WooCommerce store domain in one place, ensuri"
      }
    },
    {
      "id": "bb6b0abd-0774-44d2-9502-ed9ea62c11cd",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -832,
        -272
      ],
      "parameters": {
        "width": 624,
        "height": 864,
        "content": "## Weekly Data Collection & KPI Calculation\nThis section fetches weekly sales orders and refunds from WooCommerce, then calculates key performance metrics such as total orders, revenue, average order "
      }
    },
    {
      "id": "4fb2bfaa-8ad1-40d9-a2f9-7666c2e6bcdb",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -48,
        -64
      ],
      "parameters": {
        "width": 624,
        "height": 384,
        "content": "## KPI Consolidation & Report Preparation\nThis section combines all calculated KPIs into a single dataset and formats the data into a clean, report-ready structure. Only essential fields are retained,"
      }
    },
    {
      "id": "7dec1769-3471-4a01-8502-2292e98b71fd",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        672,
        -64
      ],
      "parameters": {
        "width": 576,
        "height": 384,
        "content": "## Reporting & Notifications\nThis section saves the finalized weekly KPI data to Google Sheets for historical tracking and analysis, then sends a summarized performance report to Slack. This ensures s"
      }
    },
    {
      "id": "4e4eb146-171d-45cc-be8a-254d3aa222bd",
      "name": "Get Weekly Top Products",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -672,
        400
      ]
    },
    {
      "id": "774f08d0-7067-4fa3-9175-022cbea1c4c2",
      "name": "Get Weekly Refunds",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -672,
        176
      ]
    },
    {
      "id": "391a258b-3536-44f0-97f1-a6636afecf8f",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2544,
        -1008
      ],
      "parameters": {
        "width": 592,
        "height": 1040,
        "content": "## How Workflow works\n### This workflow automatically creates a weekly performance report for your WooCommerce store. It runs on a fixed schedule, calculates the previous week’s date range and fetches"
      }
    }
  ],
  "connections": {
    "Get Weekly Refunds": {
      "main": [
        [
          {
            "node": "Calculate Refund KPIs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate Refund KPIs": {
      "main": [
        [
          {
            "node": "Merge Weekly KPI Results",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Get Weekly Top Products": {
      "main": [
        [
          {
            "node": "Calculate Top  Products by Revenue",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Weekly KPI Results": {
      "main": [
        [
          {
            "node": "Prepare Final KPI Report Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Weekly Sales KPI Trigger": {
      "main": [
        [
          {
            "node": "Calculate Last Week Date Range",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Configure WooCommerce Store": {
      "main": [
        [
          {
            "node": "Get Weekly Orders (Sales Data)",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get Weekly Refunds",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get Weekly Top Products",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate Last Week Date Range": {
      "main": [
        [
          {
            "node": "Configure WooCommerce Store",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge Weekly KPI Results",
            "type": "main",
            "index": 3
          }
        ]
      ]
    },
    "Calculate Order & Revenue KPIs": {
      "main": [
        [
          {
            "node": "Merge Weekly KPI Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Weekly Orders (Sales Data)": {
      "main": [
        [
          {
            "node": "Calculate Order & Revenue KPIs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Final KPI Report Fields": {
      "main": [
        [
          {
            "node": "Store Weekly KPIs in Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate Top  Products by Revenue": {
      "main": [
        [
          {
            "node": "Merge Weekly KPI Results",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Store Weekly KPIs in Google Sheets": {
      "main": [
        [
          {
            "node": "Send Weekly KPI Report to Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}