Library / Content Writing & Generation
Content Writing & Generation
Detect decaying WordPress posts and log GPT-4 refresh briefs with Search Console and
On a schedule, it writes content with OpenAI / ChatGPT and Claude using Google Sheets, Google APIs.
What it does
## Detect decaying WordPress posts in Search Console and get AI refresh briefs ### How it works Every Monday this workflow compares the last 28 days of Google Search Console data with the 28 days before and flags pages whose clicks dropped past your threshold. They are ranked by clicks lost. For each page it compares queries one by one to see which ones lost clicks and which new ones appeared, pulls the full article from WordPress (or the live HTML for non-WordPress URLs), and an LLM writes a refresh brief: diagnosis, likely causes, concrete actions, new sections to add and a suggested title. Briefs land in Google Sheets as pending. It also measures the result. When you finish rewriting a page, set its status to refreshed. The next run stamps today's date in refreshed_at (or keeps the date you typed). Once 28 days of post-refresh data exist, it compares clicks in the 28 days before and after the refresh, writes clicks_before, clicks_after and refresh_result, and sets status to measured. ### Setup steps - Search Console: create a Google OAuth2 API credential with scope https://www.googleapis.com/auth/webmasters.readonly and select it in the five Search Console HTTP nodes. - Google Sheets: create a tab named Refresh Log with this header row: page_url | wp_id | wp_type | last_modified | clicks_prev | clicks_now | click_change | lost_clicks | position_prev | position_now | lost_queries | new_queries | priority | diagnosis | actions | new_sections | suggested_title | status | detected_at | refreshed_at | clicks_before | clicks_after | refresh_result - WordPress: create an Application Password and a WordPress API credential for the three WordPress nodes. Read-only access is enough. This workflow never writes to your site. - AI model: add OpenAI credentials, or swap the chat model for Claude, Gemini or another model. - Config: set gsc_property (e.g. sc-domain:example.com or https://example.com/), wp_base_url, sheet_id and language. - Run Manual Workflow Trigger once with max_per_run = 2 and check the sheet. ### Sheet statuses pending → you rewrite the page → refreshed → measured automatically → measured. Use skipped to dismiss a brief. Pages with an open brief are never re-flagged, and others wait cooldown_days. ### Customization - drop_threshold (0.3 = clicks down 30% or more) and min_prev_clicks control sensitivity. - compare_days sets both the comparison wind
The steps
- When Monday at 7am
- Manual Workflow Trigger
- Set GSC and WP Config
- Read Log from Google Sheets
- Post Current Period Pages
- Post Previous Period Pages
- Identify Decaying Pages
- Get WP Posts by Slug
- Get WP Pages by Slug
- Match WP Page IDs
- Post Current Period Queries
- Post Previous Period Queries
- Analyze Query Changes
- If WordPress Match
28 steps in total.
Similar automations
Data Sync & ETLCreate SEO refresh tasks with Google Search Console, Glasser, Claude and Sheets26 stepsReports, Analytics & DashboardsExport Google Search Console Data to Google Sheets14 stepsReports, Analytics & DashboardsOptimize SEO with Search Console, Analytics and OpenAI23 stepsAI Agents & AssistantsChat with Search Console Data Using OpenAI and Postgres16 steps