{
  "name": "Forecast sales trends and weekly reports with Stripe, Sheets, Slack, and Gemini AI",
  "nodes": [
    {
      "id": "ecdc7892-848f-4eb2-9a12-13c8ab982794",
      "name": "Main Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1424,
        -192
      ],
      "parameters": {
        "width": 400,
        "height": 856,
        "content": "### 📊 Automated Sales Intelligence\n\nTransform your Stripe payment data into actionable business insights with AI-powered analysis and automated reporting.\n\n### How it works\n1. **Data Collection**: Pul"
      }
    },
    {
      "id": "45a117ff-7f57-4abf-b048-feab409ad282",
      "name": "Data Collection Section",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1008,
        -192
      ],
      "parameters": {
        "width": 776,
        "height": 848,
        "content": "## Data collection\nScheduled trigger fetches last 7 days of Stripe data (charges, subscriptions, refunds) and loads historical sales records from Google Sheets."
      }
    },
    {
      "id": "42509b6f-1d0a-4d6f-8e73-608915a3be4c",
      "name": "Processing Section",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -208,
        -192
      ],
      "parameters": {
        "width": 728,
        "height": 848,
        "content": "## Processing & analysis\nCode nodes merge and calculate daily totals, trends, MRR estimates. Gemini AI provides comprehensive insights, forecasting, and strategic recommendations."
      }
    },
    {
      "id": "4a159a0a-9c8d-43a2-9469-641a2913b52b",
      "name": "Output Section",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        544,
        -192
      ],
      "parameters": {
        "width": 824,
        "height": 848,
        "content": "## Output & alerts\nIF node detects significant changes, triggers alerts via Slack. All results logged to Sheets, dashboard updated in Notion, weekly reports sent via Slack and Gmail."
      }
    },
    {
      "id": "93706bae-5717-481d-a844-28e64c41b774",
      "name": "Weekly Sales Analysis",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -960,
        112
      ]
    },
    {
      "id": "36fe5b1b-a867-466d-a8d8-9f226a52799b",
      "name": "Get Stripe Charges",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -448,
        -64
      ]
    },
    {
      "id": "ee8c3926-ae41-4c4d-a6d4-cdba86ef9a6c",
      "name": "Get Stripe Subscriptions",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -448,
        112
      ]
    },
    {
      "id": "7fb94465-a90b-43a9-9dfe-22ee694c1ec2",
      "name": "Get Stripe Refunds",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -448,
        304
      ]
    },
    {
      "id": "71369ccb-0d64-4d3e-a080-76334291270f",
      "name": "Load Historical Sales",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -448,
        480
      ]
    },
    {
      "id": "ab566c7f-8181-40a9-b0e0-160d4ec81db0",
      "name": "Merge and Process Data",
      "type": "n8n-nodes-base.code",
      "position": [
        -192,
        112
      ]
    },
    {
      "id": "06631c07-3688-4c39-a2b0-86f214c5eee0",
      "name": "Calculate Trends",
      "type": "n8n-nodes-base.code",
      "position": [
        48,
        112
      ]
    },
    {
      "id": "81fb26f5-df51-48b8-9576-09f029b0d05c",
      "name": "Gemini AI Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        288,
        352
      ]
    },
    {
      "id": "cc3940c1-8bb0-4719-bf2d-91e506acac33",
      "name": "Generate Sales Analysis",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        288,
        112
      ]
    },
    {
      "id": "f3094d0c-c852-44fa-8d99-0bdae66bdf5e",
      "name": "Check for Anomalies",
      "type": "n8n-nodes-base.if",
      "position": [
        592,
        112
      ]
    },
    {
      "id": "b165413f-78d9-4d5c-aee0-9e45f5486788",
      "name": "Log to Historical Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        768,
        -64
      ]
    },
    {
      "id": "5f70a690-e7a6-4a7b-940e-e11a2d00105c",
      "name": "Update Notion Dashboard",
      "type": "n8n-nodes-base.notion",
      "position": [
        768,
        112
      ]
    },
    {
      "id": "34995307-1ce6-4529-bf55-553adf83c9d0",
      "name": "Send Weekly Report to Slack",
      "type": "n8n-nodes-base.slack",
      "position": [
        768,
        304
      ]
    },
    {
      "id": "327f097e-066a-4ccb-9302-25eabb1b1c3a",
      "name": "Email Executive Report",
      "type": "n8n-nodes-base.gmail",
      "position": [
        768,
        480
      ]
    },
    {
      "id": "f9554b4b-7982-4f04-abe8-2522fe431bcf",
      "name": "Send Anomaly Alert",
      "type": "n8n-nodes-base.slack",
      "position": [
        1008,
        112
      ]
    },
    {
      "id": "3ee626de-b582-41c8-8a1f-4dc97bcf1dc8",
      "name": "Configuration Settings",
      "type": "n8n-nodes-base.set",
      "position": [
        -688,
        112
      ]
    }
  ],
  "connections": {
    "Gemini AI Model": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Sales Analysis",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Calculate Trends": {
      "main": [
        [
          {
            "node": "Generate Sales Analysis",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Stripe Charges": {
      "main": [
        [
          {
            "node": "Merge and Process Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Stripe Refunds": {
      "main": [
        [
          {
            "node": "Merge and Process Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check for Anomalies": {
      "main": [
        [
          {
            "node": "Log to Historical Sheet",
            "type": "main",
            "index": 0
          },
          {
            "node": "Update Notion Dashboard",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send Weekly Report to Slack",
            "type": "main",
            "index": 0
          },
          {
            "node": "Email Executive Report",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send Anomaly Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Load Historical Sales": {
      "main": [
        [
          {
            "node": "Merge and Process Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Weekly Sales Analysis": {
      "main": [
        [
          {
            "node": "Configuration Settings",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Configuration Settings": {
      "main": [
        [
          {
            "node": "Get Stripe Charges",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get Stripe Subscriptions",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get Stripe Refunds",
            "type": "main",
            "index": 0
          },
          {
            "node": "Load Historical Sales",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge and Process Data": {
      "main": [
        [
          {
            "node": "Calculate Trends",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Sales Analysis": {
      "main": [
        [
          {
            "node": "Check for Anomalies",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Stripe Subscriptions": {
      "main": [
        [
          {
            "node": "Merge and Process Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}