I’ve seen my fair share of content refresh automations in recent months. The problem is, they are too basic and don’t focus on the right metrics.

Anyone can set up an automation that scans Search Console and updates an article, but there’s more to it than that.

I’ve built several workflows that use multiple data points with AI to update content, and this is one of them.

More importantly, this is how you can do it for free within usage limits (aside from a ChatGPT or Claude subscription) because not everyone building has the budget for n8n, Zapier, APIs, and so on.

The version I use connects Google Search Console, Google Sheets, GitHub Actions, and a ChatGPT/Codex worker for the AI research and drafting stages. Google Docs holds the revised article for approval.

You can apply these principles to an n8n build or a Zapier workflow if you do use automation tools.

What Does an Automated Content Refresh Workflow Do?

An automated content refresh workflow scans published articles, finds pages worth updating, researches the likely cause of performance decline, and creates an update plan before drafting changes.

One challenge with sites that publish a lot of content is keeping everything up to date. It’s time-consuming, and for smaller teams, it prevents them from focusing on new content.

But it’s essential for SEO and now GEO/AEO to keep articles refreshed and accurate. That’s where AI automations can do a lot of the work.

My build is a mix of AI and human input with a full cycle from initiation to publication. This is a breakdown of what it does:

Step 1: GitHub Actions Collects Article and Search Console Data

The automation starts automatically through GitHub Actions (so it doesn’t incur API costs).

My setup schedules two runs a day: one prepares jobs, and a later run processes completed results.

It reads the published article list held in the Content Inventory tab of Google Sheets. That list stores each article's canonical URL, title, category, publication date, and last-modified date, so the system knows which page the search data belongs to.

Content Inventory tab in Google Sheets listing each article's canonical URL, title, category, published date, modified date, sitemap status, sitemap lastmod and last checked time

The Search Console collector retrieves clicks, impressions, CTR, and average position for the latest complete 28-day period, the preceding period, and the equivalent period a year earlier. It also collects the searches attached to each page.

Those results populate GSC Page Summary, which shows the performance comparisons, and GSC Query Detail, which shows the keywords behind them.

Everything is matched using the article URL and stamped with the date of the Search Console snapshot.

That gives the system both performance data and content history, without exporting reports manually.

This stage is more about gathering the data behind the content. No articles are selected for updating or changed on the website.

Step 2: The System Scores Pages to Prioritize Content Updates

Once the data is updated, a scoring script compares each page's latest numbers with the previous period. It calculates changes in clicks, impressions, CTR, and position, then writes an Opportunity explanation and a Priority Score beside the article in GSC Page Summary.

The goal is to build a shortlist with ideal articles for updating.

GSC Page Summary tab showing CTR change, position change, the Opportunity reason (striking distance or stale-content candidate) and the Priority Score for each page

The rules in this build are weighted:

  • A qualifying click decline of at least 25% adds 35 points, provided the page had at least 10 previous clicks and either impressions stayed at 80% or more of the earlier level or average position worsened by two places.
  • A page ranking between positions 4 and 20 with at least 100 impressions adds 25 points.
  • A CTR decline of 25% or more on a top-ten page with at least 100 impressions adds 20.
  • Content at least 180 days old with enough impressions adds 15.
  • Possible query overlap adds 10.

Scores stop at 100.

A higher score brings the page closer to the front of a research queue but doesn't mean the article needs rewriting yet. An article at position 12 may have room to improve without any recent decline, while an old article may have perfectly good information.

The score also doesn't calculate business value, so the editor can still manually select a commercially important article over a less valuable page with a similar score.

Step 3: AI Researches Shortlisted Pages and Their Search Queries

The automation uses the shortlisted URLs to prepare research jobs for the connected AI worker.

Each job includes the page's performance data, important queries, and a reference to the current published article.

There’s a tab called GSC Query Detail that contains up to ten queries per page, ordered by impressions, along with clicks, CTR, average position, and Page Count for Query.

GSC Query Detail tab listing the top queries for one page with clicks, impressions, CTR, average position and Page Count for Query

