{
  "name": "Analyze Google Ads search terms with AI and send wastage alerts",
  "nodes": [
    {
      "id": "6b1dc428-e551-4d5d-94ee-54528f7a654f",
      "name": "Send a message",
      "type": "n8n-nodes-base.slack",
      "position": [
        304,
        512
      ]
    },
    {
      "id": "ec5f1b53-96f8-4ed9-8a03-acfd2e44ab3c",
      "name": "Filtering For A Specific Search Google Campaign",
      "type": "n8n-nodes-base.if",
      "position": [
        -848,
        320
      ]
    },
    {
      "id": "4da42e43-3698-45f0-a415-5afeda2095b8",
      "name": "Extracting Search Terms In The Past 14 Days",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -624,
        304
      ]
    },
    {
      "id": "1aa7b514-8665-4779-8733-c7de35afe946",
      "name": "Code (Google Ads Data Cleaner & Metrics Calculator)",
      "type": "n8n-nodes-base.code",
      "position": [
        -1504,
        592
      ]
    },
    {
      "id": "bc764c06-efde-4d79-b707-7a932df84465",
      "name": "Code (Google Ads Metrics Aggregator)",
      "type": "n8n-nodes-base.code",
      "position": [
        -1056,
        592
      ]
    },
    {
      "id": "7a6d2b7a-7fba-452b-bc7f-af76c419b2e7",
      "name": "Filter (Filtering Out Brand and Excluded Terms)",
      "type": "n8n-nodes-base.filter",
      "position": [
        -1280,
        592
      ]
    },
    {
      "id": "a9244dfd-36b7-4680-8c0d-941d57c7b48a",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -336,
        592
      ]
    },
    {
      "id": "abe04951-4d19-4c0e-b1de-ae00af2cb22b",
      "name": "Get a campaign in Google Ads",
      "type": "n8n-nodes-base.googleAdsTool",
      "position": [
        -240,
        816
      ]
    },
    {
      "id": "0f626220-9817-4cf4-8607-ab6189151f68",
      "name": "DeepSeek Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatDeepSeek",
      "position": [
        -624,
        848
      ]
    },
    {
      "id": "5b5cebd9-91ef-448f-bb59-e675167ad2bc",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -592,
        1008
      ]
    },
    {
      "id": "b2e49dee-050b-4d71-821a-bc5d9de6142c",
      "name": "xAI Grok Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatXAiGrok",
      "position": [
        -464,
        960
      ]
    },
    {
      "id": "19e18458-0c03-4107-a094-bfcb106e0e6b",
      "name": "Anthropic Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "position": [
        -336,
        992
      ]
    },
    {
      "id": "1b023c79-b145-4ea7-a9d6-0c90fcfea386",
      "name": "Create message",
      "type": "n8n-nodes-base.microsoftTeams",
      "position": [
        304,
        672
      ]
    },
    {
      "id": "b218ed96-eae3-4d04-a5eb-3eb03cdb8e8e",
      "name": "Rapiwa",
      "type": "n8n-nodes-rapiwa.rapiwa",
      "position": [
        304,
        832
      ]
    },
    {
      "id": "4376c83c-53ab-4e85-b4bd-91aa3a5b2d5a",
      "name": "Send a message1",
      "type": "n8n-nodes-base.discord",
      "position": [
        304,
        352
      ]
    },
    {
      "id": "b57f2901-d52a-40d6-9c9c-63ad66e474ed",
      "name": "Prepare Data for LLM",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        -832,
        592
      ]
    },
    {
      "id": "61a14f30-fc33-42a2-a01f-e89045c0ef66",
      "name": "Split HTTP Response",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -400,
        304
      ]
    },
    {
      "id": "8e5f4f06-02ab-49ea-8409-934d4db6b085",
      "name": "Get Only 'Enabled/Active' Campaigns",
      "type": "n8n-nodes-base.filter",
      "position": [
        -1056,
        320
      ]
    },
    {
      "id": "a917d776-13cd-445b-9876-25fe1dff6fe1",
      "name": "Fetch Google Campaigns",
      "type": "n8n-nodes-base.googleAds",
      "position": [
        -1280,
        320
      ]
    },
    {
      "id": "ad110e2d-a92f-485a-b453-7d40cf9b7a3c",
      "name": "Schedule Trigger (Start Everyday at 8AM)",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1504,
        320
      ]
    },
    {
      "id": "3605965e-8957-4b39-b163-157217da5de4",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2016,
        256
      ],
      "parameters": {
        "width": 432,
        "height": 1088,
        "content": "## Overview\nThis workflow automates Google Ads performance monitoring and optimization by analyzing search term data to identify wasteful spending and generate actionable recommendations. It uses AI t"
      }
    },
    {
      "id": "a4089e0e-cb06-4670-8335-eca1af3dd27e",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1552,
        256
      ],
      "parameters": {
        "width": 640,
        "height": 208,
        "content": "# Trigger & Campaign Fetching Group"
      }
    },
    {
      "id": "327cbfdd-11c0-4b21-9a18-f88126a6405c",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -896,
        256
      ],
      "parameters": {
        "width": 624,
        "height": 208,
        "content": "## Campaign Filtering & Search Term Extraction Group"
      }
    },
    {
      "id": "604eb653-993a-43be-b8f3-320623e9f753",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1552,
        544
      ],
      "parameters": {
        "width": 864,
        "height": 208,
        "content": "## Data Processing & Cleaning Group"
      }
    },
    {
      "id": "5ab73fd3-cb46-4d4b-af23-c9c19f674268",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -656,
        544
      ],
      "parameters": {
        "width": 592,
        "height": 576,
        "content": "## AI Analysis Setup"
      }
    },
    {
      "id": "46cefc06-b6cf-4598-a331-4d19dfbdfb5b",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -16,
        304
      ],
      "parameters": {
        "width": 480,
        "height": 672,
        "content": "## Report Generation & Distribution Group"
      }
    },
    {
      "id": "4672fe1b-e0e4-4e3b-9cc3-e1d5d660a1bc",
      "name": "Brand Details (Purpose: Adds context about your brand for AI analysis)",
      "type": "n8n-nodes-base.set",
      "position": [
        -608,
        592
      ]
    },
    {
      "id": "a21d1b6e-5503-4638-8bdb-742a374692bb",
      "name": "Model Selector (Chooses which AI model to use for analysis)",
      "type": "@n8n/n8n-nodes-langchain.modelSelector",
      "position": [
        -512,
        800
      ]
    },
    {
      "id": "4fefbb93-82cb-4c47-b422-e69b744babb7",
      "name": "Ensures AI output follows specific JSON format",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -192,
        992
      ]
    },
    {
      "id": "f8c2790a-ce96-489a-abee-7c0c603cfba0",
      "name": "Code (Converts AI analysis into formatted reports)",
      "type": "n8n-nodes-base.code",
      "position": [
        32,
        592
      ]
    }
  ],
  "connections": {
    "AI Agent": {
      "main": [
        [
          {
            "node": "Code (Converts AI analysis into formatted reports)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Model Selector (Chooses which AI model to use for analysis)",
            "type": "ai_languageModel",
            "index": 1
          }
        ]
      ]
    },
    "DeepSeek Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Model Selector (Chooses which AI model to use for analysis)",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Split HTTP Response": {
      "main": [
        [
          {
            "node": "Code (Google Ads Data Cleaner & Metrics Calculator)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "xAI Grok Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Model Selector (Chooses which AI model to use for analysis)",
            "type": "ai_languageModel",
            "index": 2
          }
        ]
      ]
    },
    "Anthropic Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Model Selector (Chooses which AI model to use for analysis)",
            "type": "ai_languageModel",
            "index": 3
          }
        ]
      ]
    },
    "Prepare Data for LLM": {
      "main": [
        [
          {
            "node": "Brand Details (Purpose: Adds context about your brand for AI analysis)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Google Campaigns": {
      "main": [
        [
          {
            "node": "Get Only 'Enabled/Active' Campaigns",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get a campaign in Google Ads": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get Only 'Enabled/Active' Campaigns": {
      "main": [
        [
          {
            "node": "Filtering For A Specific Search Google Campaign",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code (Google Ads Metrics Aggregator)": {
      "main": [
        [
          {
            "node": "Prepare Data for LLM",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger (Start Everyday at 8AM)": {
      "main": [
        [
          {
            "node": "Fetch Google Campaigns",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extracting Search Terms In The Past 14 Days": {
      "main": [
        [
          {
            "node": "Split HTTP Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Ensures AI output follows specific JSON format": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Filter (Filtering Out Brand and Excluded Terms)": {
      "main": [
        [
          {
            "node": "Code (Google Ads Metrics Aggregator)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filtering For A Specific Search Google Campaign": {
      "main": [
        [
          {
            "node": "Extracting Search Terms In The Past 14 Days",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code (Converts AI analysis into formatted reports)": {
      "main": [
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          },
          {
            "node": "Create message",
            "type": "main",
            "index": 0
          },
          {
            "node": "Rapiwa",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send a message1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code (Google Ads Data Cleaner & Metrics Calculator)": {
      "main": [
        [
          {
            "node": "Filter (Filtering Out Brand and Excluded Terms)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Model Selector (Chooses which AI model to use for analysis)": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Brand Details (Purpose: Adds context about your brand for AI analysis)": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}