AutomationFlowsGeneral › Schedule n8n Workflow Export to Google Drive

Schedule n8n Workflow Export to Google Drive

Original n8n title: Code Schedule Export

Code Schedule Export. Uses scheduleTrigger, stickyNote, n8n, googleDrive. Scheduled trigger; 6 nodes.

Cron / scheduled trigger★★★★☆ complexity6 nodesn8nGoogle Drive
General Trigger: Cron / scheduled Nodes: 6 Complexity: ★★★★☆ Added:

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
{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "3239827a-ba1c-4131-bfbe-6fa7d35bfaae",
      "name": "Parameters",
      "type": "n8n-nodes-base.set",
      "position": [
        360,
        720
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "1b65def6-4984-497d-a4bc-232af22927ad",
              "name": "directory",
              "type": "string",
              "value": "https://drive.google.com/drive/folders/your-directory-id"
            },
            {
              "id": "c8c98f88-9f22-4574-88b8-1db99f6e4ec4",
              "name": "parentdrive",
              "type": "string",
              "value": "https://drive.google.com/drive/my-drive"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "de6411b5-5d53-4d42-b3b6-0fc4b84c52ea",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        180,
        720
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 1,
              "triggerAtMinute": 30
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "5b25b86a-c957-4aa3-9c10-b884ee30d9a1",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        160,
        460
      ],
      "parameters": {
        "color": 3,
        "width": 560,
        "height": 140,
        "content": "## Simplest n8n Workflow Backup \u2013 Automating Your Data Security in Google Drive"
      },
      "typeVersion": 1
    },
    {
      "id": "f5033398-ccf6-4126-9039-6fa8a5968552",
      "name": "Code",
      "type": "n8n-nodes-base.code",
      "position": [
        720,
        720
      ],
      "parameters": {
        "jsCode": "return items.map(item => {\n  const jsonData = JSON.stringify(item.json);\n  const binaryData = Buffer.from(jsonData).toString('base64');\n  item.binary = {\n    data: {\n      data: binaryData,\n      mimeType: 'application/json',\n      fileName: 'data.json'\n    }\n  };\n  return item;\n});"
      },
      "typeVersion": 2
    },
    {
      "id": "b8532f27-a619-4683-a835-096f3a450397",
      "name": "Get all n8n Workflows",
      "type": "n8n-nodes-base.n8n",
      "position": [
        540,
        720
      ],
      "parameters": {
        "filters": {},
        "requestOptions": {}
      },
      "credentials": {
        "n8nApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "e6c815c6-00ac-4d91-b92f-dfc0c962bcd3",
      "name": "Backup to Google Drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        900,
        720
      ],
      "parameters": {
        "name": "={{  $json.name+ \".json\"}}",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive",
          "cachedResultUrl": "https://drive.google.com/drive/my-drive",
          "cachedResultName": "My Drive"
        },
        "options": {},
        "folderId": {
          "__rl": true,
          "mode": "url",
          "value": "={{ $('Parameters').item.json.directory }}"
        }
      },
      "retryOnFail": true,
      "typeVersion": 3
    }
  ],
  "connections": {
    "Code": {
      "main": [
        [
          {
            "node": "Backup to Google Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parameters": {
      "main": [
        [
          {
            "node": "Get all n8n Workflows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Parameters",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get all n8n Workflows": {
      "main": [
        [
          {
            "node": "Code",
            "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.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Code Schedule Export. Uses scheduleTrigger, stickyNote, n8n, googleDrive. Scheduled trigger; 6 nodes.

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

More General workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

General

This template creates a nightly backup of all n8n workflows and saves them to a Google Drive folder. Each night, the previous night's backups are moved to an “n8n_old” folder and renamed with the corr

Move Binary Data, Google Drive, Item Lists +1
General

Code Itemlists. Uses stickyNote, moveBinaryData, googleDrive, itemLists. Scheduled trigger; 33 nodes.

Move Binary Data, Google Drive, Item Lists +1
General

This workflow is perfect for n8n users who want to automatically backup all their workflows 💾 to Google Drive with zero manual effort. Perfect for teams managing multiple workflows or anyone who value

n8n, Google Drive
General

Imagine the sinking feeling: hours, weeks, or even months of meticulous work building your n8n workflows, suddenly gone. A server crash, an accidental deletion, data corruption, or an unexpected platf

Google Drive, n8n, Move Binary Data
General

I build automation workflows for n8n and Make. This ready-to-use workflow is designed to automatically export and back up all your n8n workflows to a designated Google Drive folder, organized by date.

Move Binary Data, Google Drive, n8n