{
  "name": "Form-triggered Instagram video downloads to Google Drive with Sheets logging",
  "nodes": [
    {
      "id": "73ea2951-e7dd-4f7c-81cd-78be7ef9b912",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -720,
        520
      ]
    },
    {
      "id": "0995485e-76cb-408c-b23b-bc908ffdd1a4",
      "name": "Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        960,
        320
      ]
    },
    {
      "id": "323532c9-796f-4fd0-9595-dafbff9428d4",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        -200,
        540
      ]
    },
    {
      "id": "03ab7c27-ec4a-4d5c-b447-0a70bd9ca951",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        140,
        780
      ]
    },
    {
      "id": "8bd40b8e-ebea-40c9-b206-f2b2b38a0672",
      "name": "Google Drive Set Permission",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        620,
        240
      ]
    },
    {
      "id": "1562303f-831d-43e2-a2ab-c5fdb1a0933e",
      "name": "Upload To Google Drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        320,
        240
      ]
    },
    {
      "id": "1e588ad2-260f-4540-8e46-2eeb455aab95",
      "name": "Google Sheets Append Row",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        620,
        780
      ]
    },
    {
      "id": "c6703dc6-ed48-41eb-ad85-594fdf819e0a",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -800,
        240
      ],
      "parameters": {
        "width": null,
        "height": 500,
        "content": "## 🟢 **1. On form submission**\n- **Purpose:** Acts as the trigger for the workflow.  \n- **Functionality:** Displays a form with a single field (`URL`) where users can enter the instagram video link.  "
      }
    },
    {
      "id": "700f9fa7-5914-45c4-83cb-f62de6cf5400",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -540,
        240
      ],
      "parameters": {
        "width": null,
        "height": 500,
        "content": "## 🌐 **2.Instagram Downloader API Request**\n- **Purpose:** Fetch downloadable MP4 link.  \n- **Functionality:** Sends a `POST` request to **Instagram Video Downloader API**, passing the URL from the fo"
      }
    },
    {
      "id": "62b9b97a-0281-49b3-92ef-b1861ccc22a3",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -260,
        240
      ],
      "parameters": {
        "width": null,
        "height": 500,
        "content": "## 🔍 **3. If**\n- **Purpose:** Check for API errors.  \n- **Functionality:** Evaluates if the response contains an `error` field.  \n- **Output:** \n  - ✅ **True Path:** Proceeds to download the MP4.  \n  "
      }
    },
    {
      "id": "1f2524e9-d5f1-47f3-b53e-774846700adb",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "parameters": {
        "width": null,
        "height": 440,
        "content": "## ⬇️ **4. MP4 Downloader**\n- **Purpose:** Download the video file.  \n- **Functionality:** Uses the media URL from the previous API response to download the MP4 video.  \n- **Output:** Stores the raw M"
      }
    },
    {
      "id": "8fb52ee3-5af6-47b1-85f1-22e815cc7dbb",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        260,
        0
      ],
      "parameters": {
        "width": null,
        "height": 400,
        "content": "## ☁️ **5. Upload To Google Drive**\n- **Purpose:** Store video in Google Drive.  \n- **Functionality:** Uploads the downloaded MP4 into the specified Drive folder.  \n- **Output:** Returns a file ID for"
      }
    },
    {
      "id": "ccf032b8-e2c6-468d-9441-8814d6f90235",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        540,
        0
      ],
      "parameters": {
        "width": null,
        "height": 380,
        "content": "## 🔑 **6. Google Drive Set Permission**\n- **Purpose:** Make the file publicly accessible.  \n- **Functionality:** Sets file permissions to `Anyone with the link can view`.  \n- **Output:** Provides a sh"
      }
    },
    {
      "id": "85411455-f2f5-4cb0-8e75-2dec95783723",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        880,
        20
      ],
      "parameters": {
        "width": null,
        "height": 460,
        "content": "## 📄 **7. Google Sheets**\n- **Purpose:** Log successful conversions.  \n- **Functionality:** Appends a row with:\n  - `URL` → Original Instagram link  \n  - `Drive_URL` → Sharable Google Drive MP4 link  "
      }
    },
    {
      "id": "8caff77e-012c-4742-922f-6f5f2b004f46",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        80,
        540
      ],
      "parameters": {
        "width": null,
        "height": 360,
        "content": "## ⏱️ **8. Wait**\n- **Purpose:** Delay before logging failures.  \n- **Functionality:** Pauses workflow execution to avoid instant sheet logging when API errors occur.  \n- **Output:** Prevents rapid co"
      }
    },
    {
      "id": "a7c6d5a3-1e4a-47a3-8b56-3c8db4d2d541",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        540,
        420
      ],
      "parameters": {
        "width": null,
        "height": 480,
        "content": "## 📑 **9. Google Sheets Append Row**\n- **Purpose:** Log failed conversions.  \n- **Functionality:** Appends a row with:\n  - `URL` → Original Instagram link  \n  - `Drive_URL` → `N/A` (indicating downloa"
      }
    },
    {
      "id": "5ee123ce-c57c-4dae-b4a0-254986cc1da4",
      "name": "MP4 Downloader",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        60,
        260
      ]
    },
    {
      "id": "1475e1e1-f06d-42ab-aab8-2efa657cfaa7",
      "name": "Instagram Downloader API Request",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -500,
        520
      ]
    },
    {
      "id": "24f49a97-8191-4778-9782-fb86ab86f816",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1920,
        -300
      ],
      "parameters": {
        "width": 1000,
        "height": 1200,
        "content": "# 📥 Instagram to MP4 Converter Workflow\n\nThis **n8n workflow** automates the process of converting Instagram video URLs into downloadable MP4 files and storing them in **Google Drive**, while maintain"
      }
    }
  ],
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "MP4 Downloader",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "Google Sheets Append Row",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "MP4 Downloader": {
      "main": [
        [
          {
            "node": "Upload To Google Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "Instagram Downloader API Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload To Google Drive": {
      "main": [
        [
          {
            "node": "Google Drive Set Permission",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Drive Set Permission": {
      "main": [
        [
          {
            "node": "Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Instagram Downloader API Request": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}