Those query records give the research a direction. For example, a comparison article showing hundreds of impressions and an average position near 13 for its main query needs inspection, but the numbers alone don't mean that its content is wrong.

The Page Count for Query field can also flag searches appearing for multiple URLs, so the system can investigate possible overlap rather than combining pages.

The AI research stage looks at the current article, relevant search results, competing page types, other articles on the site, and reliable sources for facts that may have changed.

It looks for problems like missing information, changing search intent, outdated statistics, or overlapping coverage - a list of criteria I built into this, which is based on SEO best practices and also GEO/AEO inclusions.

Then it identifies what may need updating in each article, explains the problem, and includes links to the sources supporting its findings.

If it can't confirm the issue or identifies a technical problem rather than a content problem, it flags the article for further investigation instead of recommending a rewrite.

Step 4: Google Sheets Receives an Update Plan and Waits for Approval

The research findings are turned into a recommendation in the Update Queue tab of Google Sheets. Each suggested article update has a row containing its URL, Priority Score, Opportunity Trigger, Search Console snapshot, important queries, diagnosis, and evidence links. The plan also identifies what the revised article should Preserve, Add, Rewrite, or Remove.

Update Queue row in Google Sheets: audit date, content ID, Decision set to Pending, Feedback / Why, Priority Score, existing URL, current title, published date and modified dateThe same Update Queue row continued: Opportunity Trigger, GSC Snapshot, Primary Queries, Problem Confirmed and Update AngleThe same Update Queue row continued: Preserve, Add, Rewrite, Remove, Evidence / Sources and Workflow Status set to Awaiting decision

This is the part when a human enters the loop and was fundamental to my build of this sheet. It’s the “control center” where I can run everything.

Some of the key columns on this tab:

  • Content ID (B): A unique identifier used to track the article through the workflow.
  • Decision (C): Where you choose to Approve, Hold, or Reject the proposed update. New recommendations start as Pending. This tells the AI what to do next.
  • Feedback / Why (D): Where you explain your decision or provide additional instructions for the AI. Feedback gets taken into a separate system that it learns from and doesn’t repeat the next run.
  • Priority Score (E): A numerical score used to rank articles by their potential need for updating.
  • Opportunity Trigger (J): Explains what prompted the review, such as declining performance, outdated information, or ranking opportunities.
  • Problem Confirmed (M): Describes the specific content issue identified during research and the evidence supporting it.
  • Update Angle (N): Explains the recommended direction for refreshing the article.
  • Preserve (O): Identifies existing content that should remain unchanged.
  • Add (P): Recommends new sections, information, or evidence to include.
  • Rewrite (Q): Identifies sections that need improving or replacing.
  • Remove (R): Flags outdated, inaccurate, duplicated, or unnecessary content for removal.
  • Evidence / Sources (S): Provides links to research and sources supporting the proposed changes.
  • Workflow Status (T): Shows where the recommendation is in the process, such as awaiting a decision.

You might be thinking this is a lot of fields, but the purpose here is to maintain control. AI does all the work and then hands over the task back to the human.

In this tab, I can edit the fields and change the targeted update, provide more direction, give feedback, and help AI learn for the next run. It takes 10 minutes a day.

The Decision column is what controls the next steps for the AI:

  • Pending: The default state for my review.
  • Approve: The suggestion is approved for the next automated stage.
  • Reject: Suggestion not approved.
  • Hold: Keep it there until feedback is addressed.
Decision dropdown in the Update Queue with the options Pending, Approve, Reject and Hold

Everything entered into the Feedback/Why column is the instruction for the AI to learn from, to do in the next stage, to fix, or what it did well.

For example, I could change the status to “Hold” then put in the feedback box that the suggested update is too rigorous, not aligned with the search intent, has too many changes, not enough research, or anything to give it more direction.

Then, when it does the next run, if it sees the status has changed, it will action that item.

Step 5: An Approved Plan Becomes a Revised Google Doc

Approved proposals are passed into Approved Content, another Google Sheets tab. That record holds the editable outline, sources, article URL, the sections to keep or change, and the Next Action field.

This is again where a human can adjust the plan before asking for a draft, so the AI has specific instructions.

