The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"updatedAt": "2025-11-24T18:24:24.000Z",
"createdAt": "2025-10-07T17:14:07.509Z",
"id": "g3FxqxmmnS7h1qU7",
"name": "Backup n8n workflows",
"active": true,
"isArchived": false,
"nodes": [
{
"parameters": {
"options": {}
},
"id": "3471f3e8-08b1-4d2b-b511-e99fa865ceb1",
"name": "Set date",
"type": "n8n-nodes-base.dateTime",
"typeVersion": 2,
"position": [
848,
640
]
},
{
"parameters": {
"operation": "formatDate",
"date": "={{ $json.currentDate }}",
"format": "custom",
"customFormat": "dd-MM-yyyy/H:mm",
"options": {}
},
"id": "73dd042b-0afa-45ec-a8d1-2d96349fb0c7",
"name": "Format date",
"type": "n8n-nodes-base.dateTime",
"typeVersion": 2,
"position": [
1056,
640
]
},
{
"parameters": {
"keepOnlySet": true,
"values": {
"string": [
{
"name": "commitDate",
"value": "={{ $json.formattedDate }}"
}
]
},
"options": {}
},
"id": "ce4b2101-e425-462b-bbec-aa9f13e95dec",
"name": "Set commit date",
"type": "n8n-nodes-base.set",
"typeVersion": 2,
"position": [
1248,
640
]
},
{
"parameters": {
"authentication": "oAuth2",
"resource": "file",
"operation": "list",
"owner": {
"__rl": true,
"value": "SamVivan1",
"mode": "name"
},
"repository": {
"__rl": true,
"value": "n8n-Workflows-Backup",
"mode": "list",
"cachedResultName": "n8n-Workflows-Backup",
"cachedResultUrl": "https://github.com/SamVivan1/n8n-Workflows-Backup"
},
"filePath": "="
},
"id": "fed7c213-77a8-46e6-a7c8-5879ca2e1ce0",
"name": "List files from repository [GITHUB]",
"type": "n8n-nodes-base.github",
"typeVersion": 1,
"position": [
1456,
640
],
"alwaysOutputData": true,
"credentials": {
"githubOAuth2Api": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"operation": "aggregateItems",
"fieldsToAggregate": {
"fieldToAggregate": [
{
"fieldToAggregate": "name"
}
]
},
"options": {}
},
"id": "c759eb00-eb12-4a83-ac61-20074876c6a6",
"name": "Combine file names [GITHUB]",
"type": "n8n-nodes-base.itemLists",
"typeVersion": 2.1,
"position": [
1648,
640
]
},
{
"parameters": {
"filters": {},
"requestOptions": {}
},
"id": "bc76d3e1-d087-42bc-a274-e1d21ebd7e98",
"name": "Retrieve workflows [N8N]",
"type": "n8n-nodes-base.n8n",
"typeVersion": 1,
"position": [
1856,
640
],
"retryOnFail": true,
"credentials": {
"n8nApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"mode": "jsonToBinary",
"options": {
"fileName": "={{ $json.name.replace(/\\s+/g, '-').toLowerCase() }}-{{ $json.id }}.json"
}
},
"id": "7396c544-daa3-4994-8e49-6bde064106a0",
"name": "Move JSON to binary",
"type": "n8n-nodes-base.moveBinaryData",
"typeVersion": 1,
"position": [
2048,
640
]
},
{
"parameters": {
"batchSize": 1,
"options": {}
},
"id": "3d324c45-097f-4cae-85da-46b0881ce7ca",
"name": "Split to single items",
"type": "n8n-nodes-base.splitInBatches",
"typeVersion": 2,
"position": [
2288,
640
]
},
{
"parameters": {
"conditions": {
"string": [
{
"value1": "={{ $node['Combine file names [GITHUB]'].json.name }}",
"operation": "contains",
"value2": "={{ $binary.data.fileName }}"
}
]
}
},
"id": "e4d357e0-9015-4101-a5d5-7a8c98e11179",
"name": "Check if file exists in repository",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
2528,
560
]
},
{
"parameters": {
"authentication": "oAuth2",
"resource": "file",
"operation": "edit",
"owner": {
"__rl": true,
"value": "SamVivan1",
"mode": "name"
},
"repository": {
"__rl": true,
"value": "n8n-Workflows-Backup",
"mode": "list",
"cachedResultName": "n8n-Workflows-Backup",
"cachedResultUrl": "https://github.com/SamVivan1/n8n-Workflows-Backup"
},
"filePath": "={{ $binary.data.fileName }}",
"binaryData": true,
"commitMessage": "=backup-{{ $node['Set commit date'].json.commitDate }}"
},
"id": "ea077f16-d124-4d85-8c58-86f791543665",
"name": "Update file [GITHUB]",
"type": "n8n-nodes-base.github",
"typeVersion": 1,
"position": [
2752,
400
],
"credentials": {
"githubOAuth2Api": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"authentication": "oAuth2",
"resource": "file",
"owner": {
"__rl": true,
"value": "SamVivan1",
"mode": "name"
},
"repository": {
"__rl": true,
"value": "n8n-Workflows-Backup",
"mode": "list",
"cachedResultName": "n8n-Workflows-Backup",
"cachedResultUrl": "https://github.com/SamVivan1/n8n-Workflows-Backup"
},
"filePath": "={{ $binary.data.fileName }}",
"binaryData": true,
"commitMessage": "=backup-{{ $node['Set commit date'].json.commitDate }}"
},
"id": "a525341c-56e6-49d4-8286-54e3b5168884",
"name": "Upload file [GITHUB]",
"type": "n8n-nodes-base.github",
"typeVersion": 1,
"position": [
2752,
704
],
"credentials": {
"githubOAuth2Api": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"content": "## Trigger\nYou can change it to [\"Schedule\" trigger](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.scheduletrigger/) to make backups on regular basis.",
"height": 339.51767272727324,
"width": 182.4715262478496
},
"id": "1e61ed75-0621-450a-bd9f-cca70a64ffa6",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
608,
480
]
},
{
"parameters": {
"content": "## Set and format date/time\nThose nodes are responsible for setting a current date and time in format `dd-MM-yyyy/H:mm`. Date and time are used to compose commit messages in GitHub, for example: `backup-12-07-2023/14:18`.",
"height": 339.42690909090965,
"width": 585.4045090909088
},
"id": "7a31da98-f1d4-4a03-aa1c-1c4ce2fa433d",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
816,
480
]
},
{
"parameters": {
"content": "## Make a list of existing files\nReturn a list of existing files (backups) in GitHub repository. Data returned by those nodes is used by \"IF\" node (later in workflow) to check whether the backup files should be created or updated.",
"height": 339.42690909090965,
"width": 389.89265454545443
},
"id": "95e37cfe-6304-4dd3-bf65-bcaf615bef4d",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
1408,
480
]
},
{
"parameters": {
"content": "## Retrieve workflows\nGet all workflows form your n8n instance. Remember that **your credentials need to point to the instance that you want to backup.**",
"height": 339.42690909090965,
"width": 384.14708363636373
},
"id": "1b02775e-174a-4b5f-8cd0-38bbaad37a58",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
1824,
480
]
},
{
"parameters": {
"content": "## Upload backup\nSplit JSON files into batches of 1, check if they were uploaded to repository before. If yes (true), upload the new version of the file. Otherwise (false) create the file in repository.",
"height": 731.633426614796,
"width": 703.8733020263451
},
"id": "7f1f4ae1-209a-4244-b67f-e4c9e3d2aad9",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
2224,
224
]
},
{
"parameters": {
"content": "## \u26a0\ufe0f Note\n\n1. Complete video guide for this workflow is available [on my YouTube](https://www.youtube.com/watch?v=dNuVuoPD0Jo). \n2. Remember to add your credentials and configure GitHub nodes (covered in the video guide).\n3. If you like this workflow, please subscribe to [my YouTube channel](https://www.youtube.com/@workfloows) and/or [my newsletter](https://workfloows.com/).\n\n**Thank you for your support!**",
"height": 234.82946582693546,
"width": 508.8662091091177
},
"id": "449ee861-bac5-4f13-8cf1-06a2f02ef819",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
608,
224
]
},
{
"parameters": {
"rule": {
"interval": [
{}
]
}
},
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.2,
"position": [
640,
640
],
"id": "3304712d-bb31-434f-b2d9-7d4756bd1eb3",
"name": "Schedule Trigger"
},
{
"parameters": {
"authentication": "webhook",
"content": "=<@664803448629493816>\n\u2705 Workflows backup succeed\n\ud83d\udd17 **Link** : https://github.com/SamVivan1/n8n-Workflows-Backup\n\ud83d\udd5c **Time** : {{ $now.format('yyyy-MM-dd hh:mm') }}WIB\n\n-----------------------------------------",
"options": {}
},
"type": "n8n-nodes-base.discord",
"typeVersion": 2,
"position": [
2176,
1008
],
"id": "a053b844-8aa6-48d4-81df-5b63e5443357",
"name": "Discord",
"credentials": {
"discordWebhookApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"httpMethod": "POST",
"path": "c9281975-90e8-4adf-a6d9-de14ac071abc",
"options": {}
},
"type": "n8n-nodes-base.webhook",
"typeVersion": 2.1,
"position": [
640,
848
],
"id": "7a22a2e8-92c2-4d68-8a76-f857e45ed763",
"name": "Webhook"
}
],
"connections": {
"Set date": {
"main": [
[
{
"node": "Format date",
"type": "main",
"index": 0
}
]
]
},
"Format date": {
"main": [
[
{
"node": "Set commit date",
"type": "main",
"index": 0
}
]
]
},
"Set commit date": {
"main": [
[
{
"node": "List files from repository [GITHUB]",
"type": "main",
"index": 0
}
]
]
},
"List files from repository [GITHUB]": {
"main": [
[
{
"node": "Combine file names [GITHUB]",
"type": "main",
"index": 0
}
]
]
},
"Combine file names [GITHUB]": {
"main": [
[
{
"node": "Retrieve workflows [N8N]",
"type": "main",
"index": 0
},
{
"node": "Discord",
"type": "main",
"index": 0
}
]
]
},
"Retrieve workflows [N8N]": {
"main": [
[
{
"node": "Move JSON to binary",
"type": "main",
"index": 0
}
]
]
},
"Move JSON to binary": {
"main": [
[
{
"node": "Split to single items",
"type": "main",
"index": 0
}
]
]
},
"Split to single items": {
"main": [
[
{
"node": "Check if file exists in repository",
"type": "main",
"index": 0
}
]
]
},
"Check if file exists in repository": {
"main": [
[
{
"node": "Update file [GITHUB]",
"type": "main",
"index": 0
}
],
[
{
"node": "Upload file [GITHUB]",
"type": "main",
"index": 0
}
]
]
},
"Update file [GITHUB]": {
"main": [
[
{
"node": "Split to single items",
"type": "main",
"index": 0
}
]
]
},
"Upload file [GITHUB]": {
"main": [
[
{
"node": "Split to single items",
"type": "main",
"index": 0
}
]
]
},
"Schedule Trigger": {
"main": [
[
{
"node": "Set date",
"type": "main",
"index": 0
}
]
]
},
"Webhook": {
"main": [
[
{
"node": "Set date",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1",
"callerPolicy": "workflowsFromSameOwner",
"errorWorkflow": "AvhjGJdACMdnvIEn",
"timeSavedPerExecution": 2
},
"staticData": {
"node:Schedule Trigger": {
"recurrenceRules": []
}
},
"meta": {
"templateCredsSetupCompleted": true
},
"versionId": "e2177e4e-f1c7-40d0-86a5-384fce761104",
"triggerCount": 2,
"shared": [
{
"updatedAt": "2025-10-07T17:14:07.513Z",
"createdAt": "2025-10-07T17:14:07.513Z",
"role": "workflow:owner",
"workflowId": "g3FxqxmmnS7h1qU7",
"projectId": "DiQC0tGxFhuiK9UM"
}
],
"tags": []
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
discordWebhookApigithubOAuth2Apin8nApi
About this workflow
Backup n8n workflows. Uses dateTime, github, itemLists, n8n. Scheduled trigger; 20 nodes.
Source: https://github.com/SamVivan1/n8n-Workflows-Backup/blob/main/backup-n8n-workflows-g3FxqxmmnS7h1qU7.json — original creator credit. Request a take-down →