{
  "name": "Extract Google Trends keywords & summarize articles in Google Sheets",
  "nodes": [
    {
      "id": "084bcc9e-9d05-4b69-8cb1-eccdcb67358e",
      "name": "When clicking ‘Test workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        500,
        720
      ]
    },
    {
      "id": "f593e3f1-adea-4ef7-9779-4f2436fe7774",
      "name": "XML",
      "type": "n8n-nodes-base.xml",
      "position": [
        1540,
        880
      ]
    },
    {
      "id": "5906371f-d5da-4141-876f-542cb5d0d1a8",
      "name": "GoogleTrends",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1280,
        880
      ]
    },
    {
      "id": "7badc1ad-48c2-4142-88bb-fa3f442abd66",
      "name": "CONFIG",
      "type": "n8n-nodes-base.set",
      "position": [
        760,
        880
      ]
    },
    {
      "id": "b92ad672-ea1d-4b5b-ae1d-0aa883c5db9a",
      "name": "Get saved keywords",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1020,
        880
      ]
    },
    {
      "id": "e5639494-d757-442f-942f-75927ecadd86",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        740,
        1380
      ]
    },
    {
      "id": "2c81d605-6749-47a2-95ba-846d86388c04",
      "name": "Mapping",
      "type": "n8n-nodes-base.set",
      "position": [
        1000,
        1380
      ]
    },
    {
      "id": "5ca98d8f-0bc6-4b77-a367-81ed2509deba",
      "name": "Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1580,
        1180
      ]
    },
    {
      "id": "41fcb412-ea5d-4adc-8d40-d72398537150",
      "name": "New keywords",
      "type": "n8n-nodes-base.code",
      "position": [
        1780,
        880
      ]
    },
    {
      "id": "56a953da-15a7-48da-a299-c53a7947c45e",
      "name": "content1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1020,
        1700
      ]
    },
    {
      "id": "e3dbb73f-eac8-47aa-b621-0775dd09c5bf",
      "name": "content2",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1280,
        1700
      ]
    },
    {
      "id": "0723267a-5e4e-40e2-87bf-4c215c79b66c",
      "name": "content3",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1560,
        1700
      ]
    },
    {
      "id": "8621b782-a182-479a-afa1-de0b525d3909",
      "name": "Start every hour past 11 minutes",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        500,
        880
      ]
    },
    {
      "id": "d04e89cd-a578-45d9-88f2-be4c72407049",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        420,
        560
      ],
      "parameters": {
        "width": null,
        "height": 1300,
        "content": "## Cron trigger\nGoogle Trends update the RSS feed every 10 minutes. This will start wordflow 1 minute after. "
      }
    },
    {
      "id": "4644b6ca-43da-42ab-870c-eeb52610208c",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        680,
        560
      ],
      "parameters": {
        "width": null,
        "height": 480,
        "content": "## CONFIGURATION\nmin_traffic is a numeric value. Google Trend RSS has an approx traffic value 100, 200, 500, 1000 etc.\n\nmax_result is a numeric value used to limit max rss to scrape\n\njina_key is the j"
      }
    },
    {
      "id": "b4ac3f6a-dc72-4e3e-9fa1-80298a66ddf9",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        940,
        560
      ],
      "parameters": {
        "width": null,
        "height": 480,
        "content": "## Google Sheet Database\nThis is main sheet where all your Editorial plan will be saved.\n\nThe column status value could be a trigger for other automations"
      }
    },
    {
      "id": "09fa9ed7-2557-46ae-857f-e251bf25b10e",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1200,
        560
      ],
      "parameters": {
        "width": null,
        "height": 480,
        "content": "## Google Trends request\n\nWe get last kwyword in trend. Every item has a main keyword and 3 URL. We will use those url to scrape content and generate a combined summary"
      }
    },
    {
      "id": "6d3d6f90-4eae-4239-b8cd-bfdb40bf01e9",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1460,
        560
      ],
      "parameters": {
        "width": null,
        "height": 480,
        "content": "## Simple conversion\n\nConverts XML RSS into a more readable json object"
      }
    },
    {
      "id": "3b5dd19f-ac2d-426b-8853-1af3819e10f6",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1720,
        560
      ],
      "parameters": {
        "width": null,
        "height": 480,
        "content": "## Building dataset\n\nHere we limits results, filter by mmin traffic and we flat the RSS structure to adapt to Google Sheet, fields are renamed as per description.\n\nThen RSS result and Google Sheet is "
      }
    },
    {
      "id": "cce50db5-6566-439c-9b90-3f8720411613",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        940,
        1080
      ],
      "parameters": {
        "width": null,
        "height": 460,
        "content": "## Data mapping\n\nHere you have all fields needed in Google Sheet.\n\nWhile done, the content of 3 website linked in Google Trends RSS will be merged in a single Summary field"
      }
    },
    {
      "id": "d57a8c16-21c6-4388-bb91-093428061ac5",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1200,
        1080
      ],
      "parameters": {
        "width": null,
        "height": 460,
        "content": "## Data check\n\nSometimes scraping HTML content fails (for some reasons), that's normal but this should avoid to save a zero content if all 3 scraping nodes will fail"
      }
    },
    {
      "id": "2bcbf0a9-423d-45eb-a444-ab2140db2db6",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        680,
        1080
      ],
      "parameters": {
        "width": null,
        "height": 460,
        "content": "## Data mapping\n\nHere you have all fields needed in Google Sheet.\n\nWhile done, the content of 3 website linked in Google Trends RSS will be merged in a single Summary field"
      }
    },
    {
      "id": "692b342c-c252-48c6-ad11-b58906aa62e2",
      "name": "If we have scraped min 1 url -> Save",
      "type": "n8n-nodes-base.if",
      "position": [
        1280,
        1380
      ]
    },
    {
      "id": "f2f94f0b-dcb4-4b52-86f8-c92aa2fc3d88",
      "name": "All scraping node failed. Don't save record without summary",
      "type": "n8n-nodes-base.noOp",
      "position": [
        1580,
        1380
      ]
    },
    {
      "id": "d3f42eb0-5e37-40ff-a476-46b6384f2647",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        680,
        1560
      ],
      "parameters": {
        "width": 1280,
        "height": 300,
        "content": "## Scraping\n\nHere jina.ai will get text content from 3 Google Trends URLs"
      }
    },
    {
      "id": "8178a70e-f3d2-4157-8f4b-9adaf8932e8e",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1460,
        1080
      ],
      "parameters": {
        "width": 500,
        "height": 460,
        "content": "## Saving output\n\n"
      }
    }
  ],
  "connections": {
    "XML": {
      "main": [
        [
          {
            "node": "New keywords",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "CONFIG": {
      "main": [
        [
          {
            "node": "Get saved keywords",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Mapping": {
      "main": [
        [
          {
            "node": "If we have scraped min 1 url -> Save",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "content1": {
      "main": [
        [
          {
            "node": "content2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "content2": {
      "main": [
        [
          {
            "node": "content3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "content3": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GoogleTrends": {
      "main": [
        [
          {
            "node": "XML",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "New keywords": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "Mapping",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "content1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get saved keywords": {
      "main": [
        [
          {
            "node": "GoogleTrends",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Start every hour past 11 minutes": {
      "main": [
        [
          {
            "node": "CONFIG",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "CONFIG",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If we have scraped min 1 url -> Save": {
      "main": [
        [
          {
            "node": "Google Sheets",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "All scraping node failed. Don't save record without summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}