Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

I Lost a Working n8n Workflow to a Bad Edit — Now Git Versions Every Deploy

Описание и применение

Автор создал nightly‑экспортер, сохраняющий каждый workflow n8n в git‑репозиторий, удаляя шумовые поля и коммитя только при реальных изменениях. Это позволяет быстро откатываться к предыдущим версиям и уменьшает время восстановления с 40 минут до 20 минут в месяц.

Задача

A bad edit of an n8n workflow caused a client to receive 200 un‑triaged emails, and the author had no reliable way to revert the change.

Результат

The exporter provides reliable rollback, reduces recovery time from 40 minutes to 20 minutes per month, and prevents accidental loss of workflow logic.

Рабочий процесс

  • 1. Cron trigger at 23:00 daily
  • 2. HTTP node GET /api/v1/workflows to fetch all workflows
  • 3. Code node removes updatedAt, createdAt, versionId, webhookId from JSON
  • 4. Write each workflow to workflows/<slug>.json and a manifest.json
  • 5. Execute node runs git diff --quiet; if changed, commit with descriptive message and push

Доказательства

I added it myself — a nightly exporter that snapshots every workflow into a git repo, so a bad edit is a git checkout instead of a 40-minute guessing game.

Источник

The exporter backs itself up too; I've seen enough backup scripts that exclude themselves.

Источник

Without this step, every nightly export shows "changes" that are just timestamps, and the git history becomes unreadable.

Источник

The drill takes 20 minutes a month. The Friday-night incident took 40 minutes and a client's trust.

Источник

  • Дата записи: 2026-10-17T22:41:28.611Z