{
  "name": "Generate multi-period financial reports from Google Sheets with AI analysis",
  "nodes": [
    {
      "id": "de33033e-aff3-4999-8c76-f586716a8b50",
      "name": "DeepSeek Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatDeepSeek",
      "position": [
        -360,
        340
      ]
    },
    {
      "id": "030b27e4-55c0-478d-b401-aca4c9aa14a8",
      "name": "Window Buffer Memory1",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        -240,
        360
      ]
    },
    {
      "id": "c504a6ec-0783-4a36-bdbf-45e5b11963f9",
      "name": "Call n8n Workflow Tool",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        -80,
        360
      ]
    },
    {
      "id": "99e1edc5-f43f-4c1b-8649-99b77ac6479c",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -600,
        100
      ]
    },
    {
      "id": "0eeaa722-fdf0-4afd-a837-94d26e14c1dd",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -300,
        100
      ]
    },
    {
      "id": "934c56a4-7534-4add-8095-1f085256af7a",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -360,
        700
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "4140bc3a-d19a-4274-8ba4-84f7334a46e7",
      "name": "When Executed by Another Workflow",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        -100,
        1100
      ]
    },
    {
      "id": "8bf4a0f4-1b40-4ac1-8138-6c831f6003e1",
      "name": "Format Date",
      "type": "n8n-nodes-base.set",
      "position": [
        60,
        1100
      ]
    },
    {
      "id": "7fc2f2eb-b4d5-4ea3-bc18-e0324d65c826",
      "name": "Get revenual from google sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        340,
        1100
      ]
    },
    {
      "id": "91092c78-4d3a-478f-b42d-c92c86595f9e",
      "name": "Pivot last circle",
      "type": "n8n-nodes-base.code",
      "position": [
        540,
        1260
      ]
    },
    {
      "id": "03bf6db2-3d53-4507-b286-0b166e8ab8a3",
      "name": "Pivot current circle",
      "type": "n8n-nodes-base.code",
      "position": [
        480,
        940
      ]
    },
    {
      "id": "aa5957fa-35a9-42a2-8c47-cdff23f9e683",
      "name": "Format data current circle",
      "type": "n8n-nodes-base.set",
      "position": [
        700,
        780
      ]
    },
    {
      "id": "82656e1d-2361-4ce1-b28d-19c7469abc99",
      "name": "Sum current circle",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        700,
        940
      ]
    },
    {
      "id": "f13eaa1b-bd70-4ee2-a588-e633c5a73c65",
      "name": "Format data last circle",
      "type": "n8n-nodes-base.set",
      "position": [
        720,
        1100
      ]
    },
    {
      "id": "6377a403-c89b-4a21-928a-077ee5106019",
      "name": "Sum last circle",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        720,
        1260
      ]
    },
    {
      "id": "4fe96658-e302-42a8-8eba-9e059c3583bf",
      "name": "Sum data last transfer month",
      "type": "n8n-nodes-base.merge",
      "position": [
        960,
        1180
      ]
    },
    {
      "id": "d2c5d065-a199-4551-a3f5-fb21994186a3",
      "name": "Sum data current transfer month",
      "type": "n8n-nodes-base.merge",
      "position": [
        960,
        800
      ]
    },
    {
      "id": "fa5e3abc-df57-4140-a68e-f328b33b6bd6",
      "name": "Change title 1",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1180,
        800
      ]
    },
    {
      "id": "cabe2138-71bb-4b40-add9-f9ac8f7b7f55",
      "name": "Change title 2",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1180,
        1180
      ]
    },
    {
      "id": "db552cf2-6f91-44ee-aa37-84d3753b983c",
      "name": "Collect all",
      "type": "n8n-nodes-base.merge",
      "position": [
        1520,
        1180
      ]
    },
    {
      "id": "dcc23ef7-3e1c-4aa5-aee8-dcfc06ee0097",
      "name": "Change title out come",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1740,
        1180
      ]
    },
    {
      "id": "e17379be-782f-4c9f-bbd4-b99e8b844613",
      "name": "Format data last year circle",
      "type": "n8n-nodes-base.set",
      "position": [
        720,
        1480
      ]
    },
    {
      "id": "ef07c8d5-7bb8-41b3-bf52-4d6dd73e1c8c",
      "name": "Pivot last year cirle",
      "type": "n8n-nodes-base.code",
      "position": [
        500,
        1680
      ]
    },
    {
      "id": "c5695aff-f725-4dd1-8f5f-61c37cc3fb06",
      "name": "Sum last year circle",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        720,
        1680
      ]
    },
    {
      "id": "ed643ebd-1524-4af4-b1ba-0ddd705460c8",
      "name": "Add data last year",
      "type": "n8n-nodes-base.merge",
      "position": [
        960,
        1620
      ]
    },
    {
      "id": "10b6ecab-05b6-4cb9-ae6f-1e6d242f7a96",
      "name": "Change title",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1180,
        1620
      ]
    }
  ],
  "connections": {
    "Collect all": {
      "main": [
        [
          {
            "node": "Change title out come",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Date": {
      "main": [
        [
          {
            "node": "Get revenual from google sheet",
            "type": "main",
            "index": 0
          },
          {
            "node": "Format data current circle",
            "type": "main",
            "index": 0
          },
          {
            "node": "Format data last circle",
            "type": "main",
            "index": 0
          },
          {
            "node": "Format data last year circle",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Change title": {
      "main": [
        [
          {
            "node": "Collect all",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Change title 1": {
      "main": [
        [
          {
            "node": "Collect all",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Change title 2": {
      "main": [
        [
          {
            "node": "Collect all",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Sum last circle": {
      "main": [
        [
          {
            "node": "Sum data last transfer month",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Pivot last circle": {
      "main": [
        [
          {
            "node": "Sum last circle",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add data last year": {
      "main": [
        [
          {
            "node": "Change title",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sum current circle": {
      "main": [
        [
          {
            "node": "Sum data current transfer month",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "DeepSeek Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Pivot current circle": {
      "main": [
        [
          {
            "node": "Sum current circle",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sum last year circle": {
      "main": [
        [
          {
            "node": "Add data last year",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Pivot last year cirle": {
      "main": [
        [
          {
            "node": "Sum last year circle",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Window Buffer Memory1": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Call n8n Workflow Tool": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Format data last circle": {
      "main": [
        [
          {
            "node": "Sum data last transfer month",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format data current circle": {
      "main": [
        [
          {
            "node": "Sum data current transfer month",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format data last year circle": {
      "main": [
        [
          {
            "node": "Add data last year",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sum data last transfer month": {
      "main": [
        [
          {
            "node": "Change title 2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get revenual from google sheet": {
      "main": [
        [
          {
            "node": "Pivot current circle",
            "type": "main",
            "index": 0
          },
          {
            "node": "Pivot last circle",
            "type": "main",
            "index": 0
          },
          {
            "node": "Pivot last year cirle",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sum data current transfer month": {
      "main": [
        [
          {
            "node": "Change title 1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "Format Date",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}