Перейти к содержанию
НОВОЕПознакомьтесь с Alaaddin — вашим ИИ-джинном с голосом. trig8n запускается 1 января 2027. Что нового

Библиотека / Синхронизация данных и ETL

Синхронизация данных и ETL

Send nightly staging vs production drift digest from Google Sheets with Snapshot Site and

On a schedule, it moves and syncs data using Google Sheets, Slack, Snapshot Site.

Что делает

## Nightly Staging vs Production Drift Digest → Slack ### How it works Every night this workflow reads a list of paths from a Google Sheet (path, label), joins each one onto a production base URL and a staging base URL, and runs a single Snapshot Site Compare call per path with the production URL as beforeUrl and the staging URL as afterUrl. Compare captures both sides itself, so one path costs one API call — not two Screenshots plus a Compare. No baseline images are stored anywhere: both sides are live. Each result is bucketed into a drift band (identical / minor / significant / severe) and, when the loop finishes, rendered as one Slack digest sorted worst-first. A path that cannot be reached is recorded as failed and the loop continues, so one dead path never costs you the whole report. ### Setup steps - Install the n8n-nodes-snapshot-site community node (Settings → Community nodes → Install → n8n-nodes-snapshot-site) — verified by n8n. - Add a Snapshot Site credential, a Google Sheets credential, and a Slack credential. - Create a Paths tab and type this header row literally into row 1, one column per cell: path, label. Cell A1 must contain the literal text path, not a path or a URL — otherwise Google Sheets' read operation treats that value as the column name, $json.path is undefined for every row, and every Compare call fails. - Fill one row per page: path = the route only (/, /pricing, /blog/hello), label = a short human name for the digest. - Open Build Environment URL Pair and edit the two constants at the top — PROD_BASE and STAGING_BASE. Both must include https://; the API rejects a bare domain with a soft error. They live in one node deliberately: two hardcoded bases in two different nodes drift apart. - ⚠️ Keep beforeOptions and afterOptions byte-identical on Compare Staging to Production. A different width, or hideCookie on one side only, manufactures permanent false drift on every single path — and that noise is indistinguishable from real drift. If you edit one option, edit the other in the same breath. - Point Read Staging Path List at your spreadsheet, set the channel on both Slack nodes, and adjust the schedule. ### Customization Tune the drift bands in Record Drift Result (MINOR_DRIFT_PCT, SIGNIFICANT_DRIFT_PCT, SEVERE_DRIFT_PCT) rather than adding a flat changed/unchanged gate — a nightly staging diff is never zero, because staging

Шаги

  1. When Every Night at 2AM
  2. Read Staging Path List
  3. Loop Over Paths
  4. Build Environment URL Pair
  5. Compare Staging to Production
  6. Check for API Error
  7. Record Drift Result
  8. Record Failed Path
  9. Build Staging Drift Digest
  10. Check for Significant Drift
  11. Notify Staging Drift on Slack
  12. Notify Quiet Night on Slack

Похожие автоматизации