Automated SEO Data Logger using RapidAPI and Google Sheets - n8n Workflow

Use this powerful n8n workflow to automatically track website traffic and backlink metrics via a RapidAPI connector (Ahref data source), logging all results directly into Google Sheets for deep analysis.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • SEO professionals needing automated, centralized data logging.

  • Digital Marketing agencies tracking client website performance.

  • Analysts requiring structured historical data for traffic and backlink audits.

  • Users looking for advanced n8n templates involving external API integration and Google Sheets.

Overview

Managing and analyzing continuous SEO data, especially backlink and traffic metrics, can be manually intensive. This pre-built n8n workflow solves this by providing a hands-off automation pipeline. Starting with a simple form submission, this powerful n8n workflow utilizes an external API (simulating Ahref data access) to retrieve vast amounts of data for any specified domain. The core value lies in its reliability: it automatically branches the execution flow using an If n8n node. If the API call succeeds, data is parsed and logged accurately into two separate Google Sheet tabs. If the retrieval fails, it utilizes an Email Send n8n node to alert the administrator immediately, preventing silent failures. This robust n8n automation ensures your tracking data is always fresh, organized, and available for review, making it one of the most effective n8n templates for digital marketers.

How it Works

This comprehensive n8n workflow begins with the On form submission n8n trigger.


  1. Trigger & Capture: The user submits a target domain name via a simple web form created by the n8n trigger node.

  2. Set Variable: The input domain is captured and stored using the Set Domain Value n8n node for easy referencing in later steps.

  3. API Request: The Check Website Traffic API n8n node executes an HTTP POST request to the RapidAPI endpoint, passing the domain and necessary API key authentication headers.

  4. Error Handling (If Node): The Check if API Call Succeeded n8n node inspects the HTTP status code.

Success (Status 200): The workflow splits into two parallel paths for data extraction.
Failure (Not 200): The Send Failure Email Alert n8n node is executed, notifying an administrator that data retrieval failed for the specified domain.

  1. Data Extraction & Logging (Backlinks): On the success branch, the Extract Backlink Info n8n node uses custom code to isolate the backlinksinfo object. This data is then recorded by the Log Backlinks to Sheet Google Sheets n8n node.

  2. Data Extraction & Logging (Traffic): Concurrently, the Extract Traffic Info n8n node isolates the detailed trafficanalysis data. This is appended using the Log Traffic to Sheet Google Sheets n8n node, leveraging automatic data mapping to populate all available traffic metrics.

Installation Guide

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


  1. Import: Copy the provided JSON code and import it into your self-hosted or cloud n8n instance.

  2. RapidAPI Configuration: Locate the Check Website Traffic API n8n node. You must update the x-rapidapi-key header parameter with your actual key for the Ahref traffic checker service.

  3. Google Sheets Credentials: Configure the credentials for the two Google Sheets n8n node actions (Log Backlinks to Sheet and Log Traffic to Sheet). Use a Service Account for robust, background access.

Provide the Document ID (URL) for your target Google Sheet spreadsheet in both nodes.
Ensure your spreadsheet has tabs named appropriately (or configured via GID) to receive Backlink Info and Traffic Data.

  1. Email Setup: Update the Send Failure Email Alert n8n node with valid SMTP credentials and update the toEmail address for receiving alerts.

  2. Activate: Save and activate the n8n workflow. You can then use the webhook URL provided by the On form submission n8n trigger to input domains.

Node Details

This powerful n8n workflow utilizes specialized nodes for data handling and integration:

On form submission (Form Trigger): This n8n trigger starts the execution flow upon form submission. It is configured to capture a mandatory field named 'Domain', acting as the entry point for the n8n automation.
Set Domain Value (Set n8n Node): A utility n8n node used to explicitly capture and name the domain input ({{ $json.Domain }}) for easier and safer data referencing throughout the subsequent steps of the n8n workflow.
Check Website Traffic API (HTTP Request n8n Node): Sends the domain data to the specified RapidAPI endpoint. Key configuration includes using the POST method, multipart-form-data content type, and injecting required authentication headers (x-rapidapi-host, x-rapidapi-key).
Check if API Call Succeeded (If n8n Node): The primary control flow n8n node. It checks if the HTTP Request returned a statusCode of 200, routing the workflow to success or failure paths.
Extract Backlink Info / Extract Traffic Info (Code n8n Nodes): These are critical steps using custom JavaScript to parse the large JSON response payload, extracting only the relevant backlinksinfo and trafficanalysis objects needed for logging.
Log Backlinks to Sheet / Log Traffic to Sheet (Google Sheets n8n Node): The final actions. They are configured to append data. The traffic node uses autoMapInputData to log dozens of different traffic metrics, making this n8n node highly effective for detailed reporting.

Related n8n Workflows

Free

Nodes: 8 Nodes
Updated: December 26 2025
View all
Created by
Sk developer
Sk developer

Featured*