πŸ“Š Monitor Core Web Vitals at scale with PageSpeed API and Google Sheets

⚑ 44 views Β· πŸ“Š Market Research & Insights

Description

Quick overview

This workflow audits a list of URLs from a CSV upload or an XML sitemap using the Google PageSpeed Insights API, writes Lighthouse and Core Web Vitals metrics into a new Google Sheets report, and emails a completion summary via Gmail.

How it works

  1. Starts either on a schedule, via manual execution, or through an n8n form where you upload a CSV of URLs.
  2. Creates a new Google Sheets spreadsheet for the run and writes the report column headers.
  3. Builds audit metadata (start time, counters, and the final report URL) and then extracts URLs from the uploaded CSV or fetches and parses the configured XML sitemap.
  4. Loops through the URLs in batches and calls the Google PageSpeed Insights API for each URL with the chosen device strategy.
  5. Appends successful Lighthouse and CrUX/Core Web Vitals metrics (plus pass/fail results against thresholds) to the Google Sheet, or logs the API error message and status for failed URLs.
  6. Waits briefly between batches to throttle requests, then records the finish time and sends a Gmail email with summary counts and a link to the spreadsheet.

Setup

  1. Add a Google PageSpeed Insights (PageSpeed Online API) key and paste it into the Config values.
  2. Connect Google Sheets OAuth credentials and select the Google account where the workflow can create and edit spreadsheets.
  3. Connect Gmail OAuth credentials and set the recipient address in the email step.
  4. Provide an XML sitemap URL in the Config values (required for scheduled/manual runs), or prepare a one-column, headerless CSV of URLs for form uploads.
  5. Optionally adjust the device strategy (desktop/mobile), UTM campaign value, pass/fail thresholds, and the wait time between requests to fit your audit needs.

Requirements

Customization

Additional info

Ideal for Technical SEO Managers, Website Admins and other SEO professionals who want to automate auditing and reporting of Core Web Vitals (both lab and CrUX field data), especially on large websites. This high-level report focuses on key metrics used in Google Core Web Vitals assessment and Lighthouse performance data.

Full report includes the following data for each URL:

Lighthouse performance metrics:

Core Web Vitals metrics (if available):

Other useful metrics:

πŸ”— Nodes Used

Google Sheets, HTTP Request, Gmail, Schedule Trigger, n8n Form Trigger, Extract from File

πŸ“₯ Import

Download workflow.json and import into n8n: Workflow menu β†’ Import from File

πŸ“– Importing guide Β· πŸ”‘ Credential setup