SERP Keyword Ranking Data Logger using RapidAPI & Google Sheets - n8n Workflow

Automate keyword SERP ranking checks using this powerful n8n workflow. Log country-specific search results directly into Google Sheets using RapidAPI integration. Find more n8n templates here.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • SEO Professionals who need to track keyword visibility across different regions.

  • Digital Marketing Agencies requiring automated SERP data collection.

  • Teams looking for robust n8n templates to handle external API integrations.

  • Users who need a straightforward n8n trigger based on form submissions.

Overview

This automation provides an efficient way to automate the typically tedious task of checking Search Engine Results Page (SERP) rankings. By utilizing a form-based n8n trigger, users can quickly input a keyword and target country. The n8n workflow then interacts with the powerful SERP Keyword Ranking Checker API on RapidAPI.

Crucially, this n8n workflow incorporates conditional logic using an If n8n node to determine if valid data was returned. It ensures that regardless of the API response (success or failure), a record is logged in Google Sheets—either the full SERP data or a 'No result found' status. This high-utility n8n template helps maintain data integrity and provides real-time tracking for key SEO metrics.

How it Works

The entire process is initiated by the On form submission n8n trigger:


  1. Data Input: The n8n workflow starts when a user submits the built-in form, providing a keyword (e.g., 'labubu') and a Country code (e.g., 'us').

  2. Variable Storage: The Global Storage n8n node captures these inputs and sets them as global variables for easy access in subsequent steps.

  3. API Request: The SERP Keyword Ranking Checker n8n node sends a POST request to the specified RapidAPI endpoint. It dynamically injects the keyword and country values from the stored variables.

  4. Conditional Check: The If n8n node evaluates the API response. It specifically checks if the serpResults array in the JSON response is not empty.

  5. Data Handling (True Branch): If results are found, the workflow pauses briefly using a Wait1 n8n node (5-second delay) before the final step.

  6. Data Logging (True Branch): The first Google Sheets n8n node appends the original keyword, country, and the complete SERP JSON data into the designated spreadsheet.

  7. No Data Handling (False Branch): If the results are empty, the workflow pauses briefly using a separate Wait n8n node (5-second delay).

  8. Error Logging (False Branch): The second Google Sheets1 n8n node appends the original keyword and country, along with the message: 'No result found. Please try another keyword...', ensuring all attempts are logged.

Installation Guide

To deploy this n8n workflow and start automating your keyword research, follow these steps:


  1. Import the n8n template: Copy the provided JSON code and import it into your n8n instance via the Workflows section (New > Import from JSON).

  2. Configure Credentials: You will need to set up two main credentials:

Google Sheets: Connect your Google service account credentials to the two Google Sheets n8n nodes. Ensure the account has write access to the target spreadsheet.
RapidAPI: In the SERP Keyword Ranking Checker n8n node, update the x-rapidapi-key header parameter with your personal key for the specified API.

  1. Specify Target Sheet: In both Google Sheets n8n nodes, ensure the correct Document ID and Sheet Name (e.g., 'Sheet1') are selected.

  2. Activate the n8n trigger: The On form submission n8n node is the n8n trigger. After saving, ensure the workflow is active to allow submissions to be processed.

Node Details


  • On form submission (n8n trigger): This is the starting n8n node. It generates a public web form allowing users to input the necessary keyword and Country data, initiating the entire n8n workflow.

  • Global Storage (Set n8n node): Essential for maintaining data context. It extracts and stores the input keyword and Country values, making them reusable in the complex subsequent API call.

  • SERP Keyword Ranking Checker (HTTP Request n8n node): Handles the external API communication. It uses a POST method, multipart-form-data content type, and relies on stored data expressions (={{ $json.keyword }}) to dynamically construct the request body for the RapidAPI service.

  • If (Core Logic n8n node): Manages conditional flow control. It checks if the API response contains a non-empty serpResults array. This ensures the n8n workflow takes the appropriate action based on the availability of data.

  • Wait / Wait1 (Utility n8n node): Both Wait n8n nodes introduce a necessary 5-second pause to prevent potential rate-limiting issues when interacting with the upstream API or the downstream Google Sheets service.

  • Google Sheets / Google Sheets1 (Google Sheets n8n node): These n8n nodes handle the final logging operation. They append a new row, mapping the original inputs (Keyword, Country) along with either the comprehensive JSON data (success path) or the failure message (failure path).

Related n8n Workflows

Free

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

Featured*