Back to Catalog

Visual regression testing with Apify and AI Vision Model

JimleukJimleuk
5450 views
2/3/2026
Official Page

This n8n workflow is a proof-of-concept template exploring how we might work with multimodal LLMs and their multi-image analysis capabilities. In this demo, we compare 2 screenshots of a webpage taken at different timestamps and pass both to our multimodal LLM for a visual comparison of differences. Handling multiple binary inputs (ie. images) in an AI request is supported by n8n's basic LLM node.

How it works

This template is intended to run as 2 parts: first to generate the base screenshots and next to run the visual regression test which captures fresh screenshots.

  • Starting with a list of webpages captured in a Google sheet, base screenshots are captured for each using a external web scraping service called Apify.com (I prefer Apify but feel free to use whichever web scraping service available to you)
  • These base screenshots are uploaded to Google Drive and will be referenced later when we run our testing.
  • Phase 2 of the workflow, we'll use a scheduled trigger to fire sometime in the future which will reuse our web scraping service to generate fresh screenshots of our desired webpages.
  • Next, re-download our base screenshots in parallel and with both old and new captures, we'll pass these to our LLM node. In the LLM node's options, we'll define 2 "user message" inputs with the type of binary (data) for our images.
  • Finally, we'll prompt our LLM with our testing criteria and capture the regressions detected. Note, results will vary depending on which LLM you use.
  • A final report can be generated using the LLM's output and is uploaded to Linear.

Requirements

  • Apify.com API key for web screenshotting service
  • Google Drive and Sheets access to store list of webpages and captures

Customising this workflow

  • Have your own preferred web screenshotting service? Feel free to swap out Apify with your service of choice.

  • If the web screenshot is too large, it may prove difficult for the LLM to spot differences with precision. Try splitting up captures into smaller images instead.

n8n Workflow: Visual Regression Testing with Apify and AI Vision Model

This n8n workflow automates visual regression testing for web pages, leveraging Apify for website crawling and a Google Gemini AI Vision Model for intelligent comparison. It's designed to identify visual discrepancies between different versions of a website, storing results in Google Sheets and managing issues in Linear.

What it does

This workflow streamlines the process of visual regression testing through the following steps:

  1. Trigger: The workflow can be initiated manually or on a schedule (e.g., daily, weekly).
  2. Fetch URLs: It retrieves a list of URLs to be tested from a specified Google Sheet.
  3. Prepare Data: It transforms the fetched data into a format suitable for subsequent steps, ensuring each URL is processed individually.
  4. Loop Over URLs: For each URL:
    • Capture Screenshots (Apify): It uses an HTTP Request to trigger an Apify actor (presumably a screenshot or web scraping actor) to capture screenshots of the specified URL.
    • Wait for Apify: It waits for a short period to allow the Apify actor to complete its task.
    • Retrieve Apify Results: It fetches the results (including screenshot URLs) from the Apify run.
    • Download Screenshots: It downloads the captured screenshots from Google Drive (assuming Apify stores them there).
    • AI Vision Model Analysis: It sends the downloaded screenshots to a Google Gemini Chat Model, which acts as an AI Vision Model, to compare them and identify visual regressions.
    • Parse AI Output: It parses the structured output from the AI model to extract key information about the detected regressions.
    • Filter Regressions: It filters the results, likely to focus only on significant visual changes identified by the AI.
    • Aggregate Results: It collects the results for all URLs, preparing them for reporting.
  5. Report to Google Sheets: It updates a Google Sheet with the visual regression test results, including any detected discrepancies.
  6. Create Linear Issues: For each identified visual regression, it creates a new issue in Linear, assigning relevant details for tracking and resolution.

Prerequisites/Requirements

To use this workflow, you will need:

  • n8n Instance: A running n8n instance.
  • Google Sheets Account: Configured credentials for Google Sheets to store and retrieve URLs and test results.
  • Google Drive Account: Configured credentials for Google Drive to download screenshots.
  • Apify Account: An Apify account and an actor configured to take screenshots of web pages. You'll need the API endpoint for your Apify actor.
  • Google Gemini API Key: Access to the Google Gemini API for the AI Vision Model.
  • Linear Account: Configured credentials for Linear to create and manage issues.

