Post PR preview page screenshots to GitHub pull requests with Snapshot Site
UnknownWhat this workflow does
This workflow has 10 nodes and runs when an HTTP POST request hits its webhook URL. Along the way it connects GitHub and Snapshot Site (community).
How it runs
Trigger: When an HTTP POST request hits its webhook URL.
- Build Preview Page List (Code): runs custom JavaScript code
- Wait: waits 30 seconds
- Loop Over Changed Pages (Loop Over Items (Split in Batches)): loops over the items in batches
- Build PR Comment (Code): runs custom JavaScript code
- Capture Preview Page (Snapshot Site): uses Snapshot Site
- Post Preview Screenshots on the PR (GitHub): create comment
- Check for API Error (If): checks a condition and branches into true / false
- Record Failed Capture (Edit Fields (Set)): sets 11 fields: label, path, url…
- Record Page Capture (Edit Fields (Set)): sets 11 fields: label, path, url…
Services it uses
Before you upgrade to n8n 3.0
We can't fully verify this one: it relies on 1 community package, and n8n 3.0 turns unverified community packages off by default (N8N_UNVERIFIED_PACKAGES_ENABLED=false).
- Check that n8n-nodes-snapshot-site is verified or supports 3.0 (used in Capture Preview Page).
Nodes used (8)
- Webhook
n8n-nodes-base.webhook - Code
n8n-nodes-base.code - Wait
n8n-nodes-base.wait - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - Snapshot Site
n8n-nodes-snapshot-site.snapshotSite - If
n8n-nodes-base.if - Edit Fields (Set)
n8n-nodes-base.set - GitHub
n8n-nodes-base.github
From the author
Quick overview This workflow receives a webhook from your CI when a pull request preview is deployed, screenshots only the changed preview routes using Snapshot Site, and posts a single GitHub pull request comment containing a summary table, embedded…