{
  "name": "Notion \u2192 Automated Backup",
  "nodes": [
    {
      "parameters": {
        "operation": "getAll",
        "databaseId": "",
        "simple": true
      },
      "id": "notion",
      "name": "Notion Query",
      "type": "n8n-nodes-base.notion",
      "typeVersion": 2,
      "position": [
        250,
        300
      ]
    },
    {
      "parameters": {
        "jsCode": "const d=$input.all().map(i=>i.json); return {content:JSON.stringify(d,null,2),name:'backup-'+new Date().toISOString().slice(0,10)+'.json'};"
      },
      "id": "fmt",
      "name": "Format",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        450,
        300
      ]
    },
    {
      "parameters": {
        "operation": "upload",
        "name": "={{ $json.name }}",
        "parents": [
          ""
        ],
        "body": "={{ $json.content }}"
      },
      "id": "drive",
      "name": "Google Drive",
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        650,
        300
      ]
    }
  ],
  "connections": {
    "Notion Query": {
      "main": [
        [
          {
            "node": "Format",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format": {
      "main": [
        [
          {
            "node": "Google Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}