{
  "name": "Nightly Google Sheets \u2192 Drive backup",
  "nodes": [
    {
      "parameters": {
        "content": "## Nightly Sheets \u2192 Drive backup\n\n**What it does:** every night it exports your key sheet and saves a dated copy to Google Drive.\n\n**Setup**\n1. Open *Read sheet* \u2192 connect **Google Sheets**, pick the sheet to back up.\n2. Open *Save to Drive* \u2192 connect **Google Drive**, pick a folder.\n3. Adjust the schedule.\n4. Click **Active**.",
        "width": 360,
        "height": 300
      },
      "id": "sticky-setup",
      "name": "Setup guide",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -520,
        -140
      ]
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "0 1 * * *"
            }
          ]
        }
      },
      "id": "cron",
      "name": "Every night",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        -260,
        0
      ]
    },
    {
      "parameters": {
        "operation": "read",
        "documentId": "",
        "sheetName": ""
      },
      "id": "sheet",
      "name": "Read sheet",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        -20,
        0
      ]
    },
    {
      "parameters": {
        "operation": "csv"
      },
      "id": "toFile",
      "name": "To file",
      "type": "n8n-nodes-base.convertToFile",
      "typeVersion": 1.1,
      "position": [
        220,
        0
      ]
    },
    {
      "parameters": {
        "operation": "upload",
        "name": "={{ $now.format('yyyy-LL-dd') }}-backup.csv",
        "driveId": {
          "mode": "list",
          "value": "My Drive"
        },
        "folderId": {
          "mode": "list",
          "value": ""
        }
      },
      "id": "drive",
      "name": "Save to Drive",
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        460,
        0
      ]
    }
  ],
  "connections": {
    "Every night": {
      "main": [
        [
          {
            "node": "Read sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read sheet": {
      "main": [
        [
          {
            "node": "To file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "To file": {
      "main": [
        [
          {
            "node": "Save to Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "tags": [],
  "id": "9pc0YObBPkFMmXtt"
}