{
  "name": "Google Trends Scraper: All-in-One Keywords & Trends 📈 — Automated Extraction to CSV & Sheets (UnitBytes)",
  "nodes": [
    {
      "parameters": {
        "content": "## ⚡ Google Trends Scraper: All-in-One Keywords & Trends 📈 — Automated n8n Pipeline\n**Powered by [UnitBytes on Apify](https://apify.com/unitbytes/google-trends-scraper?fpr=939u3w&fp_sid=n8n_template)** ($0.00045 / item)\n\n### 🚀 30-Second Setup Instructions\n1. **Get your free Apify API Token**: Open [google-trends-scraper on Apify Store](https://apify.com/unitbytes/google-trends-scraper?fpr=939u3w&fp_sid=n8n_template) and copy your API token from **Settings → Integrations**.\n2. **Paste your token & search parameters**: Double-click the **\"1. Set Apify Token & Input\"** node and replace `YOUR_APIFY_API_TOKEN` with your token.\n3. **Click \"Test Workflow\"**: The HTTP Request node calls the synchronous UnitBytes Apify endpoint, normalizes the extracted records, and exports a clean CSV file ready for Google Sheets, Airtable, Slack, or OpenAI.\n\n📖 **Documentation & Schema Reference**: [https://unitbytes.com/actors/google-trends-scraper/](https://unitbytes.com/actors/google-trends-scraper/)",
        "height": 340,
        "width": 520,
        "color": 4
      },
      "id": "6f62d983-6517-565a-add7-a2fb355c8dc1",
      "name": "Sticky Note — Setup Guide",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        180,
        80
      ]
    },
    {
      "parameters": {
        "content": "### 📊 Connect Your Destination\nThe **\"3. Normalize Output Fields\"** node outputs flat records (`scrape_type, event_index, error, keyword, value`).\n\n- **Google Sheets / Airtable**: Connect a Google Sheets (`Append or Update Row`) node after Step 3.\n- **Slack / Telegram / Email Alerts**: Connect a Filter node + Slack node to alert your team on new deals or reviews.\n- **AI Agent / OpenAI**: Connect an OpenAI / LLM Chain node to summarize or classify extracted items.",
        "height": 220,
        "width": 420,
        "color": 5
      },
      "id": "9796004b-3089-589e-857d-815050404679",
      "name": "Sticky Note — Destinations",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        880,
        140
      ]
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours",
              "hoursInterval": 24
            }
          ]
        }
      },
      "id": "b45e2b7e-de41-58a4-b080-adf2a206f595",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        220,
        480
      ]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "fd6495c3-b34f-5cd6-80d6-570b351d26ce",
              "name": "apifyToken",
              "value": "YOUR_APIFY_API_TOKEN",
              "type": "string"
            },
            {
              "id": "9b254aa7-17b1-5fc6-92c3-89428ed60158",
              "name": "actorInput",
              "value": "{\"keywords\": [\"OpenAI\", \"ChatGPT\"], \"custom_timeframe\": \"2023-01-01 2023-12-31\", \"common_geo\": \"US\"}",
              "type": "object"
            }
          ]
        },
        "options": {}
      },
      "id": "158b6e3a-11e3-5943-a691-2c8c267a5bee",
      "name": "1. Set Apify Token & Input",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        460,
        480
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "=https://api.apify.com/v2/acts/unitbytes~google-trends-scraper/run-sync-get-dataset-items?token={{ $json.apifyToken }}&format=json&clean=true",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify($json.actorInput) }}",
        "options": {
          "timeout": 300000
        }
      },
      "id": "210275ea-0295-5b0d-8c42-5abd706382e0",
      "name": "2. Run UnitBytes (google-trends-scraper)",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        700,
        480
      ]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "6160044b-d53f-5f8a-9848-568f4f5e7a39",
              "name": "scrape_type",
              "value": "={{ $json.scrape_type }}",
              "type": "string"
            },
            {
              "id": "fc92bd57-180c-5652-a807-646b247b2aef",
              "name": "event_index",
              "value": "={{ $json.event_index }}",
              "type": "string"
            },
            {
              "id": "ae6919fb-ee6e-554e-a878-c6f5b641e21d",
              "name": "error",
              "value": "={{ $json.error }}",
              "type": "string"
            },
            {
              "id": "4714c849-7d89-56d9-b1bb-17e33663646c",
              "name": "keyword",
              "value": "={{ $json.keyword }}",
              "type": "string"
            },
            {
              "id": "eb2b5500-cfc0-55b3-a984-29159d1a5589",
              "name": "value",
              "value": "={{ $json.value }}",
              "type": "string"
            },
            {
              "id": "8dd19199-1cb0-5daf-8531-c1f6c312e5b9",
              "name": "date",
              "value": "={{ $json.date }}",
              "type": "string"
            }
          ]
        },
        "includeOtherFields": true,
        "options": {}
      },
      "id": "1252e5ac-772a-5ec3-81d3-1229c771bbda",
      "name": "3. Normalize Output Fields",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        940,
        480
      ]
    },
    {
      "parameters": {
        "operation": "csv",
        "options": {
          "fileName": "google-trends-scraper-dataset-export.csv"
        }
      },
      "id": "7bd8b548-7b9b-5048-9883-400174fc2df1",
      "name": "4. Export to CSV File",
      "type": "n8n-nodes-base.convertToFile",
      "typeVersion": 1.1,
      "position": [
        1180,
        480
      ]
    }
  ],
  "connections": {
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "1. Set Apify Token & Input",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "1. Set Apify Token & Input": {
      "main": [
        [
          {
            "node": "2. Run UnitBytes (google-trends-scraper)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "2. Run UnitBytes (google-trends-scraper)": {
      "main": [
        [
          {
            "node": "3. Normalize Output Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "3. Normalize Output Fields": {
      "main": [
        [
          {
            "node": "4. Export to CSV File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "meta": {
    "templateCredsSetupCompleted": false,
    "instanceId": "030f9420-0ca8-5240-8fe8-208e287a8b19"
  },
  "tags": [
    {
      "name": "Web Scraping"
    },
    {
      "name": "Apify"
    },
    {
      "name": "UnitBytes"
    },
    {
      "name": "SEO & Market Trends"
    }
  ]
}