Setup/Usage

  1. Import the Workflow: Download the provided JSON and import it into your n8n instance.
  2. Configure Credentials:
    • Set up your Google Sheets credentials.
    • Set up your Google Drive credentials.
    • Set up your Linear credentials.
    • Configure the Google Gemini Chat Model node with your API key.
  3. Update Apify HTTP Request:
    • Modify the "HTTP Request" node (ID 19) to point to your Apify actor's API endpoint for triggering a new run.
    • Adjust the payload to pass the target URL to your Apify actor.
    • Modify the "HTTP Request" node (ID 20, likely for fetching results) to point to your Apify run's results API.
  4. Specify Google Sheet: In the "Google Sheets" node (ID 18), specify the spreadsheet ID and sheet name where your URLs are listed.
  5. Configure Linear: In the "Linear" node (ID 563), configure the team, project, and any other relevant fields for issue creation.
  6. Activate the Workflow: Once all credentials and configurations are set, activate the workflow. You can then trigger it manually or let the "Schedule Trigger" (ID 839) run it automatically.

Related Templates

Track meal nutrition from meal photos with LINE, Google Gemini and Google Sheets

AI Meal Nutrition Tracker with LINE and Google Sheets Who's it for This workflow is designed for health-conscious individuals, fitness enthusiasts, and anyone who wants to track their daily food intake without manual calorie counting. It is best suited for users who want a simple, AI-powered meal logging system that analyzes food photos one at a time and provides instant nutritional feedback via LINE. What it does This workflow processes a single meal photo sent via LINE, analyzes it using Google Gemini AI to identify foods and estimate nutritional content, and stores the data in Google Sheets for tracking. The workflow focuses on simplicity and encouragement: it receives a meal image, performs AI-based food recognition, estimates calories and macronutrients, calculates a health score, provides personalized advice, and replies with a detailed nutritional breakdown on LINE. How it works A single meal photo is sent to the LINE bot. The workflow is triggered via a LINE webhook. The image file is downloaded and sent to Google Gemini AI for food analysis. The AI identifies foods and estimates nutritional values (calories, protein, carbs, fat, fiber). A health score (1-10) is calculated with personalized improvement tips. The data is appended to Google Sheets for meal history tracking. The image is uploaded to Google Drive for reference. A formatted nutritional report with advice is sent back as a LINE reply. This workflow is intentionally designed to handle one image per execution. Requirements To use this workflow, you will need: A LINE Messaging API account A Google Gemini API key A Google account with access to Google Sheets and Google Drive A Google Sheets document with the following column names: Date Time Meal Type Food Items Calories Protein (g) Carbs (g) Fat (g) Fiber (g) Health Score Advice Image URL Important limitations This workflow does not support multiple images sent in a single message. Sending images in quick succession may trigger multiple executions and lead to unexpected results. Only the first image in an event payload is processed. Nutritional values are AI estimates based on visual analysis and typical serving sizes. Accuracy depends on image quality, lighting, and food visibility. This tool should not replace professional dietary advice. These limitations are intentional to keep the workflow simple and easy to understand. How to set up Create a LINE Messaging API channel and obtain a Channel Access Token. Generate a Google Gemini API key. Update the Config node with your LINE token, Google Sheets ID, Google Drive folder ID, and daily calorie goal. Configure credentials for LINE, Google Gemini, Google Sheets, and Google Drive. Register the n8n webhook URL in your LINE channel settings. Activate the workflow in n8n and test it with a single meal photo. How to customize Modify the AI prompt in the "Analyze Meal with AI" node to support different languages or dietary frameworks (keto, vegan, etc.). Adjust the daily calorie goal in the Config node to match individual needs. Add additional nutritional fields such as sodium, sugar, or vitamins. Replace Google Sheets with a fitness app API or database. Integrate with other services to send daily/weekly nutrition summaries. --- Note: This workflow was tested using real meal photos sent individually via the LINE Messaging API. Nutritional estimates are approximations and may vary from actual values. For accurate dietary tracking, consult a registered dietitian.

Oka HironobuBy Oka Hironobu
89

Track free Udemy courses automatically with RapidAPI and Google Sheets

