AutomationFlowsGeneral › Backup N8N Workflows To Google Drive

Backup N8N Workflows To Google Drive

Backup N8N Workflows To Google Drive. Uses manualTrigger, moveBinaryData, httpRequest, functionItem. Event-driven trigger; 9 nodes.

Event trigger★★★★☆ complexity9 nodesMove Binary DataHttp RequestFunction ItemGoogle Drive
General Trigger: Event Nodes: 9 Complexity: ★★★★☆

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 →

Download .json
{
  "nodes": [
    {
      "name": "On clicking 'execute'",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        320,
        170
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        960,
        320
      ],
      "parameters": {
        "mode": "mergeByIndex"
      },
      "typeVersion": 1
    },
    {
      "name": "Move Binary Data",
      "type": "n8n-nodes-base.moveBinaryData",
      "position": [
        1260,
        320
      ],
      "parameters": {
        "mode": "jsonToBinary",
        "options": {
          "useRawData": false
        }
      },
      "typeVersion": 1
    },
    {
      "name": "Map",
      "type": "n8n-nodes-base.function",
      "position": [
        710,
        320
      ],
      "parameters": {
        "functionCode": "return items[0].json.data.map(item => {\n  return {json: item}\n});"
      },
      "typeVersion": 1
    },
    {
      "name": "Get Workflow",
      "type": "n8n-nodes-base.httpRequest",
      "notes": "Don't forget to add your credentials for your n8n instance in this Node. Use Basic Auth for this. ",
      "position": [
        830,
        460
      ],
      "parameters": {
        "url": "=http://localhost:5678/rest/workflows/{{$node[\"Map\"].data[\"id\"]}}",
        "options": {},
        "authentication": "basicAuth"
      },
      "credentials": {
        "httpBasicAuth": "<your credential>"
      },
      "notesInFlow": false,
      "typeVersion": 1
    },
    {
      "name": "Get Workflow List",
      "type": "n8n-nodes-base.httpRequest",
      "notes": "Don't forget to add your credentials for your n8n instance in this Node. Use Basic Auth for this. ",
      "position": [
        520,
        320
      ],
      "parameters": {
        "url": "http://localhost:5678/rest/workflows",
        "options": {},
        "authentication": "basicAuth"
      },
      "credentials": {
        "httpBasicAuth": "<your credential>"
      },
      "typeVersion": 1
    },
    {
      "name": "FunctionItem",
      "type": "n8n-nodes-base.functionItem",
      "position": [
        1110,
        320
      ],
      "parameters": {
        "functionCode": "item = item.data;\nreturn item;"
      },
      "typeVersion": 1
    },
    {
      "name": "Google Drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1450,
        320
      ],
      "parameters": {
        "name": "={{$node[\"Merge\"].data[\"name\"]}}.json",
        "parents": [
          "Delete this text and put id for folder you want to upload into in this field. The folder ID can be found by opening the folder in your browser and copying the portion after https://drive.google.com/drive/u/0/folders/"
        ],
        "binaryData": true,
        "resolveData": true
      },
      "credentials": {
        "googleApi": "<your credential>"
      },
      "typeVersion": 1
    },
    {
      "name": "Run Daily at 2:30am",
      "type": "n8n-nodes-base.cron",
      "position": [
        330,
        320
      ],
      "parameters": {
        "triggerTimes": {
          "item": [
            {
              "hour": 2,
              "minute": 30
            }
          ]
        }
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "Map": {
      "main": [
        [
          {
            "node": "Get Workflow",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "FunctionItem",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "FunctionItem": {
      "main": [
        [
          {
            "node": "Move Binary Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Workflow": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Move Binary Data": {
      "main": [
        [
          {
            "node": "Google Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Workflow List": {
      "main": [
        [
          {
            "node": "Map",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Run Daily at 2:30am": {
      "main": [
        [
          {
            "node": "Get Workflow List",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On clicking 'execute'": {
      "main": [
        [
          {
            "node": "Get Workflow List",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

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.

About this workflow

Backup N8N Workflows To Google Drive. Uses manualTrigger, moveBinaryData, httpRequest, functionItem. Event-driven trigger; 9 nodes.

Source: https://github.com/Zie619/n8n-workflows — original creator credit. Request a take-down →

More General workflows → · Browse all categories →