Skip to main content

Monitor Core Web Vitals at scale with PageSpeed API and Google Sheets

Workflow preview

Workflow preview
100%
Monitor Core Web Vitals at scale with PageSpeed API and Google Sheets preview
Open on n8n.io

1. Workflow Overview

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 Sheet...

Best for

  • Market Research automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.httprequest, n8n-nodes-base.xml, n8n-nodes-base.splitout, n8n-nodes-base.splitinbatches, n8n-nodes-base.formtrigger, n8n-nodes-base.manualtrigger, n8n-nodes-base.googlesheets

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Lukasz Korba.

Original n8n.io source

1.1 Workflow description

Title
Monitor Core Web Vitals at scale with PageSpeed API and Google Sheets
Workflow name
Monitor Core Web Vitals at scale with PageSpeed API and Google Sheets

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

  • Google Sheets OAuth credentials
  • Gmail OAuth credentials
  • PageSpeed API key (free in Google Cloud)

Customization

  • Use the 'Schedule Audit' node to run audit regularly at specified intervals for a fully automated reporting workflow
  • Use the 'Config' node to pick the target device (desktop/mobile)
  • Adjust the pass thresholds for Core Web Vitals/Lighthouse performance metrics if required (defaults are taken directly from official documentation, but may change in the future)
  • Adjust batch size/wait time between each URL to avoid API throttling or slowing down your website (default: 1 second)
  • Add additional notification options at the end of the audit, such as Slack, Telegram, or WhatsApp messages

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:

  • First Contentful Paint (FCP)
  • Largest Contentful Paint (LCP)
  • Total Blocking Time (TBT)
  • Cumulative Layout Shift (CLS)
  • Speed Index (SI)
  • Overall Lighthouse performance score

Core Web Vitals metrics (if available):

  • Largest Contentful Paint (LCP)
  • Interaction to Next Paint (INP)
  • Cumulative Layout Shift (CLS)
  • First Contentful Paint (FCP)
  • Time to First Byte (TTFB)

Other useful metrics:

  • HTTP status code
  • Download size (KiB)
  • DOM size
  • Audit timestamp
  • Warnings/errors

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 2 - Fetch the XML sitemap

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.4

Block 3 - Convert to JSON

Type / Role
n8n-nodes-base.xml - xml
Config choices
Version 1

Block 4 - Extract URL tags

Type / Role
n8n-nodes-base.splitOut - splitOut
Config choices
Version 1

Block 5 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 6 - Loop Over Items

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 7 - Upload CSV

Type / Role
n8n-nodes-base.formTrigger - formTrigger
Config choices
Version 2.5

Block 8 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 9 - When clicking ‘Execute workflow’

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 10 - Pick default spreadsheet to save the report

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 11 - Add column headers to new sheet

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.4

Block 12 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 13 - Config

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 14 - Process CSV file if uploaded, otherwise fetch the XML sitemap

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.3

Block 15 - Run PageSpeed audit

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.4

Block 16 - Extract URLs from file

Type / Role
n8n-nodes-base.splitOut - splitOut
Config choices
Version 1

Block 17 - Extract data from file

Type / Role
n8n-nodes-base.extractFromFile - extractFromFile
Config choices
Version 1.1

Block 18 - Create audit metadata

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 19 - Increment error count meta

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 20 - Insert API audit data into sheet

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 21 - Wait between each batch

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 22 - Increment urls_processed meta

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 23 - Update audit_finish_time meta

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 24 - Insert error data into sheet

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Showing the first 24 of 31 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Monitor Core Web Vitals at scale with PageSpeed API and Google Sheets
Complexity advanced
Nodes 31
Categories Market Research
Author Lukasz Korba
Published 21 May 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/15911/15911.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Monitor Core Web Vitals at scale with PageSpeed API and Google Sheets do?

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 Sheet...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Market Research use case.