Automated SEMrush Traffic Data Logger to Google Sheets - n8n Workflow

Use this powerful n8n workflow to automatically retrieve website traffic metrics from the SEMrush API via a submission form and log all results directly into Google Sheets. Simplify your marketing data aggregation with this essential n8n template.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

SEO Managers and Analysts needing to track competitor or client website metrics efficiently.
Marketing Agencies looking to automate traffic reporting and reduce manual data entry.
Users seeking robust n8n templates for integrating premium APIs (like RapidAPI/SEMrush) with cloud storage tools.
Developers and power users building custom data pipelines using n8n.

Overview

Manually checking website traffic statistics across dozens of domains and aggregating that data into a spreadsheet is time-consuming and error-prone. This specialized n8n workflow solves this by creating a simple, self-hosted web form interface. When a user enters a website URL, the powerful n8n automation instantly queries the SEMrush Website Traffic Checker API (via RapidAPI). The resulting traffic metrics—including visits, bounce rate, and session duration—are then automatically cleaned by a dedicated n8n node and appended as a new row in a designated Google Sheet. This makes tracking and analyzing historical traffic data simple and completely hands-free once the n8n workflow is set up. This versatile n8n template ensures that your data is always current and centralized.

How it Works

This automation is initiated by an interactive form, utilizing the On form submission n8n trigger.


  1. Trigger: The n8n trigger waits for a user to submit a website URL through the defined web form interface, capturing the input domain name.

  2. API Request: The website traffic checker n8n node takes the submitted URL and executes an HTTP POST request to the SEMrush Website Traffic Checker API endpoint on RapidAPI, fetching the raw traffic data.

  3. Data Processing: The subsequent Reformat code n8n node processes the extensive JSON response from the API. It isolates and extracts only the vital trafficSummary object, ensuring clean, usable data for the spreadsheet.

  4. Logging to Sheets: Finally, the Append Data In Google Sheets n8n node uses the reformatted traffic data and appends it as a new, timestamped row to the configured Google Sheets document. This completes the cycle of this effective n8n workflow, providing automated logging.

Installation Guide

To deploy this comprehensive n8n template, follow these steps:


  1. Import the n8n workflow: Copy the provided JSON code and paste it into your n8n canvas using the 'New' -> 'Import from JSON' option.

  2. Set up SEMrush/RapidAPI Credentials: The website traffic checker n8n node requires a x-rapidapi-key. Replace the placeholder 'your key' in the HTTP Request node headers with your actual RapidAPI key, ensuring connectivity to the SEMrush endpoint.

  3. Configure Google Sheets Credentials: Create a new Google Sheets credential in n8n. In the Append Data In Google Sheets n8n node, select the newly created credential and specify the URL or ID of the Google Sheets document where you want the traffic data logged. Note that Service Account authentication is configured in this n8n workflow.

  4. Activate the Trigger: The On form submission n8n trigger must be saved and activated to generate the public webhook URL for your form.

  5. Testing: Submit a test website URL through the generated form to confirm the end-to-end functionality of the n8n workflow and verify the data appears correctly in Google Sheets.

Node Details

On form submission (n8n trigger):
Function: Serves as the primary n8n trigger, initiating the automation when a user submits a website URL via the built-in n8n form.
Key Configuration: Requires the input field website.
website traffic checker (HTTP Request n8n node):
Function: Interfaces with the external SEMrush API via RapidAPI to fetch current website traffic statistics.
Key Configuration: Uses the POST method. Dynamically injects the submitted website URL using an expression (={{ $json.website }}). Requires x-rapidapi-key and x-rapidapi-host headers for authentication.
Reformat (Code n8n node):
Function: Cleans the raw JSON payload returned by the API call, extracting only the specific traffic metrics needed for logging.
Key Configuration: Custom JavaScript code returns $input.first().json.data.semrushAPI.trafficSummary.
Append Data In Google Sheets (Google Sheets n8n node):
Function: The final action n8n node that systematically logs the extracted, clean traffic data into a specified row in Google Sheets.
Key Configuration: Operation set to Append. Requires configuration of Document ID and appropriate Google Sheets credentials (Service Account recommended).

Related n8n Workflows

Free

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

Featured*