עברית 📰 Blog
← Back to Blog
Automation

Automate SEO Keyword Ranking Reports with n8n, Bright Data, OpenAI and Google Sheets

Claudia
Masterphub AI
November 7, 2026

Share this article

Automate SEO Keyword Ranking Reports with n8n, Bright Data, OpenAI and Google Sheets

Stop checking rankings manually. Start treating SEO visibility as business data.

Anyone managing a website, online store, or content operation knows the routine: open Google, search for a keyword, look for your website, write down its position, repeat for the next keyword, and try to remember what changed since last week.

The process is repetitive and time-consuming. More importantly, a single ranking number rarely tells the whole story. You need to know the search location, language, device, competing pages, and whether a ranking change is part of a trend or simply a temporary fluctuation.

This workflow turns that routine into an automated reporting process.

Using n8n, you can read a keyword list, send scheduled search requests through Bright Data, identify your domain in the results, analyze competitors, and store every check in Google Sheets. OpenAI can add a layer of interpretation by summarizing changes and suggesting what deserves a closer look.

There is one important distinction: a position observed in an external search results page is not the same as your website’s performance data in Google Search Console. A useful SEO reporting system should understand both sources and use them for different purposes.

What the workflow does

The basic workflow performs six jobs:

  1. Reads target keywords and the domain to monitor from Google Sheets.
  2. Runs scheduled searches through Bright Data SERP API.
  3. Finds the target domain or matching page in the organic results.
  4. Calculates the observed position and captures competing results.
  5. Sends verified data to OpenAI for summaries and analysis.
  6. Appends a new historical record to Google Sheets so results can be compared over time.

The result is a ranking history that can power weekly reports, dashboards, and alerts when important keywords move significantly.

The architecture: give each tool a clear job

Component Responsibility
n8n Scheduling, workflow orchestration, integrations, and error handling
Google Sheets Keyword configuration and ranking history
Bright Data SERP API Search result collection with location, language, and device parameters
OpenAI Summaries, trend interpretation, competitor observations, and suggested checks
Google Search Console API, optional Your site’s impressions, clicks, CTR, and average position

Keep data collection separate from interpretation. Bright Data returns the search results. Deterministic logic in n8n calculates the domain’s position. OpenAI explains what changed and what to investigate. This reduces the risk of a language model producing a plausible-sounding ranking that was never present in the source data.

What you need

  • An active n8n instance, self-hosted or hosted by a suitable provider.
  • A Bright Data account with access to SERP API, a configured SERP zone, and an API key.
  • An OpenAI API key if you want AI-generated analysis.
  • A Google account with access to Google Sheets.
  • A keyword list, target domain, and search targeting preferences.
  • A chosen reporting frequency: daily, weekly, or monthly.

A note about MCP: The original outline suggests installing an MCP Client package through Community Nodes. That is not a universal requirement. n8n includes built-in MCP components, including MCP Client and MCP Client Tool, but they are useful only when a compatible MCP server exposes the tools you need. For a direct Bright Data SERP API integration, n8n’s HTTP Request node is often the simpler starting point. Do not add an MCP layer just because it is available.

Step 1: Create the keyword tracking sheet

Create a Google spreadsheet named SEO Keyword Tracker with two tabs.

Tab 1: Keywords

Column Example Purpose
keyword best project management software Search query to monitor
domain example.com Website being tracked
country us Search country
language en Search language
device desktop Device type
location New York, NY More specific location, when needed and supported
search_engine google Search engine
active TRUE Whether this keyword should be checked
target_url https://example.com/product Preferred page, optional

You can add category, owner, priority, or target position columns. A well-structured input sheet makes reporting and filtering much easier.

Tab 2: Ranking_History

Append a new row for every check. Do not overwrite the previous result. The goal is to build a history.

Column Stored value
checked_at Check timestamp in UTC
keyword Search query
domain Tracked domain
country Search country
language Search language
device Device type
position Observed organic position, or blank if not found
ranking_url Matching page URL
top_competitors Competing domains or result URLs
serp_features SERP features detected, if returned
result_count_checked Number of results inspected
status success, not_found, or error
analysis Short AI summary
run_id Workflow execution identifier

A third Dashboard tab can display the latest position, change from the previous check, period averages, and keywords that need attention.

Step 2: Schedule the workflow in n8n

Create a new workflow and add a Schedule Trigger node.

Choose the reporting frequency. For example, run every Monday at 08:00. Set the workflow timezone explicitly so server settings or daylight saving changes do not shift the report unexpectedly.

Add a Google Sheets node and retrieve the rows from the Keywords tab. Filter out records where active is not TRUE.

Validate that each row contains at least a keyword, domain, country, and language. If a required value is missing, mark the row as invalid rather than sending an incomplete search request.

Step 3: Send a search request to Bright Data

