{
  "name": "Export PDF invoices from SmartBill to Google Drive",
  "nodes": [
    {
      "id": "119111b6-92a8-4a54-8830-2a12a0d4eec8",
      "name": "When clicking \"Execute Workflow\"",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -580,
        -60
      ]
    },
    {
      "id": "bf0767db-8dd2-4f83-a27f-37c1160916d4",
      "name": "Smartbill get invoice pdf",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1640,
        -60
      ]
    },
    {
      "id": "f8bd05d5-0d7e-4db8-9f07-070e4d48af3b",
      "name": "SetData",
      "type": "n8n-nodes-base.set",
      "position": [
        -300,
        -60
      ]
    },
    {
      "id": "57999d68-71d4-4d3c-968a-50c1f20cb010",
      "name": "Set mime",
      "type": "n8n-nodes-base.code",
      "position": [
        1900,
        -60
      ]
    },
    {
      "id": "61771345-4562-4c4b-b00d-db8fb0b80f1e",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        -180
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "d3d8feb2-cda6-4c78-b96c-7c8938b23bb7",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -360,
        -520
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "ee617dbb-effb-4671-b23b-152058edd76f",
      "name": "Set Default Folder Name",
      "type": "n8n-nodes-base.code",
      "position": [
        -20,
        -60
      ]
    },
    {
      "id": "15da1268-7ea0-444a-ac79-3d6ec0057b80",
      "name": "Search Drive Folder",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        200,
        -60
      ]
    },
    {
      "id": "d63071eb-ca34-4eb7-8da1-5c8172f4f7fe",
      "name": "If exists",
      "type": "n8n-nodes-base.if",
      "position": [
        420,
        -60
      ]
    },
    {
      "id": "7cec08c1-737e-4178-92ea-11914821e2ef",
      "name": "Create Drive Folder",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        680,
        80
      ]
    },
    {
      "id": "78532c10-0c70-4c8c-9b93-bdcb3e80dbce",
      "name": "Set the loop",
      "type": "n8n-nodes-base.code",
      "position": [
        1160,
        -60
      ]
    },
    {
      "id": "93bc581c-0624-4fdd-ba06-e0ff3836ea53",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1380,
        -60
      ]
    },
    {
      "id": "40d272e8-458f-4946-916e-4eaf9960d4f0",
      "name": "Upload file to Google Drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        2140,
        -60
      ]
    },
    {
      "id": "08d5a34a-3e6c-4bfd-bc3e-0cbfedf9d715",
      "name": "Wait a sec",
      "type": "n8n-nodes-base.wait",
      "position": [
        2380,
        -40
      ]
    },
    {
      "id": "a1dca3c1-b9ce-443b-b942-908ab10c1610",
      "name": "Set Folder ID",
      "type": "n8n-nodes-base.set",
      "position": [
        920,
        -60
      ]
    }
  ],
  "connections": {
    "SetData": {
      "main": [
        [
          {
            "node": "Set Default Folder Name",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set mime": {
      "main": [
        [
          {
            "node": "Upload file to Google Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If exists": {
      "main": [
        [
          {
            "node": "Set Folder ID",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create Drive Folder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait a sec": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set the loop": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Folder ID": {
      "main": [
        [
          {
            "node": "Set the loop",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Smartbill get invoice pdf",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Drive Folder": {
      "main": [
        [
          {
            "node": "Set Folder ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search Drive Folder": {
      "main": [
        [
          {
            "node": "If exists",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Default Folder Name": {
      "main": [
        [
          {
            "node": "Search Drive Folder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Smartbill get invoice pdf": {
      "main": [
        [
          {
            "node": "Set mime",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload file to Google Drive": {
      "main": [
        [
          {
            "node": "Wait a sec",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \"Execute Workflow\"": {
      "main": [
        [
          {
            "node": "SetData",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}