{
  "name": "Send seasonal WooCommerce sales trend reports to Slack and Google Sheets",
  "nodes": [
    {
      "id": "2d57edf2-67d7-4f89-8742-6dffe9a47f98",
      "name": "Weekly Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -8688,
        304
      ]
    },
    {
      "id": "3a66a614-414a-4af6-a83b-7d578162d251",
      "name": "Global Configuration",
      "type": "n8n-nodes-base.set",
      "position": [
        -8464,
        304
      ]
    },
    {
      "id": "c21fb239-2c1c-46ef-aaa1-4ca70ba1b130",
      "name": "Calculate Date Ranges",
      "type": "n8n-nodes-base.code",
      "position": [
        -8240,
        304
      ]
    },
    {
      "id": "f9d2e906-c458-405b-a715-09fefc14cb30",
      "name": "Fetch Current Week Sales",
      "type": "n8n-nodes-base.wooCommerce",
      "position": [
        -8016,
        304
      ]
    },
    {
      "id": "8bce7222-548e-4748-8dfb-a9a170f91882",
      "name": "Fetch Last Month Sales",
      "type": "n8n-nodes-base.wooCommerce",
      "position": [
        -7792,
        304
      ]
    },
    {
      "id": "dd6340b6-4845-4ecc-8e75-28e9e08d593d",
      "name": "Fetch Last Year Sales",
      "type": "n8n-nodes-base.wooCommerce",
      "position": [
        -7568,
        304
      ]
    },
    {
      "id": "4c7e968c-6af2-4198-a6d7-5154e2beda42",
      "name": "Generate Trend Report",
      "type": "n8n-nodes-base.code",
      "position": [
        -7344,
        304
      ]
    },
    {
      "id": "c6e73f3d-7738-4880-a05b-192e731838a3",
      "name": "Log to Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -7120,
        400
      ]
    },
    {
      "id": "702e3546-bad1-45ea-8122-a46f04f38dcd",
      "name": "Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -9216,
        -112
      ],
      "parameters": {
        "width": 435,
        "height": 581,
        "content": "## WooCommerce Seasonality Tracker\n\n**How it works**\nThis workflow automates weekly sales reporting by comparing current performance against historical data. It triggers every Monday, calculates date "
      }
    },
    {
      "id": "4f0cc06d-cd5c-4437-9705-8ac91bc647b7",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -8736,
        64
      ],
      "parameters": {
        "width": 643,
        "height": 410,
        "content": "## 1. Initialization\n\n**Trigger & Config**\nSets the weekly schedule and defines global variables (Webhooks, Thresholds). \n**Date Calculation**\nDynamically generates ISO date ranges for Current, Last M"
      }
    },
    {
      "id": "7754ac20-fa29-437e-82a6-ba9327caf068",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -8080,
        64
      ],
      "parameters": {
        "width": 660,
        "height": 410,
        "content": "## 2. Data Ingestion\n\n**Sequential Fetching**\nRetrives order data one period at a time (Current -> Month -> Year). This sequential chaining ensures all data is available before the analysis step runs,"
      }
    },
    {
      "id": "ca74487f-6cd7-4811-8d61-a7482a4f7fcb",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -7408,
        -16
      ],
      "parameters": {
        "width": 556,
        "height": 618,
        "content": "## 3. Analysis & Output\n\n**Trend Analysis**\nCompares revenue/orders against history using the defined threshold. Outputs text-based trends.\n**Reporting**\nSends analystic Data to Slack and appends a ro"
      }
    },
    {
      "id": "2655b0fa-da96-4097-b894-fe68749c7d99",
      "name": "Slack Message",
      "type": "n8n-nodes-base.slack",
      "position": [
        -7120,
        208
      ]
    }
  ],
  "connections": {
    "Weekly Trigger": {
      "main": [
        [
          {
            "node": "Global Configuration",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Global Configuration": {
      "main": [
        [
          {
            "node": "Calculate Date Ranges",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate Date Ranges": {
      "main": [
        [
          {
            "node": "Fetch Current Week Sales",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Last Year Sales": {
      "main": [
        [
          {
            "node": "Generate Trend Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Trend Report": {
      "main": [
        [
          {
            "node": "Log to Google Sheets",
            "type": "main",
            "index": 0
          },
          {
            "node": "Slack Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Last Month Sales": {
      "main": [
        [
          {
            "node": "Fetch Last Year Sales",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Current Week Sales": {
      "main": [
        [
          {
            "node": "Fetch Last Month Sales",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}