This workflow fetches free Udemy courses hourly via the Udemy Coupons and Courses API on RapidAPI, filters them, and updates a Google Sheet. It sends alerts on errors for smooth monitoring. --- Node-by-Node Explanation Schedule Trigger: Runs the workflow every hour automatically. Fetch Udemy Coupons: Sends POST request to the Udemy Coupons and Courses API on RapidAPI to get featured courses. Check API Success: Verifies if the API response is successful; routes accordingly. Filter Free Courses: Selects only courses with sale_price of zero (free courses). Send Error Notification: Emails admin if API fetch fails for quick action. Sync Courses to Google Sheet: Appends or updates the filtered free courses into Google Sheets. --- Google Sheets Columns id name price sale_price image lectures views rating language category subcategory slug store sale_start --- Google Sheets Setup & Configuration Steps Create Google Sheet: Create or open a Google Sheet where you want to sync courses. Set Headers: Add columns headers matching the fields synced (id, name, price, etc.). Enable Google Sheets API: Go to Google Cloud Console, enable Google Sheets API for your project. Create Service Account: In Google Cloud Console, create a Service Account with editor access. Download Credentials: Download the JSON credentials file from the service account. Share Sheet: Share your Google Sheet with the Service Account email (found in JSON file). Configure n8n Google Sheets Node: Use the service account credentials, set operation to “Append or Update”, provide Sheet URL and sheet name or gid. Match Columns: Map the course fields to your sheet columns and set id as the unique key for updates. --- How to Obtain RapidAPI Key & Setup API Request Sign up/Login: Visit RapidAPI Udemy Coupons and Courses API and create an account or log in. Subscribe to API: Subscribe to the Udemy Coupons and Courses API plan (free or paid). Get API Key: Navigate to your dashboard and copy your x-rapidapi-key. Configure HTTP Request: In your workflow’s HTTP Request node: Set method to POST. URL: https://udemy-coupons-and-courses.p.rapidapi.com/featured.php Add headers: x-rapidapi-host: udemy-coupons-and-courses.p.rapidapi.com x-rapidapi-key: your copied API key Set content type to multipart/form-data. Add body parameter: page=1 (or as needed). Test API: Run the node to ensure the API responds with data successfully before continuing workflow setup. --- Use Cases & Benefits Automates daily updates of free Udemy courses in your sheet using the Udemy Coupons and Courses API on RapidAPI. Saves manual effort in tracking coupons and deals. Enables quick error alerts to maintain data accuracy. Ideal for course aggregators, affiliate marketers, or learning platforms needing fresh course data. --- Who This Workflow Is For Content curators and edtech platforms tracking free courses. Affiliate marketers promoting Udemy deals. Anyone needing real-time access to updated free Udemy coupons.

Sk developer By Sk developer
365

Daily Magento 2 customer sync to Google Contacts & Sheets without duplicates

Automatically sync newly registered Magento 2 customers to Google Contacts and Google Sheets every 24 hours — with full duplication control and seamless automation. This workflow is a plug-and-play customer contact automation system designed for Magento 2 store owners, marketers, and CRM teams. It fetches customer records registered within the last 24 hours (from 00:00:00 to 23:59:59), checks against an existing Google Sheet to avoid reprocessing, and syncs only the new ones into Google Contacts. This ensures your contact list is always fresh and up to date — without clutter or duplicates. ✅ What This Workflow Does: Automates Customer Syncing Every day, it fetches newly registered Magento 2 customers via API based on the exact date range (midnight to midnight). Deduplicates Using Google Sheets A master Google Sheet tracks already-synced emails. Before adding a customer, the workflow checks this list and skips if already present. Creates Google Contacts Automatically For each unique customer, it creates a new contact in your Google Contacts, saving fields like first name, last name, and email. Logs New Entries to Google Sheets In Google Sheets, it even records magento 2 customer group, createdat, websiteid & store_id After syncing, it adds each new email to the tracking sheet, building a cumulative record of synced contacts. Fully Scheduled & Automated Can be scheduled with the Cron node to run daily (e.g., 12:05 AM) with no manual intervention required. 🔧 Modules Used: HTTP Request (Magento 2 API) Date & Time (for filtering registrations) Google Sheets (for reading/writing synced emails) Google Contacts (for contact creation) Set, IF, and Merge nodes (for control logic) Cron (for scheduling the automation) 💼 Use Cases: Keep your email marketing tools synced with Magento 2 customer data. Build a CRM-friendly contact base in Google Contacts without duplicates. Share customer data with sales or support teams through synced Google Sheets. Reduce manual work and human error in data transfer processes. 🔒 Credentials Required Magento 2 Bearer Auth: Set up as a credential in n8n using your Magento 2 API access token. Google API 📂 Category E-commerce → Magento 2 (Adobe Commerce) 💬 Need Help? 💡 Having trouble setting it up or want to customize this workflow further? Feel free to reach out — I’m happy to help with setup, customization, or Magento 2 API integration issues. Contact: Author 👤 Author Kanaka Kishore Kandregula Certified Magento 2 Developer https://gravatar.com/kmyprojects https://www.linkedin.com/in/kanakakishore

Kanaka Kishore KandregulaBy Kanaka Kishore Kandregula
163