n8nSoftwareInfra & DevOpsAI score · PendingAI-assisted edit · no obvious prompt-injection riskn8n.io

Post-Deploy Visual Regression Detection: Snapshot Site + Slack + GitHub

After CI deploy → Webhook trigger → wait for render stability → Snapshot Site screenshot compare → Slack alert and GitHub Issue on mismatch

ExperiencedStepsWorkflowPromptTip
Who
DevOps and frontend teams who need automated visual verification after each deployment
You get
Automatically compare baseline and deployed pages after deploy, alerting the team and creating a tracking issue when layout regression is detected
You need
n8n · slack · github · snapshot-site

Constraints

Prerequisites: accessible n8n instance; Snapshot Site API credential; Slack workspace credential; GitHub personal access token with repo scope. Input: CI pipeline POSTs url, baselineUrl, optional commit and environment. Boundaries: url and baselineUrl must be full https URLs; Snapshot Site returns soft errors for bare domains (HTTP 200 + {error: true}); Wait defaults to 45s, typical range 30–60s; mismatch threshold defaults to 10%, adjustable per site rendering variability. Cost: Snapshot Site API billed per call; see official pricing.

What they did

Template author snapshotsite created an n8n workflow that receives a CI deploy-complete signal via Webhook, waits 45 seconds for CDN and client-side rendering to stabilize, then calls Snapshot Site Compare to diff the deployed page against a baseline.

How it went

Author reports (author_report): on hard or soft errors (HTTP 200 with {error: true}), the workflow sends error details to Slack #deploys-alerts; when mismatch percentage reaches or exceeds 10%, it simultaneously alerts Slack #deploys and creates a GitHub issue; clean deploys end silently.

Worth knowing

The 10% threshold is a layout-drift band; >0% catches character-level changes, ~30% is defacement-level. For genuinely dynamic regions, use hide (comma-separated CSS selectors) in afterOptions rather than raising the threshold. The GitHub node can be swapped for Jira/Linear, or dropped to keep only Slack. Snapshot Site pricing and rate limits are not provided in the source—check their website before production use. This site has not tested this workflow.

n8n workflow template

Structure checked · Not run-tested

Use “Import from File” in n8n, or copy the JSON and paste it into the editor. Connect your own accounts, then try test data. The template is inactive by default.

Setup and test checklist

Credentials to connect

  • Compare Deploy to Baseline node: connect snapshotSiteApi credentials.

Configuration to replace

  • Source template is n8n public workflow #18133 (~13 nodes). Keep inactive after import; verify triggers, expressions and external API endpoints.
  • Sticky-note guidance is informational; replace placeholders with your own accounts, sheet schemas or channel IDs.

Test input and expected output

  • Manually run the main path once in a test workspace and confirm credentialed nodes authenticate without errors.
  • Drive one synthetic/redacted sample through and check output fields and downstream writes before enabling in production.

Template changes

  • Author credential bindings, webhookId and execution data are removed; the workflow is inactive. Nodes, connections and original prompts are preserved. Not run-tested in n8n.
  • No business-logic edits; verify keys, quotas and privacy compliance before use.

Template retrieved: 2026-10-25

Steps

  1. Install community node and configure credentials

    In n8n Settings, go to Community nodes and install the verified `n8n-nodes-snapshot-site`. Then add three credentials: Snapshot Site API, Slack, and GitHub (using a personal access token with repo scope). Pre-fill the repository owner and repository name in the GitHub node.

  2. Configure Webhook and CI integration

    Activate the workflow, then copy the Webhook node's Production URL. Configure the last step of your CI pipeline to POST a JSON body containing `url` (deployed page address), `baselineUrl` (baseline address), and optionally `commit` (commit SHA) and `environment` (environment name). Ensure both URLs are full https addresses.

  3. Set wait time and screenshot comparison

    After receiving the Webhook, the Wait node pauses for 45 seconds (adjustable to 30–60s) to let CDN caches and client-side rendering stabilize. Then the Compare Deploy to Baseline node calls Snapshot Site Compare with `afterUrl` set to `$json.body.url`, `beforeUrl` to `$json.body.baselineUrl`, operation set to compare, and afterOptions including delay:3, fullSize:true, hideCookie:true. The node is configured with maxTries:3, waitBetweenTries:5000, routing hard errors to the error output.

  4. Configure error handling and regression detection branches

    The Check for API Error node evaluates `$json.error === true`; if true, it routes to the Slack failure alert branch. If false, it proceeds to the Check for Layout Regression node, which checks `$json.summary.mismatchPercentage >= 10`. Meeting the threshold enters the regression handling branch; otherwise it ends silently via No-Op.

  5. Configure Slack and GitHub notifications

    The regression branch triggers two nodes in parallel: Notify Visual Regression on Slack sends a formatted message with mismatch percentage and diff/before/after links to the #deploys channel; Create Visual Regression Issue on GitHub creates an issue with environment, commit, mismatch data, and screenshot links in title and body. The API error branch sends error details to #deploys-alerts via Notify Comparison Failure on Slack.

    Execution prompt · Source text。Notify Visual Regression on Slack node text parameter

    =🚨 *Visual regression after deploy* — `{{ $('When a Deploy Finishes').first().json.body.environment || 'production' }}` @ `{{ $('When a Deploy Finishes').first().json.body.commit || 'unknown commit' }}`
    Mismatch *{{ $json.summary.mismatchPercentage }}%* ({{ $json.summary.mismatchPixels.toLocaleString() }} of {{ $json.summary.totalPixels.toLocaleString() }} px){{ $json.summary.sameDimensions ? '' : ' · page dimensions changed' }} on {{ $json.after.source }}
    <{{ $json.diff.link }}|View diff> · <{{ $json.before.link }}|Baseline> · <{{ $json.after.link }}|Deployed>

    Execution prompt · Source text。Notify Comparison Failure on Slack node text parameter

    =🔴 Post-deploy visual smoke test could not run for `{{ $('When a Deploy Finishes').first().json.body.environment || 'production' }}` @ `{{ $('When a Deploy Finishes').first().json.body.commit || 'unknown commit' }}`: {{ $json.error?.message || $json.message }}

Prompt you can copy

Setup guidance · Editorial suggestion。Hand to setup assistant: confirm inputs and permissions first, then reproduce step by step

This block is the prompt. Ads are never placed here.

You are setting up an n8n workflow to automatically detect visual regressions after CI deploys. First confirm you have: access to an n8n instance, a Snapshot Site API key, Slack workspace admin rights, and a GitHub repo-scoped PAT. Then proceed in order: 1) Install the n8n-nodes-snapshot-site community node and configure the three credentials; 2) Import the template or manually create nodes and connections per workflow.json; 3) Change the GitHub node's owner/repository to your actual repo; 4) Copy the Webhook Production URL into your CI's final step; 5) Trigger with a test POST and verify Slack and GitHub output formatting.

The template uses placeholder values 'your-org'/'your-repo' for GitHub owner/repository—replace with actuals. Slack channelId uses name mode '#deploys' and '#deploys-alerts'; confirm these channels exist or update to your target channels.

Source

Report post-deploy visual regressions with Snapshot Site, Slack, and GitHub · snapshotsite · n8n.io · 2026-08-12

Comments & feedback

Tried this method? Share results, problems or improvements. Comments appear after moderation. Please avoid sensitive information.

Loading…

    Related