8
n8n 中文网amn8n.com

将Spotify曲目转换为MP3并通过Google Drive表单分享

中级

这是一个File Management领域的自动化工作流,包含 13 个节点。主要使用 Wait, FormTrigger, GoogleDrive, HttpRequest 等节点。 将Spotify曲目转换为MP3并通过Google Drive表单分享

前置要求
  • Google Drive API 凭证
  • 可能需要目标 API 的认证凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "60c025075753afcab9f803964b4caaca9402f435deb4efafbb8e3b93b54d8752",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "c2aaf114-004f-4890-8628-842884f24d01",
      "name": "表单提交时",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        0,
        0
      ],
      "webhookId": "a1068829-54c0-457c-9e4e-57f72653c9e1",
      "parameters": {
        "options": {},
        "formTitle": "Spotify To Mp3",
        "formFields": {
          "values": [
            {
              "fieldLabel": "url"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "9980b312-847b-4802-ae16-f40da67dd287",
      "name": "等待",
      "type": "n8n-nodes-base.wait",
      "position": [
        600,
        -140
      ],
      "webhookId": "c6fadb96-472b-45b4-ab72-de9a067acc17",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "f611935e-4893-4cb7-bda3-8cd9b21d9ffa",
      "name": "Spotify Rapid Api",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        260,
        0
      ],
      "parameters": {
        "url": "https://spotify-downloader-mp3.p.rapidapi.com/spotify-downloader.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": "spotify-downloader-mp3.p.rapidapi.com"
            },
            {
              "name": "x-rapidapi-key",
              "value": "your key"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "3cafc718-1352-4cc3-b0ee-af607fe88602",
      "name": "下载器",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1020,
        -80
      ],
      "parameters": {
        "url": "={{ $json.download_url }}",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "a9fa6952-377a-49c5-b09f-cb0e35fced78",
      "name": "上传 MP3 到 Google Drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1540,
        -300
      ],
      "parameters": {
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive"
        },
        "options": {},
        "folderId": {
          "__rl": true,
          "mode": "list",
          "value": "root",
          "cachedResultName": "/ (Root folder)"
        },
        "authentication": "serviceAccount"
      },
      "credentials": {
        "googleApi": {
          "id": "qUtlCnYpk7bXXaYp",
          "name": "Google Sheets account 3"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "3994a8b4-d6c7-41b0-a2ed-60f50e08f947",
      "name": "更新权限",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        2000,
        -280
      ],
      "parameters": {
        "fileId": {
          "__rl": true,
          "mode": "id",
          "value": ""
        },
        "options": {},
        "operation": "share",
        "permissionsUi": {
          "permissionsValues": {
            "role": "writer",
            "type": "anyone"
          }
        },
        "authentication": "serviceAccount"
      },
      "credentials": {
        "googleApi": {
          "id": "qUtlCnYpk7bXXaYp",
          "name": "Google Sheets account 3"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "143ddac5-033b-4438-8590-310dc47916ee",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1200,
        -480
      ],
      "parameters": {
        "width": 880,
        "height": 1340,
        "content": "# 🎵 Spotify 转 MP3 → Google Drive"
      },
      "typeVersion": 1
    },
    {
      "id": "8f98a48f-8a93-49ae-a2ac-f9d47e19c6f4",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -120,
        -180
      ],
      "parameters": {
        "width": 300,
        "height": 320,
        "content": "## 1. 表单提交时 (`formTrigger`)"
      },
      "typeVersion": 1
    },
    {
      "id": "bf986036-50b2-44f2-90f6-6447309b85e7",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        200,
        -360
      ],
      "parameters": {
        "width": 280,
        "height": 500,
        "content": "## 2. Spotify Rapid Api (`httpRequest`)"
      },
      "typeVersion": 1
    },
    {
      "id": "27b15fcc-0534-461f-94bc-d94d40432b1f",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        520,
        -340
      ],
      "parameters": {
        "width": 280,
        "height": 320,
        "content": "## 3. 等待 (`wait`)"
      },
      "typeVersion": 1
    },
    {
      "id": "1304d8d5-5316-4705-86a4-accd546cd31f",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        920,
        -300
      ],
      "parameters": {
        "width": 320,
        "height": 340,
        "content": "## 4. 下载器 (`httpRequest`)"
      },
      "typeVersion": 1
    },
    {
      "id": "c8837817-b03f-4235-a6fa-3742a3e80f41",
      "name": "便签5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1420,
        -520
      ],
      "parameters": {
        "width": 360,
        "height": 400,
        "content": "## 5. 上传 MP3 到 Google Drive (`googleDrive`)"
      },
      "typeVersion": 1
    },
    {
      "id": "3f989fbd-1929-4b37-9f85-5bd4c443720a",
      "name": "便签6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1900,
        -540
      ],
      "parameters": {
        "width": 320,
        "height": 440,
        "content": "## 6. 更新权限 (`googleDrive`)"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "Wait": {
      "main": [
        [
          {
            "node": "Downloader",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Downloader": {
      "main": [
        [
          {
            "node": "Upload Mp3 To Google Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Spotify Rapid Api": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "Spotify Rapid Api",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Mp3 To Google Drive": {
      "main": [
        [
          {
            "node": "Update Permission",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

中级 - 文件管理

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
中级
节点数量13
分类1
节点类型5
难度说明

适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流

外部链接
在 n8n.io 查看

分享此工作流