Quick overview
This workflow runs daily to compare the last 28 days vs the prior 28 days in Google Search Console and Google Analytics 4, detects and scores SEO opportunities, saves them to Google Sheets, and uses OpenAI (GPT-4o) to generate an action plan sent to Notion, Slack, and Gmail.
How it works
- Runs every day on a schedule and calculates current and previous 28-day date ranges.
- Queries the Google Search Console Search Analytics API for query+page performance for both periods.
- Fetches GA4 page metrics (sessions, page views, and engagement duration) for both periods using Google Analytics.
- Analyzes the combined datasets to detect and score SEO signals (quick wins, CTR gaps, content decay, cannibalization, new queries, and low-engagement high-traffic pages) and ranks the top opportunities.
- Appends the ranked opportunity backlog to a Google Sheets tab for tracking.
- Sends the top opportunities to OpenAI (GPT-4o) to produce a structured SEO action plan.
- Publishes the AI action plan to a Notion database page, posts it to a Slack channel, and emails the HTML report via Gmail.
Setup
- Connect Google OAuth credentials for Google Search Console (HTTP Request OAuth2) and Google Analytics, and select your GA4 property ID.
- Replace the placeholder Search Console API URL in both GSC requests with your verified, URL-encoded site property.
- Connect Google Sheets OAuth credentials and select the target spreadsheet and the “Opportunities” sheet (with columns matching the workflow output).
- Add an OpenAI credential for the GPT-4o model used by the AI agent.
- Connect Notion credentials and select the target database for the SEO backlog page.
- Connect Slack and Gmail credentials, set the Slack channel, and replace the recipient email address placeholder.