Similar to the last tab, the default state is pending and remains that way until I change the dropdown.

  • Draft: This tells the AI to draft the update in a Google Doc.
  • Revise: Revise the draft it created based on my feedback.
  • Complete: The draft is complete so it can move to publish.
  • Hold: Keep it there and action any feedback.
  • Reject: Completely reject the idea and outline.
  • Retry: Create a fresh new outline.
Next Action dropdown in Approved Content with the options Pending, Draft, Revise, Complete, Hold, Reject and Retry

When Next Action is set to Draft, the automation prepares a new job for the AI worker. It includes the approved instructions and a reference to the current published article. My GitHub version also stores a hash of the source article so a changed original can be detected before the draft is processed.

The worker generates the proposed revision and returns its result to the pipeline. A later GitHub run processes it, creates or updates a Google Doc, and writes the document link and draft status back into Approved Content.

The draft starts from the existing article because sections, examples, citations, and internal links should survive an update unless the plan calls for their removal. This stage produces a Google Doc for review, with the revised sections and supporting evidence.

Approved Content tab showing each content ID with its Next Action, Draft Status, Draft Doc link and Workflow Status, with one draft ready for review

Step 6: A Human Reviews and Edits the Google Doc

Once the draft is ready, Approved Content displays its Google Doc link and review status. The workflow now hands the article back to the editor. The review covers the whole draft, including retained sections, new data, source links, headings, images, internal links, CTAs, and any title or meta-description changes.

There’s an example of that in the screenshot below:

Revised draft in Google Docs with document tabs for the review block, update summary, verified sources, review notes and the article, and a review block listing the content ID, search intent, queries, meta title, meta description, internal links and CTA

The editor makes corrections directly in Google Docs and can leave comments or provide feedback for another revision. If more AI changes are needed, the feedback can be passed back as a separate revision job. The system retains document versions and avoids replacing newer human edits with an older AI response.

This creates a second approval point. The earlier decision approved the research and update plan. The Google Doc review decides whether the proposed article is ready to publish. The automation can't make that final editorial judgment from the original priority score.

Step 7: AI Formats and Publishes the Approved Article

Once the Google Doc has passed human review and the item is marked Complete in Approved Content, the publishing stage can begin.

In my setup, the AI takes over from here. It uses prebuilt publishing skills and site rules to format the approved article correctly, including the headings, images, internal links, metadata, and other page elements. Those rules also tell it to update the existing article rather than create a duplicate.

My website is a static site deployed through Cloudflare. The AI updates the site's content files and the configured Cloudflare deployment process puts the new version live automatically. I don't have to copy the text into a CMS or publish it manually.

The human approval happens before this stage, so an unfinished draft can't be sent straight to the live website.

Other static sites, including ones built with Astro and deployed through Cloudflare or Vercel, can use a similar publishing process. WordPress needs a different connection.

The official WordPress MCP Adapter allows an AI agent to interact with a site, but it also needs post-editing tools and the correct permissions. Once those are enabled, AI can put the approved article into WordPress, format it for the block editor, update the existing post, and publish it after approval.

After publication, the automation records the updated URL, date, and changes in Google Sheets alongside the pre-update Search Console figures. The next scheduled data collection can then measure how the revised article performs.

Step 8: New Performance Data Starts the Next Refresh Cycle

GitHub Actions continues running after publication. The Search Console collector brings the next snapshot into GSC Page Summary and GSC Query Detail, so the system can check how the updated page is performing. Its previous snapshot and publication date provide context for that.

The review needs enough time for Google to recrawl the page and collect data. Clicks, impressions, rankings, CTR, and query changes should be compared using equivalent periods, with any change in search demand considered too. Traffic improving after publication is good to record, but it doesn't prove that one update caused it.

If the latest figures indicate another problem, the page can re-enter the research and approval process. If it's performing well, it stays out of the update queue.

Meanwhile, the scheduled checks continue for the rest of the content library, with the collection, research, planning, drafting, human editing, and publication as a repeatable cycle.

How to Build This Content Update Automation

