{
  "name": "Download Facebook videos to Google Drive with automated logging in sheets",
  "nodes": [
    {
      "id": "1426bdd3-b67c-40be-a93b-4017b988a507",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -500,
        -20
      ]
    },
    {
      "id": "74e6789c-b50c-4f5a-aa88-4587ed2b66f3",
      "name": "Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1180,
        -220
      ]
    },
    {
      "id": "a8eab174-692b-43e1-9d83-1a4bd365e8a5",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        20,
        0
      ]
    },
    {
      "id": "9f8a90f9-c6c5-4ca5-8685-c3bc3f2eb4a2",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        360,
        240
      ]
    },
    {
      "id": "42b59712-c67b-41bd-aa92-07428f2f9f89",
      "name": "Google Drive Set Permission",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        840,
        -300
      ]
    },
    {
      "id": "49f20dad-a161-4093-bb0b-ddf8d0f38001",
      "name": "Upload To Google Drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        540,
        -300
      ]
    },
    {
      "id": "1ad3686d-10e7-4d42-aa28-0d51c20b6c4a",
      "name": "Google Sheets Append Row",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        840,
        240
      ]
    },
    {
      "id": "415e26db-3d6d-4cd1-8485-bc861ad39a64",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -580,
        -300
      ],
      "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 Facebook video link.  \n"
      }
    },
    {
      "id": "09741083-a9b0-4e15-8824-a2ff59aae991",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -320,
        -300
      ],
      "parameters": {
        "width": null,
        "height": 500,
        "content": "## 🌐 **2. Facebook RapidAPI Request**\n- **Purpose:** Fetch downloadable MP4 link.  \n- **Functionality:** Sends a `POST` request to **Facebook Video Downloader API**, passing the URL from the form.  \n-"
      }
    },
    {
      "id": "6bbbec40-7cfb-49c2-aabc-8d24b9f97852",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -40,
        -300
      ],
      "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": "3c071121-ab03-46c2-bc3b-37cfbc8efcc4",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        220,
        -540
      ],
      "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": "b520286d-f01d-45dd-b8a4-bbb7b6ffea4a",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        480,
        -540
      ],
      "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": "19f78901-47c2-4346-a2fd-8fba54ce76a1",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        760,
        -540
      ],
      "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": "0c24f99a-6323-4ec9-9988-3bdc6c25afed",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1100,
        -520
      ],
      "parameters": {
        "width": null,
        "height": 460,
        "content": "## 📄 **7. Google Sheets**\n- **Purpose:** Log successful conversions.  \n- **Functionality:** Appends a row with:\n  - `URL` → Original Facebook link  \n  - `Drive_URL` → Sharable Google Drive MP4 link  \n"
      }
    },
    {
      "id": "2d3c1c4b-3e48-46a8-b8a7-3bb449f5031c",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        280,
        0
      ],
      "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": "0ae98a86-e0c6-4c47-a62b-5efc82a6bf99",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        760,
        -120
      ],
      "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 LinkedIn link  \n  - `Drive_URL` → `N/A` (indicating download"
      }
    },
    {
      "id": "0f4edd02-cb08-4fbf-92c1-88c3d0155794",
      "name": "MP4 Downloader",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        280,
        -280
      ]
    },
    {
      "id": "1535cbdf-43cf-45ed-a417-598fd4099031",
      "name": "Facebook RapidAPI Request",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -280,
        -20
      ]
    },
    {
      "id": "2be1a7a8-5a23-465b-8262-45c570e1ba00",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1340,
        -600
      ],
      "parameters": {
        "width": 520,
        "height": 960,
        "content": "# 🚀 Facebook to MP4 Video Downloader – Automated Workflow  \n\nEasily convert Facebook videos into downloadable MP4 files using **[Facebook Video Downloader API](https://rapidapi.com/skdeveloper/api/fac"
      }
    }
  ],
  "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": "Facebook RapidAPI Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload To Google Drive": {
      "main": [
        [
          {
            "node": "Google Drive Set Permission",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Facebook RapidAPI Request": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "Google Drive Set Permission": {
      "main": [
        [
          {
            "node": "Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}