Bright Data SERP API can return structured search results. Use n8n’s HTTP Request node to send a POST request to:

https://api.brightdata.com/request

Request headers:

Authorization: Bearer YOUR_BRIGHT_DATA_API_KEY
Content-Type: application/json

Example request body:

{
  "zone": "YOUR_SERP_ZONE",
  "url": "https://www.google.com/search?q=best+project+management+software&gl=us&hl=en&brd_json=1",
  "format": "raw"
}

In a live workflow, do not hard-code the keyword into a static URL. Build the search URL from the current row’s values, correctly encoding the query and search parameters. Store the API key in n8n Credentials, never in a visible node field or spreadsheet.

Useful parameters include:

  • q: the search query.
  • gl: the search country, such as us or il.
  • hl: the search language, such as en or he.
  • brd_json=1: requests structured JSON output.
  • start: the result offset for pagination, such as 0, 10, or 20.
  • brd_mobile: device targeting, where supported by the selected configuration.

If you are measuring local search visibility, country targeting alone may not be enough. Use the geographic targeting options supported by your Bright Data setup.

Why consistent search settings matter

A comparison is unreliable if one check runs in the United States, in English, on desktop, and the next runs in Israel, in Hebrew, on mobile. To detect meaningful movement, keep the search engine, country, language, location, device, and result depth consistent.

Step 4: Calculate the position instead of asking AI to guess

After receiving the response, use a Code node or equivalent deterministic logic to inspect the organic results and find a result belonging to the tracked domain.

Define the matching rules before you start:

  • Should www.example.com and example.com count as the same domain?
  • Should subdomains be included?
  • Are you tracking the entire domain or one specific target_url?
  • Are you counting organic results only, or also ads, maps, shopping results, and answer features?

For standard organic rank tracking, count the position in the organic result list only. Do not mix paid ads, Local Pack listings, shopping results, or AI Overviews into a conventional organic ranking number. Store those separately as SERP features when relevant.

If the domain appears in the first organic result, its position is 1. If it appears seventh, its position is 7. If it is not found within the inspected result depth, store not_found or a blank position. Do not report the position as 101 or 0 unless your reporting convention explicitly defines that value. If you inspect only the first twenty results, make that limit visible in the report.

URL matching also needs care. A result may contain tracking parameters, redirects, or a www variant. Normalize URLs before comparing them, but do not remove information that distinguishes different pages.

Step 5: Use OpenAI for analysis, not invented rankings

Once the position has been calculated from the source data, send the clean result and the previous record to OpenAI.

The model can:

  • Summarize keyword gains and losses.
  • Identify competitors that repeatedly appear in the results.
  • Highlight meaningful changes in the search results page.
  • Suggest pages that deserve review.
  • Draft a concise weekly summary.

The model should not decide the site’s position based on intuition or infer a ranking that is absent from the returned results. The position is a measured value, calculated before the AI step.

Ready-to-use analysis prompt

You are an SEO reporting analyst.

Analyze only the structured search data provided below. Do not invent rankings, URLs, competitors, dates, or metrics. Do not change the measured position.

For each keyword:

  1. Summarize the current organic position, if found.
  2. Compare it with the previous recorded position, if provided.
  3. Identify the most visible competing domains in the supplied results.
  4. Note relevant SERP features only when they appear in the source data.
  5. Explain what changed in plain language.
  6. Suggest up to three practical checks or actions.

If the domain was not found within the inspected result depth, state: "Not found within the inspected results."

Return valid JSON using this structure: { "keyword": "", "measured_position": null, "previous_position": null, "change": null, "competitor_summary": [], "serp_observations": [], "recommended_checks": [], "confidence_note": "" }

Search data: {{SERP_DATA}}

Previous record: {{PREVIOUS_RECORD}}

In n8n, use structured output or a Structured Output Parser if it is supported by your selected version and model. Still validate the JSON and confirm that any position value matches the source data. Do not use free-form AI text to populate the authoritative position column.

Step 6: Save ranking history in Google Sheets

Add another Google Sheets node and choose Append Row.

Map each field to its matching column:

  • Check timestamp.
  • Keyword.
  • Domain.
  • Country, language, and device.
  • Organic position.
  • Matching page URL.
  • Main competitors.
  • SERP features.
  • Check status.
  • AI analysis.
  • Workflow run ID.

Use Append rather than Update when you want historical tracking. Updating the same row on every run destroys previous observations and makes trend analysis impossible.

Include a run ID and timestamp to distinguish scheduled runs from manual executions. If duplicate prevention is required, define a unique key using the keyword, domain, search settings, and check date.

Step 7: Test, handle errors, and activate

Before enabling recurring runs:

  1. Start with three to five keywords.
  2. Execute the workflow manually.
  3. Inspect Bright Data’s raw response.
  4. Confirm that the position is calculated from the correct organic results.
  5. Manually verify a few results.
  6. Confirm that the history row contains every expected field.
  7. Test what happens when a result is missing, an API request fails, or a field is empty.
  8. Activate the workflow and record the first run.

Use limited retries for temporary failures, add delays between requests where appropriate, handle rate limits, and send an alert when a run fails. Do not launch hundreds of parallel requests before checking account limits and costs.

The important upgrade: add Google Search Console

This is where the workflow becomes more than a ranking report.

Bright Data answers: What appears in the search results when this keyword is searched under the settings we selected?

Google Search Console answers different questions: For which searches did our website actually appear? How many impressions and clicks did it receive? What were its CTR and average position?

The Search Console API can return data grouped by query, page, country, device, and date, subject to the service’s parameters and limitations.

Combining both sources can reveal useful situations:

  • A keyword where the site looks visible in a SERP check but receives few clicks.
  • An improving average position alongside falling impressions.
  • A page with many impressions but a low CTR.
  • A competitor repeatedly appearing above the site in SERP checks.
  • Differences between mobile and desktop search results.

Remember that Search Console average position is not the same as a one-time SERP position. It is calculated across impressions and different search contexts. Do not compare the two numbers as if they were identical measurements.

Turn the data into decisions

A useful report should do more than display a table. It should help decide what to investigate.

Possible alert rules include:

  • A drop of three or more positions across two consecutive checks.
  • A keyword disappearing from the first twenty inspected results.
  • A sharp decline in Search Console impressions or clicks.
  • A competitor gaining visibility consistently.
  • A low CTR relative to impressions.
  • A newly detected SERP feature that may affect clicks.

Do not treat every one-position movement as a crisis. Search results change, and a single measurement can be noisy. Look for patterns across multiple checks and combine ranking observations with impressions and clicks.

Limitations to understand

1. Search results are not fixed. Positions can vary by country, city, language, device, time, and search context.

2. External SERP data is not Search Console data. Bright Data provides a snapshot collected under specific conditions. It does not tell you how many people actually saw or clicked your site.

3. Inspection depth matters. If you inspect the first fifty results, you cannot conclude that a site is not ranking anywhere when it simply did not appear in those fifty.

4. SERPs contain more than organic links. Ads, maps, snippets, images, videos, shopping results, and AI Overviews can occupy prominent space. Decide whether you are measuring organic position only or tracking additional search features separately.

5. API costs matter. Search requests may be billed according to Bright Data’s current plan and pricing model. Keyword count, check frequency, pagination, and the number of target countries all affect usage. Review current pricing and terms before scaling.

6. AI can be wrong. A language model can summarize and suggest, but it should not be the source of truth for ranking metrics. Preserve raw results and validate model output.

7. Google Sheets is not an unlimited database. It is convenient for small and medium tracking projects. At larger volumes, store history in a database and use Sheets for reporting or export.

Pre-launch checklist

The takeaway

SEO monitoring should not depend on scattered manual checks and screenshots. By combining scheduling, data collection, consistent ranking calculations, and analysis, you get a system that shows not only where a website appears today, but how its visibility changes over time.

n8n orchestrates the process, Bright Data collects the search results, Google Sheets preserves the history, and OpenAI helps interpret the findings. Adding Google Search Console completes the picture with your website’s actual search performance data.

The real benefit is not just saved time. It is moving from guesswork to decisions supported by evidence.

Implementation notes and source references

The workflow above is an implementation pattern, not a claim that every n8n version or Bright Data account exposes identical settings. Confirm node names, credentials, request formats, and pricing in the current documentation before deployment.

  1. Bright Data SERP API product and request examples: https://brightdata.com/products/serp-api
  2. Bright Data SERP API reference: https://github.com/brightdata/skills/blob/main/brightdata-best-practices/references/serp-api.md
  3. n8n MCP Client documentation: https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-langchain.mcpClient/
  4. Google Search Console Search Analytics API: https://developers.google.com/webmaster-tools/v1/searchanalytics/query
  5. Google Search Console data retrieval guidance: https://developers.google.com/webmaster-tools/v1/how-tos/all-your-data
  6. Google Search Console API usage limits: https://developers.google.com/webmaster-tools/limits
  7. Google Search Central, diagnosing search traffic changes: https://developers.google.com/search/docs/monitor-debug/debugging-search-traffic-drops

Editorial fact-check note: The technical architecture and distinctions in this article are based on the documentation linked above. Exact node labels and available options may change by n8n version. Pricing, quotas, and account eligibility may change and should be checked directly with each provider. No ranking, traffic, or performance outcome is guaranteed by implementing this workflow.

Want more like this? Get 10 free Honey Credits when you join Masterphub -> masterphub.io

Share this article