{
  "name": "Generate and validate bulk QR codes with Google Sheets and Google Drive",
  "nodes": [
    {
      "id": "adfa1fec-69d0-499d-a544-039ff540748a",
      "name": "When clicking ‘Execute workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -1632,
        136
      ]
    },
    {
      "id": "fa465b9d-f404-4ece-8dbf-3eb736354aca",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1408,
        560
      ],
      "parameters": {
        "width": 360,
        "height": 220,
        "content": "Validate whether the scanned QR code is valid"
      }
    },
    {
      "id": "a80a4648-0e59-4728-82c7-ffeec8106288",
      "name": "Not used?",
      "type": "n8n-nodes-base.if",
      "position": [
        -720,
        512
      ]
    },
    {
      "id": "1741c140-8470-4a84-bced-1710f2a11b2a",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -960,
        464
      ],
      "parameters": {
        "width": 360,
        "height": 220,
        "content": "Check if ID is valid"
      }
    },
    {
      "id": "e7b9c024-bcb9-488c-a034-b3bf04546f35",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -544,
        368
      ],
      "parameters": {
        "width": 420,
        "height": 220,
        "content": "Update the QR status after it has been used"
      }
    },
    {
      "id": "8ad38195-9077-420e-b724-f18bc8e5c04d",
      "name": "Upload file",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -512,
        64
      ]
    },
    {
      "id": "9a2a2d6c-b69f-4693-bc32-e65617391bed",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -992,
        48
      ]
    },
    {
      "id": "23096106-7fe7-478e-8ded-9115a3a9bbf0",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1428,
        76
      ],
      "parameters": {
        "width": 360,
        "height": 220,
        "content": "Check whether a QR code has already been generated for this ID"
      }
    },
    {
      "id": "ee444bab-8a5c-4aea-a11c-771f984af2b7",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -834,
        4
      ],
      "parameters": {
        "width": 516,
        "height": 220,
        "content": "Generate a QR code using the webhook validation URL and the unique ID"
      }
    },
    {
      "id": "35a79222-3544-4fb7-bcb6-fa80dd2cf450",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -288,
        0
      ],
      "parameters": {
        "width": 424,
        "height": 220,
        "content": "Update the status of the ID in Google Sheets"
      }
    },
    {
      "id": "4a979c76-2e9d-4fc6-a649-63c22b4139e3",
      "name": "Not Valid",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        -944,
        704
      ]
    },
    {
      "id": "b4bdf87c-a33c-4966-b10f-e1652d1a46fc",
      "name": "QR Generator",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -736,
        64
      ]
    },
    {
      "id": "480aa947-8531-4087-92a7-83cef2f04658",
      "name": "Update QR used",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -496,
        416
      ]
    },
    {
      "id": "77d384fa-6330-4f71-a25f-b649e4ef2b81",
      "name": "QR ID Already Used",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        -496,
        608
      ]
    },
    {
      "id": "01bf254f-ab08-4b90-94c0-707f27a0a459",
      "name": "QR OK",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        -272,
        416
      ]
    },
    {
      "id": "ec24abba-fc81-4c35-bcbe-2286dc554566",
      "name": "Get List",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -1408,
        136
      ]
    },
    {
      "id": "7e4479a7-47a7-4f19-9d37-601e82d68893",
      "name": "Get List ID",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -944,
        512
      ]
    },
    {
      "id": "7059f2ea-1106-46b7-930a-b26a0a8a55e6",
      "name": "Check is generated?",
      "type": "n8n-nodes-base.if",
      "position": [
        -1184,
        136
      ]
    },
    {
      "id": "4b9f83f3-673c-463c-9f39-4a8c87ceecbd",
      "name": "Update Row Status QR Generated",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -32,
        64
      ]
    },
    {
      "id": "7941fec2-ad64-44aa-92d6-b11286913eae",
      "name": "Check ID Exists",
      "type": "n8n-nodes-base.if",
      "position": [
        -1168,
        608
      ]
    },
    {
      "id": "f3806868-fc58-4ef1-b43b-2eb126dd12a1",
      "name": "QR Validation Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -1616,
        608
      ]
    },
    {
      "id": "faa5b030-7b26-4af8-a367-4fdfa5f1c4b5",
      "name": "Extract ID from Webhook",
      "type": "n8n-nodes-base.set",
      "position": [
        -1392,
        608
      ]
    },
    {
      "id": "64a9eed4-b306-4def-9367-a6bd3292f6a2",
      "name": "Prepare Status Update",
      "type": "n8n-nodes-base.set",
      "position": [
        -256,
        64
      ]
    },
    {
      "id": "9d5e4d7a-c3e5-4c7c-9afd-6bbbf50147e7",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2288,
        -80
      ],
      "parameters": {
        "width": 576,
        "height": 944,
        "content": "## Generate and validate QR codes in bulk with Google Sheets and Google Drive\nThis workflow allows you to generate QR codes (Barcodes) in bulk from a Google Sheets file and store the generated QR imag"
      }
    }
  ],
  "connections": {
    "Get List": {
      "main": [
        [
          {
            "node": "Check is generated?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Not used?": {
      "main": [
        [
          {
            "node": "Update QR used",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "QR ID Already Used",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get List ID": {
      "main": [
        [
          {
            "node": "Not used?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload file": {
      "main": [
        [
          {
            "node": "Prepare Status Update",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "QR Generator": {
      "main": [
        [
          {
            "node": "Upload file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update QR used": {
      "main": [
        [
          {
            "node": "QR OK",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check ID Exists": {
      "main": [
        [
          {
            "node": "Get List ID",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Not Valid",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "QR Generator",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check is generated?": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Status Update": {
      "main": [
        [
          {
            "node": "Update Row Status QR Generated",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "QR Validation Webhook": {
      "main": [
        [
          {
            "node": "Extract ID from Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract ID from Webhook": {
      "main": [
        [
          {
            "node": "Check ID Exists",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Row Status QR Generated": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Get List",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}