This is the initial build I did for the automation, more of an MVP. I have since iterated on that and brought in more logic, a brain behind the operation, and improvements on the stages.

These steps give a brief overview of building the entire workflow - not every single detail, as most people will use AI to support the build.

If you want Codex or Claude Code to handle the whole build, use this prompt:

Full build prompt

Otherwise, you can do parts manually and prompt AI where necessary - I have included prompts for each stage.

A couple of notes:

  • Keep using the same project and repository so each new stage builds on the previous one.
  • Change any of these steps to match your own workflow - this is how I work, so it’s different from how you might.
  • You can code a nice-looking wrapper over this and have all these steps work in the background with a “CMS” interface to run it.
  • This build doesn’t include the skills and brain builds that agents use to understand search intent, research, write, and so on. But I recommend you build skills and instructions for every single step to ensure it’s being accurate and effective.

What You'll Need to Build This Automation

You don't need to know how to code everything yourself. You can use Codex or Claude Code to create the scripts, connect the services, and test the automation.

Before starting, you'll need:

  • A Google account: With access to Google Search Console for your website and permission to create Google Sheets and Docs.
  • A Google Cloud project: To enable the Google APIs that connect Search Console, Sheets, Docs, and Drive.
  • A GitHub account: To store the automation's code and run it on a schedule through GitHub Actions.
  • An AI coding assistant: Codex or Claude Code to build and configure the system. It should have access to your coding project so it can create files and run tests.
  • An AI worker: Codex, Claude Code, or another supported AI service to carry out the research and drafting automatically once the system is built. Your coding assistant will help configure this separately.
  • Access to your website: For a static website, you'll need access to its source code and deployment platform, such as Cloudflare or Vercel. For WordPress, you'll need an authorized connection that can edit and publish posts.

One important tip: Keep using the same coding project as you complete the steps. Your coding assistant needs access to what it created earlier so the next stage connects to the existing system.

The Google Sheets tabs will be your control panel. Once the automation is running, you should only need to review its recommendations, provide feedback, and approve articles. The data collection, research, drafting, and publishing are handled automatically.

1. Create Your Content Library in Google Sheets

Create a Google Sheet (name it whatever you like) with five tabs:

  • Content Inventory: canonical URL, title, category, published and modified dates, sitemap status, last checked.
  • GSC Page Summary: clicks, impressions, CTR, position, percentage changes, Opportunity Flags, and Priority Score.
  • GSC Query Detail: page URL, query, clicks, impressions, CTR, position, page count, snapshot date.
  • Update Queue: URL, score, diagnosis, queries, evidence, proposed edits, Decision, and Feedback / Why.
  • Approved Content: editable brief, sources, Preserve/Add/Rewrite/Remove, Next Action, Draft Doc, and status.

These are the five tabs you'll use to manage the workflow. The coding assistant will also create hidden tabs to track AI jobs, results, feedback, article versions, and processing errors. You won't normally need to edit those.

The prompts use these tab names as examples. If you already have a spreadsheet with different names, the coding assistant should inspect it and use your existing structure rather than create duplicates.

Put headers in row 1; Update Queue may start at row 4. Normalize canonical URLs so the same page isn't counted twice.

Import published URLs from your sitemap; exclude archives and search pages. A scheduled check can maintain URLs and modified dates. You can ask AI to fetch your sitemap and populate this to save time.

Step 1 prompt

2. Set Up GitHub Actions to Run the Content Refresh Automation

Create a private GitHub repository to store the automation's code. Your coding assistant will create the scripts and GitHub Actions workflows inside it.

GitHub Actions runs these scripts on GitHub's servers, so your computer doesn't need to stay on. GitHub provides an allowance of included Actions minutes, although charges can apply if you exceed your plan's limits. AI usage costs depend on the service and authentication method you choose.

The repository needs:

  • .github/workflows/content-refresh.yml: schedule runs and add workflow_dispatch for manual tests.
  • Configuration: Sheet ID, Search Console property, date windows, tab names. Keep credentials in secrets.

The following steps cover the collector, scoring, research, drafting, and publishing modules that your coding assistant will add to this repository.

