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

Библиотека / Код, Git и инструменты разработчика

Код, Git и инструменты разработчика

Резервное копирование воркфлоу n8n в файлы репозитория GitHub через n8n API

Вызывается другим воркфлоу: получает воркфлоу через n8n API, преобразует его в JSON и создаёт или обновляет соответствующий файл в GitHub.

Что делает

## Push Git ### How it works This workflow is triggered by another n8n workflow and receives or normalizes a workflow ID. It fetches that workflow from n8n, keeps only the properties needed for version control, converts the result into a JSON file, then checks GitHub for the corresponding file. Depending on whether the file exists and has changes, it either creates a new GitHub file or updates the existing one. ### Setup steps - Configure the n8n credentials/permissions so the workflow can read workflows by ID. - Configure the GitHub credentials on the GitHub nodes with access to the target repository and branch. - Set the expected workflow ID input used by the trigger and confirm the file path/name conventions in the GitHub create, read, and edit nodes. - Verify the filtered workflow properties match what should be committed to Git. ### Customization You can adjust the filtered fields, JSON file naming/path, target repository/branch, and the modification condition to change what gets pushed and when.

Шаги

  1. Retrieve Workflow Data
  2. Create GitHub File
  3. Edit GitHub File
  4. Check for Modifications
  5. Set Workflow Properties
  6. Workflow Execution Trigger
  7. Initialize Workflow ID
  8. Fetch GitHub Workflow File
  9. Convert to JSON File Format

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