{
  "name": "Sync OVH invoices to Google Sheets and save PDFs to Google Drive",
  "nodes": [
    {
      "id": "ed55d7b6-cb40-4323-9709-cc0468022a8f",
      "name": "When clicking ‘Test workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -2660,
        -220
      ]
    },
    {
      "id": "3eb0433d-e5ca-4d17-aaa5-1cec76705293",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -1780,
        -220
      ]
    },
    {
      "id": "0a298df5-083f-4610-b8d8-3f70e28cf04a",
      "name": "Split Out",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -2000,
        -220
      ]
    },
    {
      "id": "6e05dc9a-f47b-4847-84ab-c9acc990d05d",
      "name": "Get Invoice Data",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1540,
        -200
      ]
    },
    {
      "id": "48e324e4-72d9-4b24-a739-f1561edd3498",
      "name": "Safe File",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -1580,
        280
      ]
    },
    {
      "id": "90903b2f-d8e9-49b4-bc26-48807bd5d41e",
      "name": "Create Folder",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -2020,
        180
      ]
    },
    {
      "id": "1a155b9f-bdbb-4001-b07d-61ee2d2ce74c",
      "name": "Download PDF",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1800,
        280
      ]
    },
    {
      "id": "c10b006a-ebd7-444b-a90a-d53f5efaf14e",
      "name": "Record in OVH Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -1320,
        -200
      ]
    },
    {
      "id": "f2683a37-81fd-4410-9158-3c2f5b7aa1af",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3260,
        -380
      ],
      "parameters": {
        "width": 740,
        "height": 720,
        "content": "# 🛠️Setup Guide  'Get OVH Invoices to Google Sheets'\n**Author: [Oliver Bardenheier](https://www.linkedin.com/in/oliver-bardenheier)**\n\n1. **Make a copy** of this [Google Sheet Template](https://docs.g"
      }
    },
    {
      "id": "3d7bc6f9-d359-43b8-963e-5186685d0a14",
      "name": "Query Latest OVH Invoices",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -2440,
        -220
      ]
    },
    {
      "id": "7abe76bc-8552-4f79-8396-382a4dd6ea72",
      "name": "Convert to Array",
      "type": "n8n-nodes-base.code",
      "position": [
        -2220,
        -220
      ]
    },
    {
      "id": "ce0fd793-285f-4c74-bead-dc195bd425c4",
      "name": "Check for FY Folder ID",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -2460,
        260
      ]
    },
    {
      "id": "bd2b8556-675e-4183-9ba7-336eb71f643b",
      "name": "Does Folder exist",
      "type": "n8n-nodes-base.if",
      "position": [
        -2240,
        260
      ]
    },
    {
      "id": "79dc558d-3ccb-4a41-9349-33b6f6e9c8db",
      "name": "Update Record Data with FileID",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -1360,
        280
      ]
    },
    {
      "id": "5496b950-8218-4ccb-8923-b234a54f70fd",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2500,
        -380
      ],
      "parameters": {
        "width": 620,
        "height": 440,
        "content": "## Query OVH Invoices\nSet the timeframe for the query to Your likings in *\"Query Latest OVH Invoices\"*\nYou could set an email trigger before and make the frame only one day.\nFind Query String Paramete"
      }
    },
    {
      "id": "fb298013-68cf-4235-8e68-108d47bfceac",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1860,
        -380
      ],
      "parameters": {
        "width": 700,
        "height": 440,
        "content": "## Query Invoice Details and put to Google Sheet\nFind Query String Parameters and curl [here](https://eu.api.ovh.com/console/?section=%2Fme&branch=v1#get-/me/bill/-billId-)\nAmend the expression for 'd"
      }
    },
    {
      "id": "f55e9d6b-2551-4a08-8184-9949b3ecbe4b",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2500,
        80
      ],
      "parameters": {
        "width": 1340,
        "height": 440,
        "content": "## Download Invoice PDF and save to Google Drive in Yearly Folder"
      }
    }
  ],
  "connections": {
    "Safe File": {
      "main": [
        [
          {
            "node": "Update Record Data with FileID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download PDF": {
      "main": [
        [
          {
            "node": "Safe File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Folder": {
      "main": [
        [
          {
            "node": "Download PDF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Get Invoice Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert to Array": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Invoice Data": {
      "main": [
        [
          {
            "node": "Record in OVH Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Does Folder exist": {
      "main": [
        [
          {
            "node": "Create Folder",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Download PDF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Record in OVH Sheet": {
      "main": [
        [
          {
            "node": "Check for FY Folder ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check for FY Folder ID": {
      "main": [
        [
          {
            "node": "Does Folder exist",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Query Latest OVH Invoices": {
      "main": [
        [
          {
            "node": "Convert to Array",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Record Data with FileID": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "Query Latest OVH Invoices",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}