8
n8n 한국어amn8n.com

작업 흐름을 git 저장소에 백업

고급

이것은Other분야의자동화 워크플로우로, 17개의 노드를 포함합니다.주로 If, N8n, Set, Code, Github 등의 노드를 사용하며. Github의 git 저장소에 작업 흐름 백업

사전 요구사항
  • GitHub Personal Access Token

카테고리

워크플로우 미리보기
노드 연결 관계를 시각적으로 표시하며, 확대/축소 및 이동을 지원합니다
워크플로우 내보내기
다음 JSON 구성을 복사하여 n8n에 가져오면 이 워크플로우를 사용할 수 있습니다
{
  "name": "Backup workflows to git repository",
  "nodes": [
    {
      "id": "b09ae4c6-ad75-4b3b-a78a-4cc2d48b2d24",
      "name": "GitHub",
      "type": "n8n-nodes-base.github",
      "position": [
        -40,
        -20
      ],
      "parameters": {
        "owner": "={{$node[\"Globals\"].json[\"repo\"][\"owner\"]}}",
        "filePath": "={{$node[\"Globals\"].json[\"repo\"][\"path\"]}}{{$json[\"name\"]}}.json",
        "resource": "file",
        "operation": "get",
        "repository": "={{$node[\"Globals\"].json[\"repo\"][\"name\"]}}",
        "asBinaryProperty": false,
        "additionalParameters": {}
      },
      "credentials": {
        "githubApi": {
          "id": "lSdxakI6ik5M2np2",
          "name": "Shashikanth | GitHub account"
        }
      },
      "typeVersion": 1,
      "continueOnFail": true,
      "alwaysOutputData": true
    },
    {
      "id": "639582ef-f13e-4844-bd10-647718079121",
      "name": "Globals",
      "type": "n8n-nodes-base.set",
      "position": [
        -740,
        -100
      ],
      "parameters": {
        "values": {
          "string": [
            {
              "name": "repo.owner",
              "value": "shashikanth171"
            },
            {
              "name": "repo.name",
              "value": "n8n-backup"
            },
            {
              "name": "repo.path",
              "value": "workflows/"
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "9df89713-220e-43b9-b234-b8f5612629cf",
      "name": "n8n",
      "type": "n8n-nodes-base.n8n",
      "position": [
        -500,
        -100
      ],
      "parameters": {
        "filters": {},
        "requestOptions": {}
      },
      "credentials": {
        "n8nApi": {
          "id": "RgwFr3HsPUEjFJNO",
          "name": "n8n account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "43a60315-d381-4ac4-be4c-f6a158651a00",
      "name": "항목 반복",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -280,
        -100
      ],
      "parameters": {
        "options": {}
      },
      "executeOnce": false,
      "typeVersion": 3
    },
    {
      "id": "41a7da89-1c8c-4100-8c30-d0788962efc1",
      "name": "조건문",
      "type": "n8n-nodes-base.if",
      "position": [
        160,
        -20
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "16a9182d-059d-4774-ba95-654fb4293fdb",
              "operator": {
                "type": "string",
                "operation": "notExists",
                "singleValue": true
              },
              "leftValue": "={{ $json.error }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "ab9246eb-a253-4d76-b33b-5f8f12342542",
      "name": "조건문1",
      "type": "n8n-nodes-base.if",
      "position": [
        1040,
        260
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "e0c66624-429a-4f1f-bf7b-1cc1b32bad7b",
              "operator": {
                "type": "string",
                "operation": "notEquals"
              },
              "leftValue": "={{ $json.content }}",
              "rightValue": "={{ $('Loop Over Items').item.json.toJsonString() }}"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "72e4a5a4-6dfe-4b5c-b57b-7c1c9625e967",
      "name": "코드",
      "type": "n8n-nodes-base.code",
      "position": [
        720,
        -40
      ],
      "parameters": {
        "jsCode": "let items = $input.all()\n\nfor (item of items) {\n    item.json.content = Buffer.from(item.json.content, 'base64').toString('utf8')\n}\n\nreturn items;\n"
      },
      "typeVersion": 2
    },
    {
      "id": "68f14ac5-14d6-432e-9e6b-25df610eadac",
      "name": "새 파일 생성 및 커밋",
      "type": "n8n-nodes-base.github",
      "position": [
        340,
        140
      ],
      "parameters": {
        "owner": "={{$node[\"Globals\"].json[\"repo\"][\"owner\"]}}",
        "filePath": "={{$node[\"Globals\"].json[\"repo\"][\"path\"]}}{{ $('Loop Over Items').item.json.name }}.json",
        "resource": "file",
        "repository": "={{$node[\"Globals\"].json[\"repo\"][\"name\"]}}",
        "fileContent": "={{ $('Loop Over Items').item.json.toJsonString()  }}",
        "commitMessage": "=[N8N Backup] {{ $('Loop Over Items').item.json.name }}.json"
      },
      "credentials": {
        "githubApi": {
          "id": "lSdxakI6ik5M2np2",
          "name": "Shashikanth | GitHub account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "e50f00a3-292c-4285-b767-8d6ee4606575",
      "name": "파일 내용 업데이트 및 커밋",
      "type": "n8n-nodes-base.github",
      "position": [
        1400,
        460
      ],
      "parameters": {
        "owner": "={{$node[\"Globals\"].json[\"repo\"][\"owner\"]}}",
        "filePath": "={{$node[\"Globals\"].json[\"repo\"][\"path\"]}}{{ $('Loop Over Items').item.json.name }}.json",
        "resource": "file",
        "operation": "edit",
        "repository": "={{$node[\"Globals\"].json[\"repo\"][\"name\"]}}",
        "fileContent": "={{ $('Loop Over Items').item.json.toJsonString()  }}",
        "commitMessage": "=[N8N Backup] {{ $('Loop Over Items').item.json.name }}.json"
      },
      "credentials": {
        "githubApi": {
          "id": "lSdxakI6ik5M2np2",
          "name": "Shashikanth | GitHub account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "4b2d375c-a339-404c-babd-555bd2fc4091",
      "name": "스케줄 트리거",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -960,
        -100
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "minutes"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "ea026e96-0db1-41fd-b003-2f2bf4662696",
      "name": "스티커 노트",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1560,
        480
      ],
      "parameters": {
        "height": 80,
        "content": "Workflow changes committed to the repository"
      },
      "typeVersion": 1
    },
    {
      "id": "9c402daa-6d03-485d-b8a0-58f1b65d396d",
      "name": "스티커 노트1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1180,
        260
      ],
      "parameters": {
        "height": 80,
        "content": "Check if there are any changes in the workflow"
      },
      "typeVersion": 1
    },
    {
      "id": "1d9216d9-bf8d-4945-8a58-22fb1ffc9be8",
      "name": "스티커 노트2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        460,
        160
      ],
      "parameters": {
        "height": 80,
        "content": "Create a new file for the workflow"
      },
      "typeVersion": 1
    },
    {
      "id": "60a3953b-d9f1-4afd-b299-e314116b96c6",
      "name": "스티커 노트3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        160,
        -120
      ],
      "parameters": {
        "height": 80,
        "content": "Check if file exists in the repository"
      },
      "typeVersion": 1
    },
    {
      "id": "6df689fb-cb49-4634-9d1e-59648a1e7219",
      "name": "스티커 노트4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        660,
        -140
      ],
      "parameters": {
        "height": 80,
        "content": "Convert the file contents to JSON string"
      },
      "typeVersion": 1
    },
    {
      "id": "f2340ad0-71a1-4c74-8d90-bcb974b8b305",
      "name": "스티커 노트5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -560,
        -200
      ],
      "parameters": {
        "height": 80,
        "content": "Get all workflows"
      },
      "typeVersion": 1
    },
    {
      "id": "617bea19-341a-4e9d-b6fd-6b417e58d756",
      "name": "스티커 노트6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -820,
        40
      ],
      "parameters": {
        "height": 80,
        "content": "Set variables"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "41a7da89-1c8c-4100-8c30-d0788962efc1": {
      "main": [
        [
          {
            "node": "72e4a5a4-6dfe-4b5c-b57b-7c1c9625e967",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "68f14ac5-14d6-432e-9e6b-25df610eadac",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ab9246eb-a253-4d76-b33b-5f8f12342542": {
      "main": [
        [
          {
            "node": "e50f00a3-292c-4285-b767-8d6ee4606575",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "43a60315-d381-4ac4-be4c-f6a158651a00",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "9df89713-220e-43b9-b234-b8f5612629cf": {
      "main": [
        [
          {
            "node": "43a60315-d381-4ac4-be4c-f6a158651a00",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "72e4a5a4-6dfe-4b5c-b57b-7c1c9625e967": {
      "main": [
        [
          {
            "node": "ab9246eb-a253-4d76-b33b-5f8f12342542",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "b09ae4c6-ad75-4b3b-a78a-4cc2d48b2d24": {
      "main": [
        [
          {
            "node": "41a7da89-1c8c-4100-8c30-d0788962efc1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "639582ef-f13e-4844-bd10-647718079121": {
      "main": [
        [
          {
            "node": "9df89713-220e-43b9-b234-b8f5612629cf",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "43a60315-d381-4ac4-be4c-f6a158651a00": {
      "main": [
        [],
        [
          {
            "node": "b09ae4c6-ad75-4b3b-a78a-4cc2d48b2d24",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "4b2d375c-a339-404c-babd-555bd2fc4091": {
      "main": [
        [
          {
            "node": "639582ef-f13e-4844-bd10-647718079121",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "68f14ac5-14d6-432e-9e6b-25df610eadac": {
      "main": [
        [
          {
            "node": "43a60315-d381-4ac4-be4c-f6a158651a00",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "e50f00a3-292c-4285-b767-8d6ee4606575": {
      "main": [
        [
          {
            "node": "43a60315-d381-4ac4-be4c-f6a158651a00",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
자주 묻는 질문

이 워크플로우를 어떻게 사용하나요?

위의 JSON 구성 코드를 복사하여 n8n 인스턴스에서 새 워크플로우를 생성하고 "JSON에서 가져오기"를 선택한 후, 구성을 붙여넣고 필요에 따라 인증 설정을 수정하세요.

이 워크플로우는 어떤 시나리오에 적합한가요?

고급 - 기타

유료인가요?

이 워크플로우는 완전히 무료이며 직접 가져와 사용할 수 있습니다. 다만, 워크플로우에서 사용하는 타사 서비스(예: OpenAI API)는 사용자 직접 비용을 지불해야 할 수 있습니다.

워크플로우 정보
난이도
고급
노드 수17
카테고리1
노드 유형8
난이도 설명

고급 사용자를 위한 16+개 노드의 복잡한 워크플로우

외부 링크
n8n.io에서 보기

이 워크플로우 공유

카테고리

카테고리: 34