{
  "name": "Deploy workflows from Google Drive to n8n instance",
  "nodes": [
    {
      "id": "8db6d045-5ef8-444a-ae3e-0f0611946008",
      "name": "Get Existing Workflow Tags",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -580,
        -580
      ]
    },
    {
      "id": "da4aeef3-05a4-48c9-ae5c-9038f07e3693",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -300,
        -1040
      ],
      "parameters": {
        "width": 1460,
        "height": 760,
        "content": "## Setup Instructions\n\n**1.** In Google Drive create a **ToDeploy** folder and a **Deployed** folder\n+ Update \"**Google Drive Trigger -ToDeploy folder**\" to your ToDeploy folder\n+ Update \"**Move JSON "
      }
    },
    {
      "id": "520aa22e-0456-4383-ba6d-fd89fd77f193",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -680,
        -140
      ],
      "parameters": {
        "width": 260,
        "height": 280,
        "content": "### Set variables:\n**N8N_Instance_Tag** **N8N_Instance_URL** "
      }
    },
    {
      "id": "2e0794eb-0213-48fd-a974-26301bfdfc8a",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        300,
        -120
      ],
      "parameters": {
        "width": 440,
        "height": 260,
        "content": "### Configure n8n API authentication"
      }
    },
    {
      "id": "f77ad2ef-32e3-4d24-b79b-9898152cbbac",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1100,
        -780
      ],
      "parameters": {
        "width": 740,
        "height": 420,
        "content": "## 1. Get Workflow Tags"
      }
    },
    {
      "id": "cf10c998-44fc-4f1a-8d61-9187a9eae82a",
      "name": "When clicking ‘Test workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -1040,
        -580
      ]
    },
    {
      "id": "206fffc1-d7ee-41eb-b6ad-55be8ae60526",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -880,
        -700
      ],
      "parameters": {
        "width": 220,
        "height": 280,
        "content": "### Set variable:\n**N8N_Instance_URL** "
      }
    },
    {
      "id": "2bbe9b3e-c302-497f-a724-e8c51ce673ef",
      "name": "Extract JSON object from File",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        -80,
        -40
      ]
    },
    {
      "id": "2f0acb18-86c4-4f94-8f76-b72174809643",
      "name": "Clean JSON file ready for import",
      "type": "n8n-nodes-base.code",
      "position": [
        140,
        -40
      ]
    },
    {
      "id": "f0428a03-2194-4390-b14b-5149ea3a220b",
      "name": "Set n8n API URL & Tag ID variables",
      "type": "n8n-nodes-base.set",
      "position": [
        -600,
        -40
      ]
    },
    {
      "id": "9f59cba9-9452-4e05-9d95-3e405ec195cf",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -980,
        -140
      ],
      "parameters": {
        "width": 260,
        "height": 280,
        "content": "### Change Google Drive Folder"
      }
    },
    {
      "id": "87ce4868-407c-461f-92e2-6b3bf1dd616e",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -640,
        -760
      ],
      "parameters": {
        "width": null,
        "height": 340,
        "content": "### Configure n8n API authentication.\n\n### Tag ID\nCopy your chosen Tag ID to **N8N_Instance_Tag** "
      }
    },
    {
      "id": "b1c3f693-a587-4928-a90a-8288eb84a879",
      "name": "Create n8n Workflow",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        360,
        -40
      ]
    },
    {
      "id": "70ff3b11-3664-4fec-a220-72696a6083c5",
      "name": "Set Workflow Tag",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        600,
        -40
      ]
    },
    {
      "id": "55671121-7027-476b-8eff-9d9a16385cce",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        800,
        -120
      ],
      "parameters": {
        "width": 260,
        "height": 260,
        "content": "### Change Google Drive Deployed Folder"
      }
    },
    {
      "id": "e8a9bbd8-a41d-4b82-931c-5570651d8583",
      "name": "Capture Name If Fails To Create Workflow",
      "type": "n8n-nodes-base.code",
      "position": [
        600,
        160
      ]
    },
    {
      "id": "0fee0939-f3bd-4fd1-b444-40509f4b0f50",
      "name": "Move JSON file to Deployed folder",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        880,
        -40
      ]
    },
    {
      "id": "59567f07-4d69-4d30-a5ef-934198ff101d",
      "name": "Download n8n JSON File",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -320,
        -40
      ]
    },
    {
      "id": "a5837765-9787-43a5-bbfe-44e5f3728aee",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1100,
        -260
      ],
      "parameters": {
        "width": 2260,
        "height": 620,
        "content": "## 2. Import JSON Workflow Into n8n Instance"
      }
    },
    {
      "id": "bcb77b34-36c8-4839-b3e2-72f8e60871ba",
      "name": "Set n8n URL variable",
      "type": "n8n-nodes-base.set",
      "position": [
        -820,
        -580
      ]
    },
    {
      "id": "7281ab81-d1e8-4a78-8e2f-e1049633d6e6",
      "name": "Google Drive Trigger -ToDeploy folder",
      "type": "n8n-nodes-base.googleDriveTrigger",
      "position": [
        -880,
        -40
      ]
    }
  ],
  "connections": {
    "Set Workflow Tag": {
      "main": [
        [
          {
            "node": "Move JSON file to Deployed folder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create n8n Workflow": {
      "main": [
        [
          {
            "node": "Set Workflow Tag",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Capture Name If Fails To Create Workflow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set n8n URL variable": {
      "main": [
        [
          {
            "node": "Get Existing Workflow Tags",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download n8n JSON File": {
      "main": [
        [
          {
            "node": "Extract JSON object from File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract JSON object from File": {
      "main": [
        [
          {
            "node": "Clean JSON file ready for import",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Clean JSON file ready for import": {
      "main": [
        [
          {
            "node": "Create n8n Workflow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "Set n8n URL variable",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set n8n API URL & Tag ID variables": {
      "main": [
        [
          {
            "node": "Download n8n JSON File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Drive Trigger -ToDeploy folder": {
      "main": [
        [
          {
            "node": "Set n8n API URL & Tag ID variables",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}