{
  "name": "AI marketing report (Google Analytics & Ads, Meta Ads), sent via email/Telegram",
  "nodes": [
    {
      "id": "f145b442-3036-4769-b7ad-62c97fa5d662",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1580,
        -220
      ]
    },
    {
      "id": "9b25dfe7-cabe-4051-8d03-5f9b1f42621a",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -1380,
        120
      ]
    },
    {
      "id": "f04d67a6-fb37-434d-8fd7-988db33f8cde",
      "name": "Google_Ads",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        -400,
        120
      ]
    },
    {
      "id": "179c2464-bf17-4a9b-8c5b-508a4acf746f",
      "name": "Meta_Ads",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        -300,
        120
      ]
    },
    {
      "id": "f963f694-cf30-4b81-9ee1-3ad383714770",
      "name": "Analytics_Domain_1",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        -1180,
        120
      ]
    },
    {
      "id": "093d83fd-6788-418b-ac38-925b04be2515",
      "name": "Analytics_Domain_3",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        -860,
        120
      ]
    },
    {
      "id": "57612276-4a48-4a6c-997c-f6c4f1196ed7",
      "name": "Analytics_Domain_2",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        -1020,
        120
      ]
    },
    {
      "id": "3dfea4cf-87fb-44d5-9b95-304406da6b18",
      "name": "Analytics_Domain_4",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        -700,
        120
      ]
    },
    {
      "id": "79f1cd20-6133-4c72-8942-5b1f55adbb7f",
      "name": "Analytics_Domain_5",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        -540,
        120
      ]
    },
    {
      "id": "0740d70f-a582-4a12-ab12-08b46504e8f8",
      "name": "Execute Workflow Trigger",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        -1580,
        460
      ]
    },
    {
      "id": "2449b1be-0ba8-41ae-9ea5-86028da736f0",
      "name": "Calculator",
      "type": "@n8n/n8n-nodes-langchain.toolCalculator",
      "position": [
        380,
        680
      ]
    },
    {
      "id": "e8b884f1-2013-4c25-a641-8181528db173",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1660,
        360
      ],
      "parameters": {
        "width": 2340,
        "height": 460,
        "content": "## Sub-Workflow: Google Analytics Data"
      }
    },
    {
      "id": "f7d290eb-07d1-413d-ba12-184229e519c0",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1660,
        1440
      ],
      "parameters": {
        "width": 2340,
        "height": 460,
        "content": "## Sub-Workflow: Meta Ads Data"
      }
    },
    {
      "id": "c78da3ec-fb47-4373-8850-e1af89d7330e",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1660,
        -280
      ],
      "parameters": {
        "width": 2340,
        "height": 540,
        "content": "## Main Workflow: Weekly Report Assistant"
      }
    },
    {
      "id": "79ae6b22-0067-4d51-bc64-e0360d2096f3",
      "name": "Calculator1",
      "type": "@n8n/n8n-nodes-langchain.toolCalculator",
      "position": [
        440,
        1200
      ]
    },
    {
      "id": "d7608c67-4b10-4860-b683-de265b95cb03",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1660,
        880
      ],
      "parameters": {
        "width": 2340,
        "height": 500,
        "content": "## Sub-Workflow: Google Ads Data"
      }
    },
    {
      "id": "c047cc54-1598-4294-a398-cdb23ea8be4d",
      "name": "Calculator3",
      "type": "@n8n/n8n-nodes-langchain.toolCalculator",
      "position": [
        460,
        1760
      ]
    },
    {
      "id": "165717a8-b215-4e0e-a5e9-586feaec261e",
      "name": "Call Google Analytics data: Last 7 days",
      "type": "n8n-nodes-base.googleAnalytics",
      "position": [
        -1320,
        460
      ]
    },
    {
      "id": "da636e2a-4396-4809-98ea-c04abdfc6b73",
      "name": "Call Google Analytics data: Last 7 days (previous year)",
      "type": "n8n-nodes-base.googleAnalytics",
      "position": [
        -400,
        460
      ]
    },
    {
      "id": "f1ac5ff4-1b09-442f-96b0-4f1562dffebb",
      "name": "Calculation same period previous year",
      "type": "n8n-nodes-base.code",
      "position": [
        -620,
        980
      ]
    },
    {
      "id": "bc224327-ca75-451a-841f-7cd8c59c5925",
      "name": "Format data input (previous year)",
      "type": "n8n-nodes-base.code",
      "position": [
        -240,
        980
      ]
    },
    {
      "id": "5b9dbc30-4a92-43d2-b9bf-477141aa4024",
      "name": "Format data input (current year)",
      "type": "n8n-nodes-base.code",
      "position": [
        -1200,
        980
      ]
    },
    {
      "id": "fdb70b1a-8891-469f-9920-3623cb40760e",
      "name": "Assign data from input (current year)",
      "type": "n8n-nodes-base.set",
      "position": [
        -1020,
        980
      ]
    },
    {
      "id": "bef77ef4-b6ef-48c3-b0b7-5a12a3f75b05",
      "name": "Summarize input (current year)",
      "type": "n8n-nodes-base.summarize",
      "position": [
        -820,
        980
      ]
    },
    {
      "id": "2be072fe-24fd-47f5-8026-31b98666de84",
      "name": "Assign input (previous year)",
      "type": "n8n-nodes-base.set",
      "position": [
        -80,
        980
      ]
    },
    {
      "id": "87381409-c9e5-4d1f-a118-a9e592fa8805",
      "name": "Summarize input (previous year)",
      "type": "n8n-nodes-base.summarize",
      "position": [
        100,
        980
      ]
    },
    {
      "id": "000507e0-7806-4686-b157-56e9d58bd9db",
      "name": "Calculate date format for Google Ads request (last 7 days)",
      "type": "n8n-nodes-base.code",
      "position": [
        -1600,
        980
      ]
    },
    {
      "id": "a1b4d36a-c322-4771-bcf3-226870fcf000",
      "name": "Call Google Ads Data: Last 7 days",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1380,
        980
      ]
    },
    {
      "id": "7246c0af-4e9d-4037-bc1d-c4fd16aae7d3",
      "name": "Call Google Ads Data: Last 7 days (previous year)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -420,
        980
      ]
    },
    {
      "id": "13074a3d-6cf4-4ad7-9e26-002f8120e640",
      "name": "Call Meta Ads Data: Last 7 days",
      "type": "n8n-nodes-base.facebookGraphApi",
      "position": [
        -1380,
        1540
      ]
    },
    {
      "id": "06a32368-f9f1-4311-bd17-3fea6b0d2888",
      "name": "Call Meta Ads Data: Last 7 days (previous year)",
      "type": "n8n-nodes-base.facebookGraphApi",
      "position": [
        -640,
        1540
      ]
    },
    {
      "id": "a13919d1-5680-44ea-826b-44afc0034702",
      "name": "Summarize Meta input (current year)",
      "type": "n8n-nodes-base.summarize",
      "position": [
        -920,
        1540
      ]
    },
    {
      "id": "1afce576-0d2a-41bb-a94b-5d6eaae1fe3e",
      "name": "Assign Meta data from input (current year)",
      "type": "n8n-nodes-base.set",
      "position": [
        -1140,
        1540
      ]
    },
    {
      "id": "0d400918-eb14-4bb1-8950-27b39e651264",
      "name": "Assign Meta data input (previous year)",
      "type": "n8n-nodes-base.set",
      "position": [
        -340,
        1540
      ]
    },
    {
      "id": "faf34f2a-f6d3-4510-aeee-6b25174abc08",
      "name": "Summarize Meta data input (previous year)",
      "type": "n8n-nodes-base.summarize",
      "position": [
        -40,
        1540
      ]
    },
    {
      "id": "3985f30a-94ab-45be-a511-b9ae0d4f3bb0",
      "name": "Format all Meta data for LLM",
      "type": "n8n-nodes-base.code",
      "position": [
        160,
        1540
      ]
    },
    {
      "id": "146d6907-66af-41ff-ab32-b2a3ec5787b6",
      "name": "Processing for Google Ads report",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        400,
        980
      ]
    },
    {
      "id": "2fd2a795-caa4-4194-8049-4955c1d54dd9",
      "name": "Format all Google data for LLM",
      "type": "n8n-nodes-base.code",
      "position": [
        260,
        980
      ]
    },
    {
      "id": "e7e357e7-3f16-4b6e-ae50-c6741bbe8357",
      "name": "Assign Google Analytics data input (current year)",
      "type": "n8n-nodes-base.set",
      "position": [
        -1080,
        460
      ]
    },
    {
      "id": "9f16d330-9288-42bc-9a21-beb002c0ce4f",
      "name": "Summarize Google Analytics input (current year)",
      "type": "n8n-nodes-base.summarize",
      "position": [
        -860,
        460
      ]
    },
    {
      "id": "9355325f-35c2-4663-922e-d7ccec873fea",
      "name": "Calculate date format for meta ads request s",
      "type": "n8n-nodes-base.code",
      "position": [
        -1600,
        1540
      ]
    },
    {
      "id": "7677727b-606b-4377-9057-032e91d1faae",
      "name": "Calculation same period previous year1",
      "type": "n8n-nodes-base.code",
      "position": [
        -620,
        460
      ]
    },
    {
      "id": "d49d00f4-7336-40b7-8833-d2e8c9eacb5b",
      "name": "Assign Google Analytics data input (previous year)",
      "type": "n8n-nodes-base.set",
      "position": [
        -180,
        460
      ]
    },
    {
      "id": "a6f72675-f055-4270-8fff-05d61da6f3f9",
      "name": "Summarize Google Analytics input (previous year)",
      "type": "n8n-nodes-base.summarize",
      "position": [
        40,
        460
      ]
    },
    {
      "id": "61311c11-59d2-4b77-afc5-52b1d66afbd7",
      "name": "Send mail report",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        560,
        -220
      ]
    },
    {
      "id": "928d15f2-141c-4e88-abcc-60799793bde7",
      "name": "Processing for Meta Ads Report",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        400,
        1540
      ]
    },
    {
      "id": "ce9175bd-b355-47eb-8dd8-dd26292e0061",
      "name": "Processing for Google Analytics Report",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        400,
        460
      ]
    },
    {
      "id": "c960aed4-83c9-4f7f-b341-0eb29d4c3733",
      "name": "Processing for Telegram Report",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        0,
        0
      ]
    },
    {
      "id": "542bad2f-fad2-4e6d-b7af-499c7cd2b35c",
      "name": "Weekly Report Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -900,
        -220
      ]
    },
    {
      "id": "2a405e35-5d34-4f3c-a5e8-81e958cc550a",
      "name": "Send Telegram report",
      "type": "n8n-nodes-base.telegram",
      "position": [
        560,
        0
      ]
    },
    {
      "id": "eb8e59fe-2dbd-49e6-a055-a01f7419d8f3",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2120,
        -280
      ],
      "parameters": {
        "width": 440,
        "height": 2180,
        "content": "Welcome to Online Marketing Weekly Report Workflow!\n\nThis workflow has the following sequence:\n\n1. time trigger (e.g. every Monday at 7 a.m.)\n2. retrieval of Online Marketing data from the last 7 days"
      }
    }
  ],
  "connections": {
    "Meta_Ads": {
      "ai_tool": [
        [
          {
            "node": "Weekly Report Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Calculator": {
      "ai_tool": [
        [
          {
            "node": "Processing for Google Analytics Report",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Google_Ads": {
      "ai_tool": [
        [
          {
            "node": "Weekly Report Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Calculator1": {
      "ai_tool": [
        [
          {
            "node": "Processing for Google Ads report",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Calculator3": {
      "ai_tool": [
        [
          {
            "node": "Processing for Meta Ads Report",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Weekly Report Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Weekly Report Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Analytics_Domain_1": {
      "ai_tool": [
        [
          {
            "node": "Weekly Report Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Analytics_Domain_2": {
      "ai_tool": [
        [
          {
            "node": "Weekly Report Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Analytics_Domain_3": {
      "ai_tool": [
        [
          {
            "node": "Weekly Report Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Analytics_Domain_4": {
      "ai_tool": [
        [
          {
            "node": "Weekly Report Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Analytics_Domain_5": {
      "ai_tool": [
        [
          {
            "node": "Weekly Report Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Weekly Report Agent": {
      "main": [
        [
          {
            "node": "Processing for Telegram Report",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send mail report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Telegram report": {
      "main": [
        []
      ]
    },
    "Execute Workflow Trigger": {
      "main": [
        [
          {
            "node": "Call Google Analytics data: Last 7 days",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Assign input (previous year)": {
      "main": [
        [
          {
            "node": "Summarize input (previous year)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format all Meta data for LLM": {
      "main": [
        [
          {
            "node": "Processing for Meta Ads Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format all Google data for LLM": {
      "main": [
        [
          {
            "node": "Processing for Google Ads report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Processing for Telegram Report": {
      "main": [
        [
          {
            "node": "Send Telegram report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Summarize input (current year)": {
      "main": [
        [
          {
            "node": "Calculation same period previous year",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Call Meta Ads Data: Last 7 days": {
      "main": [
        [
          {
            "node": "Assign Meta data from input (current year)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Summarize input (previous year)": {
      "main": [
        [
          {
            "node": "Format all Google data for LLM",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format data input (current year)": {
      "main": [
        [
          {
            "node": "Assign data from input (current year)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Call Google Ads Data: Last 7 days": {
      "main": [
        [
          {
            "node": "Format data input (current year)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format data input (previous year)": {
      "main": [
        [
          {
            "node": "Assign input (previous year)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Summarize Meta input (current year)": {
      "main": [
        [
          {
            "node": "Call Meta Ads Data: Last 7 days (previous year)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Assign data from input (current year)": {
      "main": [
        [
          {
            "node": "Summarize input (current year)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculation same period previous year": {
      "main": [
        [
          {
            "node": "Call Google Ads Data: Last 7 days (previous year)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Assign Meta data input (previous year)": {
      "main": [
        [
          {
            "node": "Summarize Meta data input (previous year)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculation same period previous year1": {
      "main": [
        [
          {
            "node": "Call Google Analytics data: Last 7 days (previous year)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Call Google Analytics data: Last 7 days": {
      "main": [
        [
          {
            "node": "Assign Google Analytics data input (current year)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Summarize Meta data input (previous year)": {
      "main": [
        [
          {
            "node": "Format all Meta data for LLM",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Assign Meta data from input (current year)": {
      "main": [
        [
          {
            "node": "Summarize Meta input (current year)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate date format for meta ads request s": {
      "main": [
        [
          {
            "node": "Call Meta Ads Data: Last 7 days",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Call Meta Ads Data: Last 7 days (previous year)": {
      "main": [
        [
          {
            "node": "Assign Meta data input (previous year)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Summarize Google Analytics input (current year)": {
      "main": [
        [
          {
            "node": "Calculation same period previous year1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Summarize Google Analytics input (previous year)": {
      "main": [
        [
          {
            "node": "Processing for Google Analytics Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Assign Google Analytics data input (current year)": {
      "main": [
        [
          {
            "node": "Summarize Google Analytics input (current year)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Call Google Ads Data: Last 7 days (previous year)": {
      "main": [
        [
          {
            "node": "Format data input (previous year)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Assign Google Analytics data input (previous year)": {
      "main": [
        [
          {
            "node": "Summarize Google Analytics input (previous year)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Call Google Analytics data: Last 7 days (previous year)": {
      "main": [
        [
          {
            "node": "Assign Google Analytics data input (previous year)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate date format for Google Ads request (last 7 days)": {
      "main": [
        [
          {
            "node": "Call Google Ads Data: Last 7 days",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}