{
  "name": "Analyze Shopify orders with Gemini AI and send weekly Slack insights",
  "nodes": [
    {
      "id": "361be7b7-c6fa-44c1-bded-3a7bd938adeb",
      "name": "Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -864,
        272
      ],
      "parameters": {
        "width": 380,
        "height": 730,
        "content": "## Weekly Shopify sales analysis with Gemini AI\n\nThis workflow analyzes your Shopify sales data weekly and provides AI-powered insights via Slack and email.\n\n### How it works\n1. **Data collection**: P"
      }
    },
    {
      "id": "1d828bd4-71c8-4d37-8d49-f7751605536b",
      "name": "Data Collection",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -464,
        272
      ],
      "parameters": {
        "width": 214,
        "height": 588,
        "content": "## Data collection\nFetch orders from Shopify"
      }
    },
    {
      "id": "499d660b-aa8f-4e4c-9132-f3383a14939b",
      "name": "Processing",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -224,
        272
      ],
      "parameters": {
        "width": 360,
        "height": 588,
        "content": "## Data processing\nAggregate sales metrics and prepare for AI analysis"
      }
    },
    {
      "id": "7cfe7c29-8b39-442e-91bc-d71d9532d9c4",
      "name": "AI Analysis",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        160,
        272
      ],
      "parameters": {
        "width": 200,
        "height": 588,
        "content": "## AI analysis\nGemini AI analyzes trends and provides insights"
      }
    },
    {
      "id": "1efb9a8f-06ff-4244-aa0e-da884b40a0ed",
      "name": "Reporting",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        384,
        272
      ],
      "parameters": {
        "width": 760,
        "height": 588,
        "content": "## Reporting & alerts\nDistribute insights via Slack, email, and track in Google Sheets. Alert on revenue drops."
      }
    },
    {
      "id": "b99f6cc0-c4fe-46ac-bb19-bff96a989ee4",
      "name": "Weekly Monday Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -400,
        464
      ]
    },
    {
      "id": "ca1d803a-9e5f-46a9-bd0f-18df642f0031",
      "name": "Get Last 7 Days Orders",
      "type": "n8n-nodes-base.shopify",
      "position": [
        -176,
        464
      ]
    },
    {
      "id": "7a13da50-3454-4a18-bc47-80b44596cac0",
      "name": "Aggregate Sales Data",
      "type": "n8n-nodes-base.code",
      "position": [
        0,
        464
      ]
    },
    {
      "id": "13d1eb98-12ce-4292-ab2b-9d249bf19c10",
      "name": "Gemini Sales Analysis",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        208,
        464
      ]
    },
    {
      "id": "1fc78f67-9545-498f-a358-b6e6f7ba5e4b",
      "name": "Parse AI Response",
      "type": "n8n-nodes-base.set",
      "position": [
        400,
        464
      ]
    },
    {
      "id": "89cfab60-7ffc-4f5d-990e-ec3f467ec4c8",
      "name": "Post to Slack Channel",
      "type": "n8n-nodes-base.slack",
      "position": [
        560,
        464
      ]
    },
    {
      "id": "2e2d2d11-eab2-4c3a-a125-3851d339c15f",
      "name": "Email Report to Stakeholders",
      "type": "n8n-nodes-base.gmail",
      "position": [
        736,
        464
      ]
    },
    {
      "id": "a9d7e01b-156f-4a53-bf79-7c1c48a17291",
      "name": "Log Metrics to Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        560,
        672
      ]
    },
    {
      "id": "5ab101bf-4c34-4a26-b186-55db6425c508",
      "name": "Check Revenue Drop >20%",
      "type": "n8n-nodes-base.if",
      "position": [
        736,
        672
      ]
    },
    {
      "id": "ef590b98-aba5-43f4-813b-e5c69958cce2",
      "name": "Send Revenue Drop Alert",
      "type": "n8n-nodes-base.slack",
      "position": [
        960,
        656
      ]
    }
  ],
  "connections": {
    "Parse AI Response": {
      "main": [
        [
          {
            "node": "Post to Slack Channel",
            "type": "main",
            "index": 0
          },
          {
            "node": "Email Report to Stakeholders",
            "type": "main",
            "index": 0
          },
          {
            "node": "Log Metrics to Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate Sales Data": {
      "main": [
        [
          {
            "node": "Gemini Sales Analysis",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gemini Sales Analysis": {
      "main": [
        [
          {
            "node": "Parse AI Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Weekly Monday Trigger": {
      "main": [
        [
          {
            "node": "Get Last 7 Days Orders",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Last 7 Days Orders": {
      "main": [
        [
          {
            "node": "Aggregate Sales Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Revenue Drop >20%": {
      "main": [
        [
          {
            "node": "Send Revenue Drop Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log Metrics to Google Sheets": {
      "main": [
        [
          {
            "node": "Check Revenue Drop >20%",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}