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
Automate visual tests with n8n and Google Gemini

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

Learn how to Build this Workflow with AI:

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.


Automate visual tests with n8n and Google Gemini

Visit through Desktop to Interact with the Workflow.

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 Twist Channel Creation and Messaging with n8n

This workflow automates creating and updating a channel in Twist and sending a personalized message to specific users. It eliminates manual setup errors and saves time managing Twist communications.

Automate Ideogram Image Generation with Google Sheets & Gmail

This workflow automates graphic design image generation via Ideogram AI, storing image data in Google Sheets and Google Drive, with email alerts via Gmail. It saves designers hours by automating image creation, remixing, review, and record-keeping.

Automate IT Support with Slack and OpenAI in n8n

Streamline IT support by automating Slack message handling using n8n and OpenAI. This workflow handles Slack DMs, filters bots, queries a Confluence knowledge base, and delivers AI-generated responses, improving support efficiency and response time.

Automate Crypto Analysis with CoinMarketCap & n8n AI Agent

Discover how this unique n8n workflow leverages CoinMarketCap’s multi-agent AI to deliver precise, real-time cryptocurrency insights directly via Telegram. Manage crypto data analysis efficiently with automated multi-source API integration.

Automate Gumroad to Beehiiv Subscriber Sync with n8n

Learn how to automatically add new Gumroad sales customers as Beehiiv newsletter subscribers using n8n automation. This workflow saves time by syncing sales data to Google Sheets CRM and notifying your Telegram channel instantly.

Generate On-Brand Blog Articles Using n8n and OpenAI

This workflow automates the creation of on-brand blog articles by analyzing existing company content using n8n and OpenAI. It extracts article structures and brand voice to produce consistent draft articles, saving significant content creation time.
1:1 Free Strategy Session
Your competitors are already automating. Are you still paying for it manually?

Do you want to adopt AI Automation?

Every hour your team does repetitive work, you're burning real money.
While you wait, faster businesses are cutting costs and moving quicker.
AI and automations aren't the future anymore — they're the present.

Book a live 1-on-1 session where we show you exactly which of your daily tasks can be automated — and what it’s costing you not to.