{
  "id": "nBY4tiJSO0zKOUT4",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Pull references from Google's AI Overview with DataForSEO",
  "tags": [],
  "nodes": [
    {
      "id": "65a02469-2bf3-47f4-8c9c-593ca436ccc0",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -100,
        -100
      ],
      "parameters": {
        "color": 7,
        "height": 80,
        "content": "The flow will run every 7 days. Adjust the schedule if needed."
      },
      "typeVersion": 1
    },
    {
      "id": "68389fbb-5a4b-4ac7-bf3d-e6a3f91b8d88",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        160,
        -120
      ],
      "parameters": {
        "color": 7,
        "height": 100,
        "content": "Specify the necessary **Keyword**, **Location**, and **Language** you want to get data for."
      },
      "typeVersion": 1
    },
    {
      "id": "01aa19ef-4fc3-4d6d-997e-ee7a62ec3f55",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        800,
        -120
      ],
      "parameters": {
        "color": 7,
        "height": 100,
        "content": "Select the necessary Google Sheet that contains the **Source**, **Domain**, **URL**, **Title**, and **Text** columns."
      },
      "typeVersion": 1
    },
    {
      "id": "2e0fb6c2-eb8e-41a3-963a-f2c638a6c282",
      "name": "Run every 7 days",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        0,
        0
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "daysInterval": 7
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "e1491bb5-d8d2-4000-8100-b2b9cc8114ee",
      "name": "Split Out (items)",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        440,
        0
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "tasks[0].result[0].items"
      },
      "typeVersion": 1
    },
    {
      "id": "4655bb43-6a14-4a38-9f54-2a9bd50dd0ce",
      "name": "Split Out (references)",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        660,
        0
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "references"
      },
      "typeVersion": 1
    },
    {
      "id": "25116900-69eb-4efa-b15c-490809b84118",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -460,
        -160
      ],
      "parameters": {
        "width": 340,
        "height": 340,
        "content": "This n8n template automatically collects all source references from Google\u2019s AI Overview for any keyword you choose using DataForSEO and Google Sheets. \n\nWhat it does:\n\n* Uses DataForSEO API to fetch AI Overview results.\n* Extracts the source title, URL, and domain.\n* Stores the data in Google Sheets.\n\nYou can use this data to track your website\u2019s presence in AI-generated snippets.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "d552d5b3-9297-48c6-ae9b-0bf19cac25c1",
      "name": "Get Google AI Overview SERP Data",
      "type": "n8n-nodes-dataforseo.dataForSeoSerpApi",
      "position": [
        220,
        0
      ],
      "parameters": {
        "keyword": "why sky is blue",
        "operation": "get-live-google-organic-serp-advanced",
        "language_name": "english",
        "location_name": "united states",
        "max_crawl_pages": {},
        "browser_screen_width": {},
        "browser_screen_height": {},
        "load_async_ai_overview": true,
        "people_also_ask_click_depth": {},
        "browser_screen_resolution_ratio": {}
      },
      "credentials": {
        "dataForSeoApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "4280384e-1ccb-4afd-807e-31cf05a36b3b",
      "name": "Record references to your Google Sheet.",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        880,
        0
      ],
      "parameters": {
        "columns": {
          "value": {
            "URL": "={{ $json.url }}",
            "Text": "={{ $json.text }}",
            "Title": "={{ $json.title }}",
            "Domain": "={{ $json.domain }}",
            "Source": "={{ $json.source }}"
          },
          "schema": [
            {
              "id": "Source",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Source",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Domain",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Domain",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "URL",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "URL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Title",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Text",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Text",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1XCjkjyVxrtpTUQenHeR3B07xfEZ489mhuVidjhGOO7I/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1XCjkjyVxrtpTUQenHeR3B07xfEZ489mhuVidjhGOO7I",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1XCjkjyVxrtpTUQenHeR3B07xfEZ489mhuVidjhGOO7I/edit?usp=drivesdk",
          "cachedResultName": "Scraping references"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.5
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "c7c14e05-61cb-48b0-9091-b25406dc2b91",
  "connections": {
    "Run every 7 days": {
      "main": [
        [
          {
            "node": "Get Google AI Overview SERP Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out (items)": {
      "main": [
        [
          {
            "node": "Split Out (references)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out (references)": {
      "main": [
        [
          {
            "node": "Record references to your Google Sheet.",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Google AI Overview SERP Data": {
      "main": [
        [
          {
            "node": "Split Out (items)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}