Build these using Node.js or a coding assistant. Separate data, research, drafting, and publishing so failures can't bypass approval.

Step 2 prompt

3. Connect Google Search Console, Sheets, and Docs

Use a Google account with access to Search Console and edit permissions on the Sheet and draft Docs.

  • In Google Cloud Console, create or select a project.
  • Enable Search Console, Sheets, Docs, and Drive APIs under APIs & Services > Library.
  • Configure the OAuth consent screen in Google Auth Platform.
  • Create an OAuth client and obtain its ID, secret, and offline refresh token for unattended jobs.
  • Authorize required scopes, including read-only Search Console. Never store tokens in code or Sheets.

Google's OAuth 2.0 Playground can generate an offline refresh token using your client credentials. Add the Playground redirect URI, authorize scopes, and exchange the code. Check consent and publishing settings because testing-mode tokens may expire.

Under GitHub > Settings > Secrets and variables > Actions, save GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, and GOOGLE_REFRESH_TOKEN. Test with a separate Sheet first; some private-repo protection features require a paid plan.

The coding assistant should test each Google connection before building the remaining stages. It needs to confirm that it can read Search Console data, access your spreadsheet, and create a test Google Doc in the intended Drive folder.

Connecting Google doesn't automatically connect the AI worker. That separate connection is covered in Step 7.

Step 3 prompt

4. Schedule the Workflow and Test Each Stage

Your coding assistant should now create a configuration file for the automation. This stores information like your Google Sheet ID, Search Console property, tab names, and scheduling preferences.

If you're using the example configuration in these prompts, it can create config/pipelines.yml. The Google Sheet ID goes into that file, while credentials are stored securely in GitHub Actions secrets. The Search Console property can be supplied through a GitHub Actions variable.

You don't need to write this configuration yourself. Ask the coding assistant to create it and show you exactly where to enter any values it can't obtain from the connected accounts.

Before enabling the daily schedule, run a test. If the automation can't access your spreadsheet, find a column, or connect to Search Console, it should explain the problem in the GitHub Actions log and stop without changing any data.

Schedule GitHub Actions at your own cadence (my system runs daily), and enable workflow_dispatch. Set DRY_RUN=true initially; isolate data collection from drafting and deployment.

Use GitHub > Actions > Run workflow. Check logs and Sheet changes for a few URLs before enabling test writes and then production writes.

Optional: a Google Sheets Apps Script menu can call GitHub's workflow_dispatch API. Store its scoped token in Apps Script properties, never in a Sheet cell.

Step 4 prompt

5. Build the Search Console Data Collector

Ask your coding assistant to create a Search Console collector using searchanalytics.query. Request page and page-query data for the latest complete 28 days, the previous 28 days, and the same period last year, allowing three days for reporting.

The collector populates GSC Page Summary and GSC Query Detail automatically, saves the data date, and identifies missing records. Low-volume queries may not appear in Search Console.

The automation should also save historical snapshots so previous performance isn't lost when the latest data replaces it. This allows you to compare an article's performance before and after an update.

Ask Codex to test URL matching, duplicate handling, and data freshness using sample rows before scheduling the collector.

Step 5 prompt

6. Have Your Coding Assistant Build the Scoring Rules

Next, have your coding assistant create a scoring system that ranks articles based on their Search Console performance. You can use the five rules below as a starting point or change them to suit your website.

The script should record the reason each article was flagged in the Opportunity column and calculate its Priority Score. This helps decide which articles the AI researcher should look at first.

Use five weighted rules:

  1. Click decay (+35).
  2. Positions 4–20 (+25).
  3. Falling CTR (+20).
  4. Content age (+15).
  5. Possible query overlap (+10).

The prompt below contains the thresholds and test cases.

Cap scores at 100. Test each rule with sample rows and make sure the script creates a shortlist without editing any article.

Step 6 prompt

7. Connect AI Research to the Ranked Shortlist

Now you need to connect the system to an AI worker that can research articles automatically.

This is different from the coding assistant you've been using to build everything. The AI worker runs after setup, receives articles selected by the scoring system, researches them, and returns its findings to Google Sheets.

