Quick overview
This workflow runs manually or weekly to identify “striking distance” SEO pages from Google Search Console, pull first-page SERP references via Thordata, compare your page content against rivals, generate a single prioritized improvement with OpenAI, log results to Google Sheets, and post a run digest to Slack.
How it works
- Runs on a manual trigger for testing or every Monday at 09:00 (Asia/Shanghai) on a schedule.
- Queries the Google Search Console Search Analytics API for two date windows and selects pages with enough impressions and average positions in the configured range.
- For each unique query, calls Thordata SERP API (Google Search) to collect first-page organic results and choose a small set of rival reference URLs.
- Fetches the HTML for the target page and reference pages, then extracts titles, meta descriptions, headings, and opening text to build an evidence bundle per opportunity.
- When there is readable target and reference evidence, sends the evidence to OpenAI to return one JSON recommendation (missing topics, recommended action, intent match, confidence, and cited URLs).
- Writes all opportunity rows (analysed and manual-review) into a Google Sheets worksheet and composes a summary digest with run status, limitations, and request counts.
- Posts the digest message to the configured Slack channel.
Setup
- Add Google API (service account) credentials with access to your Google Search Console property and include the
https://www.googleapis.com/auth/webmasters.readonly scope for the HTTP requests.
- Install
n8n-nodes-thordata and add Thordata SERP API credentials for the Google Search operation.
- Add OpenAI credentials and set a valid model ID in the Settings node (for example
gpt-4o-mini).
- Add Google Sheets OAuth2 credentials with edit access, create a worksheet named Striking Distance with the provided 41-column header template, and set the spreadsheet ID in Settings.
- Add Slack credentials with
chat:write, invite the bot to your channel, and paste the Slack channel ID into Settings (then test with max_pages=1 before enabling the schedule).