YouTube動画をMP4およびMP3に変換する(RapidAPI、Google Sheetsログ記録を使用)

中級

これはFile Management分野の自動化ワークフローで、9個のノードを含みます。主にIf, FormTrigger, HttpRequest, GoogleSheetsなどのノードを使用。 YouTube動画をMP4およびMP3に変換するには、RapidAPIとGoogle Sheetsのログ記録を使用します

前提条件
  • ターゲットAPIの認証情報が必要な場合あり
  • Google Sheets API認証情報

カテゴリー

ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
  "meta": {
    "instanceId": "60c025075753afcab9f803964b4caaca9402f435deb4efafbb8e3b93b54d8752",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "8107174c-5a28-4e08-be56-de75f9d85b01",
      "name": "HTTP リクエスト",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        300,
        0
      ],
      "parameters": {
        "url": "https://youtube-video-downloader-fast.p.rapidapi.com/download.php",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "multipart-form-data",
        "sendHeaders": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "url",
              "value": "={{ $json.URL }}"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "x-rapidapi-host",
              "value": "youtube-video-downloader-fast.p.rapidapi.com"
            },
            {
              "name": "x-rapidapi-key",
              "value": "your key"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "86a2db5e-5928-4459-ad69-846994ab98d0",
      "name": "フォーム送信時",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        0,
        0
      ],
      "webhookId": "97a426d1-4557-4d85-8c0f-e98f6590721c",
      "parameters": {
        "options": {},
        "formTitle": "YouTube To Mp4",
        "formFields": {
          "values": [
            {
              "fieldLabel": "URL",
              "requiredField": true
            }
          ]
        },
        "formDescription": "YouTube To Mp4"
      },
      "typeVersion": 2.2
    },
    {
      "id": "a183fdce-c385-4c17-b237-a0ac731adfc0",
      "name": "条件分岐",
      "type": "n8n-nodes-base.if",
      "position": [
        560,
        0
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "0380d6fd-b5ab-49ef-a5e1-5d34a138f883",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "leftValue": "={{ $json.success }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "c7806bea-3eaa-464e-8939-cd707de01ba4",
      "name": "Google スプレッドシート",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        800,
        -20
      ],
      "parameters": {
        "columns": {
          "value": {
            "Mp3": "={{ $json.medias[18].url }}",
            "Url": "={{ $json.url }}",
            "Mp4 720": "={{ $json.medias[3].url }}",
            "Mp4 1080": "={{ $json.medias[1].url }}",
            "Mp4 360p": "={{ $json.medias[0].url }}"
          },
          "schema": [
            {
              "id": "Url",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Url",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Mp4 360p",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Mp4 360p",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Mp4 720",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Mp4 720",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Mp4 1080",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Mp4 1080",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Mp3",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Mp3",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1BFR7Ce8FYarGF7kvfaQf6fBsu7hLxDbzzp_RL8DDlas",
          "cachedResultUrl": "",
          "cachedResultName": "YT to Mp4"
        },
        "authentication": "serviceAccount"
      },
      "credentials": {
        "googleApi": {
          "id": "Rt0RWApx8PL9t0RF",
          "name": "Google Docs account"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "2c42910a-7192-41e4-91b6-921a42601bb9",
      "name": "付箋",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -900,
        -480
      ],
      "parameters": {
        "width": 740,
        "height": 740,
        "content": "# 🎥 YouTube to MP4 Downloader \n\nConvert YouTube videos into MP4 and MP3 formats automatically using **[YouTube Video Downloader API](https://rapidapi.com/skdeveloper/api/youtube-video-downloader-fast)**.  \nThis workflow fetches video download links, extracts multiple quality options, and logs results in Google Sheets.  \nIt’s **fully customizable** – you can modify video qualities, add notifications, or integrate with different storage solutions.  \n\n---\n\n### 📝 **Node-by-Node Explanation**\n\n1. **On Form Submission** → Triggers when a user submits a YouTube video URL via a form. *(You can add more fields like format selection or email delivery.)*  \n2. **HTTP Request** → Sends a POST request to **YouTube Video Downloader API** to fetch downloadable links. *(You can switch the API endpoint or add extra headers easily.)*  \n3. **If Node** → Checks if the API response is successful before processing download links. *(You can add advanced conditions for custom validation.)*  \n4. **Google Sheets** → Appends video details including:  \n   - **Original URL**  \n   - **MP4 360p, 720p, 1080p links**  \n   - **MP3 link**  \n   *(You can add more resolutions or metadata fields like title, duration, size.)*  \n"
      },
      "typeVersion": 1
    },
    {
      "id": "1fb4d9b5-c883-489b-9f05-0b851cd7b5b2",
      "name": "付箋1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -40,
        -200
      ],
      "parameters": {
        "height": 380,
        "content": "### 1️⃣ **On Form Submission**  \n- Displays a form where the user enters the YouTube video URL.  \n- Acts as the starting trigger for the workflow. "
      },
      "typeVersion": 1
    },
    {
      "id": "a5d3d8eb-2202-4ccc-af42-aa51efd433aa",
      "name": "付箋2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        220,
        -200
      ],
      "parameters": {
        "height": 380,
        "content": "### 2️⃣ **HTTP Request**  \n- Sends the provided URL to **YouTube Video Downloader API** via RapidAPI.  \n- Retrieves different resolution MP4 and MP3 download links. "
      },
      "typeVersion": 1
    },
    {
      "id": "e572667f-8476-4aad-a72d-4ee99d191bcd",
      "name": "付箋3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        480,
        -200
      ],
      "parameters": {
        "height": 380,
        "content": "### 3️⃣ **If Node**  \n- Checks if the API request was successful.  \n- Ensures only valid results are processed for logging.  \n"
      },
      "typeVersion": 1
    },
    {
      "id": "acc65470-0188-4d4c-a798-7862e98657cf",
      "name": "付箋4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        740,
        -200
      ],
      "parameters": {
        "height": 380,
        "content": "### 4️⃣ **Google Sheets**  \n- Appends the original URL and all available download links (360p, 720p, 1080p, MP3) into a spreadsheet.  \n- Provides a structured history of all downloads for future reference.  \n"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "a183fdce-c385-4c17-b237-a0ac731adfc0": {
      "main": [
        [
          {
            "node": "c7806bea-3eaa-464e-8939-cd707de01ba4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "8107174c-5a28-4e08-be56-de75f9d85b01": {
      "main": [
        [
          {
            "node": "a183fdce-c385-4c17-b237-a0ac731adfc0",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "86a2db5e-5928-4459-ad69-846994ab98d0": {
      "main": [
        [
          {
            "node": "8107174c-5a28-4e08-be56-de75f9d85b01",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
よくある質問

このワークフローの使い方は?

上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。

このワークフローはどんな場面に適していますか?

中級 - ファイル管理

有料ですか?

このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。

関連ワークフロー

Facebook動画をGoogleドライブにダウンロードし、自動のに表に記録する
Facebookの動画をGoogleドライブにダウンロードし、テーブルの自動記録にダウンロードログを記録
If
Wait
Form Trigger
+
If
Wait
Form Trigger
19 ノードSk developer
ファイル管理
RapidAPI統合を通じてSlideshareプレゼンテーションをGoogleドライブにダウンロード
RapidAPI統合でSlideshareのプレゼンテーションをGoogleデリカレントダウンロード
If
Wait
Form Trigger
+
If
Wait
Form Trigger
17 ノードSk developer
ファイル管理
Threadsの動画をダウンロードし、結果をGoogleスプレッドシートに記録
Threadsの動画をダウンロードして結果をGoogleスプレッドシートに記録
If
Wait
Form Trigger
+
If
Wait
Form Trigger
19 ノードSk developer
ファイル管理
RapidAPI統合による任意のプラットフォームの動画をGoogleドライブにダウンロード
RapidAPI統合を通じて、任意のプラットフォームの動画をGoogleドライブにダウンロード
If
Wait
Form Trigger
+
If
Wait
Form Trigger
17 ノードSk developer
ファイル管理
Bilibili動画ダウンローダー(Google Driveアップロード・アイメール通知対応)
Bilibili 動画ダウンローダー(Google Drive アップロードとメール通知に対応)
If
Wait
Email Send
+
If
Wait
Email Send
19 ノードSk developer
ファイル管理
Instagram動画をGoogleドライブにダウンロードし、自動のにメールで送付する
Instagramの動画をGoogleドライブにダウンロードし、メールで自動送信
If
Email Send
Form Trigger
+
If
Email Send
Form Trigger
15 ノードSk developer
ファイル管理
ワークフロー情報
難易度
中級
ノード数9
カテゴリー1
ノードタイプ5
難易度説明

経験者向け、6-15ノードの中程度の複雑さのワークフロー

外部リンク
n8n.ioで表示

このワークフローを共有

カテゴリー

カテゴリー: 34