Your coding assistant needs to configure how that worker runs, how it receives article data, and how its results are returned. For example, you could use Codex or Claude Code running through a supported authenticated setup in GitHub Actions.

Set the worker's instructions to check search intent, competing results, internal overlap, and changing claims. It must return source links and an issue-specific Preserve/Add/Rewrite/Remove plan.

Have the pipeline validate the worker's response before populating Update Queue. Missing evidence should create a Hold status, not trigger a rewrite.

Step 7 prompt

8. Build the Approval and Briefing Automation

Build an approval gate in Google Sheets: new proposals start Pending, while Approve advances them and Hold or Reject stops them. Later runs must retain the editor's Decision and Feedback / Why values.

The automation also saves your feedback so relevant instructions can be included in later AI tasks. You can build a separate feedback system to identify repeated preferences and turn approved ones into reusable rules.

Have the AI worker turn each approved recommendation into a brief in Approved Content, keeping the source links and sections to change. The system should carry this information over without another manual research step.

Use Next Action to route jobs: Draft generates the Doc, Revise applies feedback, and Complete releases the approved version for publishing. Failed checks or unsupported claims keep the item from advancing.

Step 8 prompt

9. Automate Google Docs Drafting and Revisions

Have your coding assistant connect Next Action to Google Docs. A Draft job uses the current article, approved brief, and writing rules to create a revised document, then saves its link and status in Approved Content.

The drafting system must start with the existing published article, rather than generating a completely new one from its title and keywords. If it can't retrieve the original content, it should stop and report the problem.

You can also give the AI worker your writing guidelines, preferred sources, formatting requirements, and editorial rules so it knows how to prepare revisions.

Build a revision loop so feedback triggers Revise and the worker checks the latest document version before editing. The human reviews the resulting Doc and makes any final corrections there.

Test that only Complete can start the publishing job; Pending, Draft, and Revise must stay unpublished.

This might require a few test runs to get right - you can ask AI to add a “Run” button into Google Sheets so you can actually trigger the run manually from the sheet while testing.

Step 9 prompt

10. Connect Automated Publishing to Your Website

The final step connects the approved Google Doc to your website.

How you build this depends on the platform your website uses:

  • Static websites (Astro, Hugo, Next.js static export, etc.): The publishing system updates the existing article files in your website's repository. If the site is deployed through Cloudflare or Vercel, the changes can trigger an automatic deployment.
  • WordPress: You can connect a permissioned AI worker through MCP tools that support editing and publishing posts. The official WordPress MCP Adapter provides the connection mechanism, but the required post-editing capabilities must also be available and authorized.

Your coding assistant should inspect how your website stores content before building this stage. Give it your publishing rules for headings, images, internal links, metadata, categories, and preserving existing URLs.

The publishing workflow should run only after you've approved the final Google Doc and marked the article Complete.

Before enabling live publishing, test the process using a staging website or preview deployment. Check that the article looks correct, the existing URL still works, and the website builds without errors.

Once the live deployment succeeds, the automation should record the publication date and updated URL in Google Sheets, alongside the Search Console data collected before the refresh.

Step 10 prompt

Test the Complete Automation Before Using It

Before enabling scheduled publishing, ask your coding assistant to run a full test using one existing article.

The test should confirm that:

  • Search Console data imports into Google Sheets and the article receives a priority score.
  • The AI worker researches the article automatically and creates an update recommendation with sources.
  • The recommendation waits for approval in Update Queue.
  • Approving the recommendation creates a brief in Approved Content.
  • Selecting Draft generates a revised Google Doc containing the original article and approved changes.
  • Revising the draft preserves your feedback and previous edits.
  • Marking the final draft Complete triggers the configured publishing process.
  • The updated article appears correctly on the staging and live website.
  • Google Sheets records the publication and saves the data needed for later performance comparisons.

Also test that rejected recommendations, unapproved drafts, failed builds, and missing credentials cannot trigger publication.

Once those tests pass, the automation is ready for scheduled runs.

Before you go - sign up to my newsletter for more workflows like this: