{
  "name": "Download Threads videos & log results in Google Sheets",
  "nodes": [
    {
      "id": "a1b4a7ad-efec-4a7c-a7d0-057b01cae303",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        848,
        592
      ]
    },
    {
      "id": "6510719b-49cf-4264-985b-1ed5b98b1a9f",
      "name": "Fetch Threads Video Data",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1072,
        592
      ]
    },
    {
      "id": "d069c2dc-7576-478f-8510-4beb55871bff",
      "name": "Check If Video Exists",
      "type": "n8n-nodes-base.if",
      "position": [
        1360,
        608
      ]
    },
    {
      "id": "01d9dd0c-4370-4ecf-8df3-55de50bb09b7",
      "name": "Download Threads Video File",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1632,
        320
      ]
    },
    {
      "id": "ddde32c8-f9dc-40cf-8180-b232bb40d6a8",
      "name": "Upload Video to Google Drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1888,
        304
      ]
    },
    {
      "id": "5e5256dd-e767-484d-8b4f-c0dc62b71f9d",
      "name": "Set Google Drive Sharing Permissions",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        2192,
        304
      ]
    },
    {
      "id": "da8b91e6-99c7-4d84-abfb-9358f4b1b87e",
      "name": "Log Success to Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2528,
        384
      ]
    },
    {
      "id": "05a6f22b-b42c-4bf8-8ad6-5e671cf33c3e",
      "name": "Wait Before Logging Failure",
      "type": "n8n-nodes-base.wait",
      "position": [
        1712,
        848
      ]
    },
    {
      "id": "a4554ac9-23bb-490f-b6fa-8ed9b923214b",
      "name": "Log Failed Download to Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2192,
        848
      ]
    },
    {
      "id": "4ce0b5c3-f2aa-4a40-8430-5dbda2c4d791",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        768,
        464
      ],
      "parameters": {
        "width": null,
        "height": 272,
        "content": "Triggers the workflow when a user submits a URL through the form."
      }
    },
    {
      "id": "24997fd1-523a-46fc-8ef2-294b4fe148f3",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1024,
        464
      ],
      "parameters": {
        "width": null,
        "height": 272,
        "content": "Sends the submitted URL to the Threads Downloader API to retrieve video data."
      }
    },
    {
      "id": "6479a5f8-34a8-41aa-b252-150c08be5cb0",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1296,
        496
      ],
      "parameters": {
        "width": null,
        "height": 256,
        "content": "Checks if the API returned a valid video download URL."
      }
    },
    {
      "id": "4d12f8a3-6e47-4186-a864-944ac53f20b0",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1568,
        240
      ],
      "parameters": {
        "width": null,
        "height": 240,
        "content": " Downloads the video file from the provided download URL."
      }
    },
    {
      "id": "a4c56692-00f3-48ec-8fac-c0fa7d872212",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1840,
        240
      ],
      "parameters": {
        "width": null,
        "height": 240,
        "content": "Uploads the downloaded video to a specified Google Drive folder."
      }
    },
    {
      "id": "741dbb91-6575-4ed7-888d-548a81c017f6",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2112,
        240
      ],
      "parameters": {
        "width": null,
        "height": 240,
        "content": "Sets the uploaded file’s sharing settings so it’s accessible via a link."
      }
    },
    {
      "id": "dc7491b4-1fca-4384-b0ad-137baa4f5e42",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2432,
        288
      ],
      "parameters": {
        "width": null,
        "height": 224,
        "content": "Records the original URL and Google Drive link of successfully downloaded videos."
      }
    },
    {
      "id": "655f8026-7973-4fcd-8996-ddb074e1409c",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1648,
        736
      ],
      "parameters": {
        "width": null,
        "height": 256,
        "content": "Adds a pause before logging failed downloads to avoid timing issues."
      }
    },
    {
      "id": "23b570fb-1b5b-4af6-90e9-ff52fa18842f",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2112,
        752
      ],
      "parameters": {
        "width": null,
        "height": 240,
        "content": "Logs the original URL with “N/A” for failed video downloads."
      }
    },
    {
      "id": "72e23121-48bc-47f3-8311-3f1a7259bb5e",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -256,
        256
      ],
      "parameters": {
        "width": 800,
        "height": 912,
        "content": "# Threads Video Downloader & Google Drive Logger\n\n Automates downloading videos from Threads URLs, uploads them to Google Drive, and logs success or failure in Google Sheets.\n\n---\n\n## Workflow Overvie"
      }
    }
  ],
  "connections": {
    "On form submission": {
      "main": [
        [
          {
            "node": "Fetch Threads Video Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check If Video Exists": {
      "main": [
        [
          {
            "node": "Download Threads Video File",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait Before Logging Failure",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Threads Video Data": {
      "main": [
        [
          {
            "node": "Check If Video Exists",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Threads Video File": {
      "main": [
        [
          {
            "node": "Upload Video to Google Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait Before Logging Failure": {
      "main": [
        [
          {
            "node": "Log Failed Download to Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Video to Google Drive": {
      "main": [
        [
          {
            "node": "Set Google Drive Sharing Permissions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Google Drive Sharing Permissions": {
      "main": [
        [
          {
            "node": "Log Success to Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}