RapidAPI to Google Sheets, competitor research logged
Competitor research falls apart in the boring places. Someone runs a lookup, pastes a few rows into a sheet, forgets the date, and now your “source of truth” is a patchwork.
SEO specialists feel it first, but a marketing manager building monthly reports and a small agency owner juggling multiple client domains deal with the same mess. This RapidAPI Sheets logging automation keeps every competitor lookup captured, timestamped, and consistent.
You’ll set up an n8n workflow that takes a domain from a simple form, calls a Competitor Analysis API on RapidAPI, then writes the results into Google Sheets (or logs “not found” when the API returns nothing).
How This Automation Works
Here’s the complete workflow you’ll be setting up:
n8n Workflow Template: RapidAPI to Google Sheets, competitor research logged
flowchart LR
subgraph sg0["On form submission Flow"]
direction LR
n0@{ icon: "mdi:swap-vertical", form: "rounded", label: "Global Storage", pos: "b", h: 48 }
n1@{ icon: "mdi:swap-horizontal", form: "rounded", label: "If", pos: "b", h: 48 }
n2@{ icon: "mdi:cog", form: "rounded", label: "Wait", pos: "b", h: 48 }
n3["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/form.svg' width='40' height='40' /></div><br/>On form submission"]
n4@{ icon: "mdi:database", form: "rounded", label: "Google Sheets", pos: "b", h: 48 }
n5@{ icon: "mdi:database", form: "rounded", label: "Google Sheets1", pos: "b", h: 48 }
n6["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Competitor Analysis Request"]
n1 --> n4
n1 --> n2
n2 --> n5
n0 --> n6
n3 --> n0
n6 --> n1
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n3 trigger
class n1 decision
class n4,n5 database
class n6 api
classDef customIcon fill:none,stroke:none
class n3,n6 customIcon
Why This Matters: Competitor Research That Actually Stays Logged
“We’ll log it in the sheet later” is how competitor tracking quietly dies. In the moment, it feels faster to run a lookup, grab the interesting bits, and move on. Then the spreadsheet gets updated inconsistently, columns drift, and you stop trusting the log. Worse, when you do need the history (a quarterly review, a client call, a sudden ranking drop), you’re stuck re-running lookups and guessing what changed. Honestly, the mental overhead is the killer.
It adds up fast. Here’s where it breaks down.
- You end up doing the same RapidAPI lookup twice because nobody remembers if it was already done.
- Copy-paste logs miss context like run date, domain format, and “no data” cases, so reports turn into detective work.
- API rate limits get ignored when you’re rushing, which means failed calls and gaps in your dataset.
- Empty responses don’t get recorded, so you lose visibility into what was checked and what needs follow-up later.
What You’ll Build: RapidAPI Competitor Lookups Logged to Sheets
This workflow turns competitor research into a simple “submit and forget” process. You enter a website domain in an n8n form, and the workflow stores it as a clean variable so downstream steps don’t get messy. Next, it sends that domain to a Competitor Analysis API through RapidAPI using an HTTP POST request. A validation check confirms the response contains real competitor data (not an empty payload). If it’s valid, the workflow appends a structured row into Google Sheets so your log stays consistent. If the API returns nothing, it waits briefly to respect rate limits, then records a clear “No data found” entry instead of leaving you guessing later.
The workflow starts with form submission. Then it calls RapidAPI and checks the payload before writing to Google Sheets. Finally, it handles “missing data” cases reliably with a short wait and a separate log path.
What You’re Building
| What Gets Automated | What You’ll Achieve |
|---|---|
|
|
Expected Results
Say you track 20 domains each week. Manually, a quick competitor lookup often turns into about 10 minutes: run the request, copy results, format cells, add notes, and fix inconsistencies, so that’s roughly 3 hours weekly. With this workflow, submitting the domain takes about 1 minute, then the API call and logging runs in the background (plus a 5-second wait when needed). You get your log updated automatically, and you keep those few hours for analysis instead of spreadsheet chores.
Before You Start
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Google Sheets for the competitor research log.
- RapidAPI (Competitor Analysis API) to fetch competitor data.
- RapidAPI key (get it from the API “Endpoints” tab, in the x-rapidapi-key header).
Skill level: Beginner. You’ll connect accounts, paste an API key, and pick a target Google Sheet.
Want someone to build this for you? Talk to an automation expert (free 15-minute consultation).
Step by Step
A form submission triggers the run. You enter a domain (client site or competitor site) into the built-in n8n form, which starts the workflow immediately.
The domain gets stored cleanly. n8n saves the submitted value in a dedicated “site” field so it can be reused reliably in the API request and in your Google Sheets rows.
RapidAPI is called and the response is checked. The HTTP request sends the domain to the Competitor Analysis API, then an “If” condition confirms the payload contains real competitor data instead of an empty response.
Google Sheets is updated with the right outcome. Valid results get appended to your Results sheet. If nothing comes back, the workflow waits about 5 seconds (rate-limit friendly), then logs a “No data found” record so your tracking stays complete.
You can easily modify what fields get logged to match your reporting columns. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Form Trigger
Start by setting up the form that captures the competitor domain input.
- Add or select the Form Input Trigger node.
- Set Form Title to
Competitor Analysis. - Set Form Description to
Enter website domain to check competitor. - In Form Fields, add a field labeled Website with placeholder
e.g. instagram.comand enable Required.
Step 2: Store the Submitted Domain
Capture the form input and normalize it for downstream use.
- Add the Store Site Variable node after Form Input Trigger.
- In Assignments, set Name to
website. - Set Value to
{{ $json.Website }}. - Confirm the connection path: Form Input Trigger → Store Site Variable.
Step 3: Call the Competitor API and Validate the Payload
Send the domain to the API and validate the response before logging results.
- Add Competitor API Call and connect it from Store Site Variable.
- Set URL to
https://competitor-analysis2.p.rapidapi.com/competitor.phpand Method toPOST. - Enable Send Body and set Content Type to
multipart-form-data. - In Body Parameters, set website to
{{ $json.website }}. - In Header Parameters, set x-rapidapi-host to
competitor-analysis2.p.rapidapi.comand x-rapidapi-key to[CONFIGURE_YOUR_API_KEY]. - Add Validate API Payload and connect it from Competitor API Call.
- In Validate API Payload, keep the four conditions that check:
{{ $json.data }},{{ $json.data.semrushAPI.organicCompetitors }},{{ $json.data.semrushAPI.organicPages }}, and{{ $json.data.semrushAPI.domainOrganicSearchKeywords }}are not empty.
⚠️ Common Pitfall: The placeholder [CONFIGURE_YOUR_API_KEY] must be replaced with your real RapidAPI key or the request will fail.
Step 4: Configure Google Sheets Outputs
Log valid API results to one sheet and missing data to another path.
- Add Append Results Sheet on the true output of Validate API Payload.
- Set Operation to
appendand Authentication toserviceAccount. - Map columns in Append Results Sheet to:
- Domain →
{{ $('Store Site Variable').item.json.website }} - Organic Page →
{{ $json.data.semrushAPI.organicPages }} - Organic competitor →
{{ $json.data.semrushAPI.organicCompetitors }} - Domain organic search →
{{ $json.data.semrushAPI.domainOrganicSearchKeywords }}
- Domain →
- Add Delay Step on the false output of Validate API Payload.
- Connect Delay Step → Log Missing Data and set Operation to
appendwith AuthenticationserviceAccount. - Map columns in Log Missing Data to:
- Domain →
{{ $('Store Site Variable').item.json.website }} - Organic Page →
=Not data found. - Organic competitor →
=Not data found. - Domain organic search →
=Not data found.
- Domain →
- Verify the routing: Validate API Payload → Append Results Sheet (true), and Validate API Payload → Delay Step → Log Missing Data (false).
- Credential Required: Connect your googleApi credentials in Append Results Sheet.
- Credential Required: Connect your googleApi credentials in Log Missing Data.
Tip: Keep both Google Sheets nodes pointed at the same spreadsheet and sheet tab (Sheet1) unless you want to separate successful and missing data into different tabs.
Step 5: Test and Activate Your Workflow
Validate the end-to-end flow before enabling the workflow in production.
- Click Execute Workflow and submit the form in Form Input Trigger using a test domain.
- Confirm that Competitor API Call returns data and that Validate API Payload routes correctly.
- Check your Google Sheet to verify a new row is appended by Append Results Sheet, or by Log Missing Data if the API response is missing fields.
- Once verified, toggle the workflow to Active so the form can accept real submissions.
Troubleshooting Tips
- RapidAPI credentials can expire or you may be on the wrong plan tier. If calls suddenly fail, check your RapidAPI dashboard and confirm the key in the HTTP Request node matches the active subscription.
- If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
- Google Sheets permissions matter more than people expect. If inserts fail, open the n8n Google Sheets credential and confirm it has edit access to the exact spreadsheet (and the correct worksheet/tab name).
Quick Answers
About 30 minutes if your Sheet and RapidAPI account are ready.
No coding required. You’ll paste your RapidAPI key into the HTTP Request node and map a few fields into Google Sheets.
Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in RapidAPI pricing for the Competitor Analysis API (there’s usually a free tier, then paid usage).
Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.
Yes, and it’s the point. You can change what gets stored in Google Sheets by editing the “Append Results Sheet” and “Log Missing Data” mappings, and you can swap the “Competitor API Call” node to a different RapidAPI endpoint if your team tracks other SEO signals. Common tweaks include adding a “client name” field to the form, logging the API plan or run owner, and splitting results into separate tabs per project.
Usually it’s permissions. Make sure the Google account in your n8n credential can edit the spreadsheet, and double-check the tab name matches exactly what the node is configured to use. If it still fails, reselect the spreadsheet in the node so n8n refreshes the file reference.
Most small teams can run dozens to hundreds of lookups a week without thinking about it, as long as your RapidAPI plan supports the call volume.
It depends on how picky you are about data quality. n8n makes it straightforward to validate the API payload, route “empty response” cases to a separate logging path, and add a wait to respect rate limits without extra task costs. You also get self-hosting, which is handy if you want lots of runs without paying per execution. Zapier or Make can absolutely do “API to Google Sheets,” but handling branching and edge cases often becomes clunky (or pricey) as you scale. If you want, Talk to an automation expert and we’ll tell you which route is simpler for your exact setup.
Once this is in place, competitor research stops being a spreadsheet chore and becomes a dependable system you can build reporting on.
Need Help Setting This Up?
Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.