AI Mode Source Reference Tracker using DataForSEO and Google Sheets - n8n Workflow

Automate SERP tracking for Google's AI Mode answers. This n8n workflow uses the DataForSEO n8n node to extract source references and log them directly into Google Sheets on a schedule.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

SEO professionals monitoring AI Search Engine Results Pages (SERPs).
Marketing analysts tracking visibility in Google's AI answers.
Users looking for advanced DataForSEO automation using an n8n node.
Anyone needing robust scheduled data logging with an n8n workflow and reliable n8n templates.

Overview

This powerful n8n workflow provides a critical solution for SEO specialists needing to monitor how their content is referenced within Google's increasingly prominent AI Mode search results. By leveraging the DataForSEO API via a specialized n8n node, this automation eliminates manual checks for large volumes of data. The core value of this n8n template is its scheduled reliability. The entire n8n workflow runs automatically every week, querying the AI Mode SERP for a defined keyword and automatically parsing the source references (URLs, domains, titles) directly into a structured Google Sheet. This makes tracking performance and competitive analysis straightforward, ensuring you capture every source cited by Google’s generative AI features. This pre-built n8n workflow demonstrates how easy it is to set up complex, recurring data extraction pipelines using the powerful features of the n8n platform.

How it Works

The execution of this n8n workflow begins with a foundational n8n trigger node: the Schedule Trigger.


  1. Schedule Activation: The Run evry 7 days n8n trigger starts the process weekly, ensuring recurring and timely data collection.

  2. DataForSEO Query: The Get Google AI Mode SERP Data n8n node is executed. It is configured to fetch google-ai-mode-serp data for a specific keyword (e.g., "why sky is blue"), location, and language.

  3. SERP Item Splitting: The first Split Out (items) n8n node processes the initial large API response, iterating over the primary items returned in the SERP results, preparing them for detailed parsing.

  4. Reference Extraction: The second Split Out (references) n8n node drills down further, specifically isolating the references array associated with the AI response. Each individual reference (which includes the source URL, title, and domain) becomes a unique item for the next stage of the n8n workflow.

  5. Google Sheets Logging: Finally, the Record references to your Google Sheet n8n node takes each isolated reference item. Using n8n expressions, it maps the extracted fields (url, title, domain, text, source) to corresponding columns in the target Google Sheet, appending the new record and completing the cycle of this robust n8n workflow.

Installation Guide

To deploy this n8n workflow template successfully, follow these steps:


  1. Import: Copy the provided JSON and import it into your n8n instance.

  2. DataForSEO Credentials: Set up credentials for the DataForSEO n8n node. You will need your API key and secret.

  3. Google Sheets Credentials: Configure OAuth2 credentials for the Google Sheets n8n node, granting it access to write to your designated spreadsheet.

  4. Configure SERP Data Node: In the Get Google AI Mode SERP Data n8n node, adjust the Keyword, Location, and Language parameters to match your specific tracking needs.

  5. Configure Sheets Node: In the Record references to your Google Sheet n8n node, select the correct Document ID and Sheet Name where you want the data logged.

  6. Activate: Save the n8n workflow and toggle it 'Active'. The n8n trigger will begin running on the set schedule.

Node Details

Run evry 7 days (Schedule Trigger): This acts as the essential n8n trigger for the automation. It ensures the data extraction process is repeated reliably every seven days, making the n8n workflow set-and-forget.
Get Google AI Mode SERP Data (DataForSEO n8n node): The core extraction component. Function: Queries the DataForSEO API for Google AI Mode SERP results. Key Configuration: Operation is get-google-ai-mode-serp; parameters define the target keyword and geo-location for the search.
Split Out (items) & Split Out (references) (Split Out n8n node): These two crucial flow control n8n nodes handle the complex structure of the DataForSEO response. Function: They flatten the nested JSON arrays, ensuring each individual AI reference source is treated as a separate item for processing. Key Configuration: Splits on paths like tasks[0].result[0].items and then references.
Record references to your Google Sheet. (Google Sheets n8n node): The final destination for the data extracted by the n8n workflow. Function: Appends the structured reference data to a spreadsheet. Key Configuration: Operation is Append. Data fields are dynamically mapped using n8n expressions (={{ $json.url }}, ={{ $json.title }}) to dedicated spreadsheet columns (Source, Domain, URL, Title, Text).

Related n8n Workflows

Free

Nodes: 5 Nodes
Updated: December 26 2025
View all
Created by

Featured*