Visual Regression Testing Automation with n8n and Google Gemini

This n8n workflow automates visual regression testing by capturing base and new webpage screenshots, comparing them with Google Gemini’s AI vision model, and reporting detected changes via Linear. It helps reduce manual webpage change detection errors and saves hours of quality assurance work.
googleDrive
lmChatGoogleGemini
outputParserStructured
+12
Workflow Identifier: 1208
NODES in Use: Google Drive, Google Gemini Chat Model, Structured Output Parser, Sticky Note, SplitInBatches, Wait, HTTP Request, Merge, Google Sheets, Schedule Trigger, Filter, Aggregate, Linear, Manual Trigger, Chain LLM

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

What This Workflow Does

This workflow helps you find changes on websites automatically by comparing old and new screenshots. It saves time spent on taking and checking screenshots manually and finds visual differences like moved text, changed colors, or replaced images. The result is a clear list of detected issues sent to your project management tool.


Who Should Use This Workflow

If you manage many websites and must check if they look right after updates, this workflow fits your needs. It’s especially useful for quality assurance testers who want to avoid missing mistakes caused by design or content changes.

It works well for teams using Google Sheets to keep track of websites, Google Drive for storing images, Apify to get website snapshots, and Google Gemini AI to spot visual changes automatically.


Key Tools and Services Used

  • Google Sheets: Holds URLs of webpages and stores base screenshot file IDs.
  • Google Drive: Saves old and new screenshots as image files.
  • Apify API: Generates fresh screenshots of webpages.
  • Google Gemini (PaLM) AI: Compares images to find visual differences.
  • Linear: Manages issue tickets for detected problems.


How the Workflow Works: Inputs, Processing, and Outputs

Inputs

Processing Steps

  • Fetch URLs and base image IDs from Google Sheets.
  • Download base screenshots from Google Drive.
  • Request new screenshots from Apify API.
  • Download new screenshots.
  • Upload new screenshots to Google Drive and update Google Sheets with new file IDs.
  • Combine old and new screenshots to prepare for AI analysis.
  • Send images to Google Gemini AI to detect visual differences such as text changes, moved elements, or color shifts.
  • Parse AI’s report into JSON format showing detailed change descriptions.
  • Filter out pages with no changes.
  • Group all detected changes.
  • Create comprehensive issue reports with details inside Linear for team tracking.

Outputs

  • Automated visual difference reports listed by webpage.
  • New baseline screenshots updated in Google Drive and Google Sheets for next testing run.
  • Issues created inside Linear with summaries and detailed descriptions.


Beginner Step-by-Step: How to Use This Workflow in n8n

1. Import the Workflow

  1. Download the workflow file using the Download button on this page.
  2. Open n8n editor and use the Import from File option to load the workflow.

2. Configure Credentials

  1. Add API keys and OAuth credentials for Google Sheets, Google Drive, Apify, Google Gemini, and Linear.
  2. Check each node’s credential settings to ensure proper authentication.

3. Update IDs and Settings

  1. Verify or change Google Sheets Spreadsheet ID and Sheet name if needed.
  2. Update Google Drive folder IDs where screenshots are stored.
  3. Make sure URL and base image file ID columns match your sheet structure.
  4. Adjust API request bodies if you want different screenshot settings (size, format).
  5. In Linear node, set project ID or team channel where issues should be created.

4. Test and Activate

  1. Run the workflow manually from the Manual Trigger node to check execution.
  2. Confirm screenshots are generated, compared, and that change issues appear in Linear.
  3. When satisfied, activate the workflow using the activation switch to run automatically on schedule.

For long term control or to avoid API limits, consider self-host n8n for running this workflow securely.


Edge Cases and Common Failures

  • Base image missing or wrong file ID: Google Drive download fails. Fix by verifying correct IDs in Google Sheets.
  • Apify screenshot fails: Possible API key issues, rate limits, or invalid URLs. Check API keys and URL validity.
  • Google Gemini outputs unclear results: Check AI prompt and output parser schema to ensure they match expected format.
  • Large batch sizes: Can cause API rate limits. Reduce batch size or switch to self-hosted n8n.


Customization Ideas

  • Replace Linear node with Slack or JIRA nodes to send alerts or create tickets in other systems.
  • Change Apify screenshot settings like delay, resolution, or image format by editing JSON body in HTTP nodes.
  • Swap Google Gemini node to other large vision models such as OpenAI GPT-4 Vision or Anthropic Claude Vision.
  • Modify batch sizes in SplitInBatches node to adjust processing speed according to quota.
  • Add Gmail node to email summary reports after Linear issues creation.


Summary and Result

✓ This workflow saves about 8 hours a week by automating visual checks of websites.

✓ It finds visual defects like layout shifts, text or color changes automatically.

✓ Changes are documented clearly and tracked in Linear for prompt fixes.

→ Users get reliable visual testing without manual screenshot work.

→ Updated baseline images keep tests accurate over time.


Frequently Asked Questions

The Google Drive download will fail with a file not found error. Check and fix the file ID in Google Sheets to match an existing file.
Yes. Any service that provides downloadable webpage screenshots via API can replace Apify by updating the workflow’s HTTP Request nodes.
Yes. Every call to Google Gemini AI uses API quota, so monitor usage to control costs.
The workflow uses batch processing to handle many pages, but API limits and cost should be considered. Using self-hosted n8n can help manage these constraints.

Promoted by BULDRR AI

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation Workflows in n8n

A complete beginner guide to building an AI SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free