8
n8n 中文网amn8n.com

使用Elevenlabs v3生成多说话人播客

中级

这是一个Content Creation, Multimodal AI领域的自动化工作流,包含 8 个节点。主要使用 Code, GoogleDrive, HttpRequest, GoogleSheets, ManualTrigger 等节点。 使用Google Sheets、ElevenLabs v3和Drive创建多说话人播客

前置要求
  • Google Drive API 凭证
  • 可能需要目标 API 的认证凭证
  • Google Sheets API 凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "5TvSxJW2lAijV6am",
  "meta": {
    "instanceId": "a4bfc93e975ca233ac45ed7c9227d84cf5a2329310525917adaf3312e10d5462",
    "templateCredsSetupCompleted": true
  },
  "name": "使用Elevenlabs v3生成多说话人播客",
  "tags": [],
  "nodes": [
    {
      "id": "9eb580fe-7b75-4d15-92a9-19877abd3a50",
      "name": "当点击“执行工作流”时",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -528,
        -16
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "4f58a82a-c01d-4f4e-9d79-8569d3c52400",
      "name": "上传文件",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        368,
        -16
      ],
      "parameters": {
        "name": "=podcast_{{$now.format('yyyyLLddHHmm')}}",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive"
        },
        "options": {},
        "folderId": {
          "__rl": true,
          "mode": "list",
          "value": "1J7_S0zPgUukmKWJglMepvf429vfQsidL",
          "cachedResultUrl": "https://drive.google.com/drive/folders/1J7_S0zPgUukmKWJglMepvf429vfQsidL",
          "cachedResultName": "Elevenlabs"
        }
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "HEy5EuZkgPZVEa9w",
          "name": "Google Drive account (n3w.it)"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "e11d5c4a-4cbc-4fb9-9ac2-069ee0bb57a5",
      "name": "生成播客",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        160,
        -16
      ],
      "parameters": {
        "url": "https://api.elevenlabs.io/v1/text-to-dialogue",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"model_id\": \"eleven_v3\",\n  \"inputs\":  {{ JSON.stringify($json.podcast) }}\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "cuOCiacID6OxWFUF",
          "name": "ElevenLabs API"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "e890110b-d0a9-4d8c-9beb-66642cc06406",
      "name": "获取对话",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -288,
        -16
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1eB8iUQmhj3xJMpGam_slCS0ivtgTUpbcWAqeutG_HM8/edit#gid=0",
          "cachedResultName": "Foglio1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1eB8iUQmhj3xJMpGam_slCS0ivtgTUpbcWAqeutG_HM8",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1eB8iUQmhj3xJMpGam_slCS0ivtgTUpbcWAqeutG_HM8/edit?usp=drivesdk",
          "cachedResultName": "Elevenlabs v3 Pocast Multispeaker"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "JYR6a64Qecd6t8Hb",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "989198ac-709c-442f-b3e8-dca8c6c3d4b0",
      "name": "准备对话",
      "type": "n8n-nodes-base.code",
      "position": [
        -64,
        -16
      ],
      "parameters": {
        "jsCode": "// Loop over input items and transform the structure\nconst transformedItems = [];\n\nfor (const item of $input.all()) {\n  // Create the new structure with text and voice_id fields\n  transformedItems.push({\n    text: item.json.Input,\n    voice_id: item.json[\"Voice ID\"]\n  });\n}\n\n// Store the result in a variable\nconst result = transformedItems;\n\nreturn [{ json: { podcast: result } }];"
      },
      "typeVersion": 2
    },
    {
      "id": "3d20ed34-a6c2-4bfc-881a-37c5457e9deb",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        144,
        -592
      ],
      "parameters": {
        "color": 6,
        "width": 320,
        "height": 448,
        "content": "### 提示"
      },
      "typeVersion": 1
    },
    {
      "id": "357c0a82-616e-4b6f-9e64-c2bebcaa320b",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -576,
        -592
      ],
      "parameters": {
        "color": 3,
        "width": 688,
        "height": 272,
        "content": "## 使用Elevenlabs v3生成多说话人播客"
      },
      "typeVersion": 1
    },
    {
      "id": "bda15b17-1cf9-43f0-b2fa-c959f743b002",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -576,
        -304
      ],
      "parameters": {
        "width": 688,
        "content": "### 预备步骤"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "b17f8bbc-98c9-4df2-9196-cc580e67c1cf",
  "connections": {
    "Get dialogue": {
      "main": [
        [
          {
            "node": "Prepare dialogue",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate podcast": {
      "main": [
        [
          {
            "node": "Upload file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare dialogue": {
      "main": [
        [
          {
            "node": "Generate podcast",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Get dialogue",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

中级 - 内容创作, 多模态 AI

需要付费吗?

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

工作流信息
难度等级
中级
节点数量8
分类2
节点类型6
难度说明

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

作者

Full-stack Web Developer based in Italy specialising in Marketing & AI-powered automations. For business enquiries, send me an email at info@n3w.it or add me on Linkedin.com/in/davideboizza

外部链接
在 n8n.io 查看

分享此工作流