{
  "id": "GlgUwkuAq48MlxaK",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Automated Market Report Generation & Distribution",
  "tags": [],
  "nodes": [
    {
      "id": "9dfa0ef3-23eb-4b26-a122-b75ef6c94b04",
      "name": "0. Cron (Monthly Schedule)",
      "type": "n8n-nodes-base.cron",
      "position": [
        -1648,
        208
      ],
      "parameters": {},
      "description": "Triggers on the 1st day of every month at 8 AM to generate the report.",
      "typeVersion": 1
    },
    {
      "id": "75f56194-4398-477f-a871-9b99e7c11e47",
      "name": "1. HTTP Request (Get Market Data)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1424,
        208
      ],
      "parameters": {},
      "description": "Fetches raw market data for a specific region from an external API.",
      "typeVersion": 1
    },
    {
      "id": "b50f4ece-6f82-4fe4-bec6-9bab5eb5c3a9",
      "name": "2. Function (Process Data)",
      "type": "n8n-nodes-base.function",
      "position": [
        -1200,
        208
      ],
      "parameters": {},
      "description": "Processes and formats the raw API data for the report template.",
      "typeVersion": 1
    },
    {
      "id": "b413874a-4940-4c9c-9979-8a83363c9048",
      "name": "3. Google Docs (Create Report)",
      "type": "n8n-nodes-base.googleDocs",
      "position": [
        -976,
        208
      ],
      "parameters": {},
      "description": "Creates a new report document from a template and fills it with market data.",
      "typeVersion": 1
    },
    {
      "id": "919caceb-0843-4bc7-b728-3cb9ef3f1245",
      "name": "4. Google Sheets (Get Client List)",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -752,
        208
      ],
      "parameters": {},
      "description": "Gets all client emails from your mailing list sheet.",
      "typeVersion": 3
    },
    {
      "id": "2dd3cac5-6073-4877-934d-bb3de4d22a44",
      "name": "5. Split In Batches",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -528,
        208
      ],
      "parameters": {},
      "description": "Processes each client email one by one to send the report.",
      "typeVersion": 1
    },
    {
      "id": "9518ca4b-3085-4510-8fad-d8be6915bb62",
      "name": "6. Gmail (Send Report)",
      "type": "n8n-nodes-base.gmail",
      "position": [
        -304,
        208
      ],
      "parameters": {},
      "description": "Sends the generated report as an attachment to each client.",
      "typeVersion": 1
    },
    {
      "id": "a34de244-453a-406d-8b49-dcc3dac8b143",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1728,
        144
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "e27d8aeb-ac2d-43ad-8668-2ed849d61249",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1728,
        448
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "1e2422b5-3680-49de-a885-eb33fd9f112f",
  "connections": {
    "5. Split In Batches": {
      "main": [
        [
          {
            "node": "6. Gmail (Send Report)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "0. Cron (Monthly Schedule)": {
      "main": [
        [
          {
            "node": "1. HTTP Request (Get Market Data)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "2. Function (Process Data)": {
      "main": [
        [
          {
            "node": "3. Google Docs (Create Report)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "3. Google Docs (Create Report)": {
      "main": [
        [
          {
            "node": "4. Google Sheets (Get Client List)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "1. HTTP Request (Get Market Data)": {
      "main": [
        [
          {
            "node": "2. Function (Process Data)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "4. Google Sheets (Get Client List)": {
      "main": [
        [
          {
            "node": "5. Split In Batches",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}