首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >使用Zapier将Spotify链接添加到Spotify播放列表中

使用Zapier将Spotify链接添加到Spotify播放列表中
EN

Stack Overflow用户
提问于 2018-08-20 14:00:03
回答 1查看 975关注 0票数 2

我有一个斯莱克小组与一群朋友,我们总是分享Spotify链接。我希望这些链接被自动添加到一个大Spotify播放列表中,所以我想出了一个解决方案,使用Zapier来弥补这个差距。因为我只想使用免费的层,它需要两个单独的Zaps来实现这一点。许多在线解决方案提供了将Spotify与Slack同步的方法,但这提供了相反的方法。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-08-20 14:00:03

Zapier完全能够在一个Zap中处理这个特定的任务,诀窍是它超过了自由层的三个动作限制,所以我不得不将它分解成两个Zaps,一个处理#music Slack通道中的筛选Spotify链接,另一个解析URL并提取轨道的Spotify ID并将其发布到播放列表中。

筛选器过滤到板条通道的链接

  1. 创建一个名为#spotify-链接的新Slack频道。我给我添加了一个描述,告诉人们它的目的,而不是加入这个特定的频道。这也需要公开,因为Zapier看不到私人频道。
  2. 在Zapier,创建一个新的Zap与Slack的集成。
代码语言:javascript
运行
复制
- Slack Trigger -> New Message Posted to Channel -> Continue
- Connect the Slack account you want to use -> Continue
- Channel -> #music (or whatever the channel your group uses for music)
- Trigger for Bot Messages -> No -> Continue

  1. 添加筛选器操作
代码语言:javascript
运行
复制
- Only continue if... -> Continue
- From dropdowns select Text -> (Text) Contains -> [https://open.spotify.com/track/](https://open.spotify.com/track/) -> Continue

  1. 添加另一个操作并选择Slack
代码语言:javascript
运行
复制
- Slack Trigger -> Send Channel Message -> Continue
- Connect the Slack account you want to use -> Continue
- Select the channel you created in step 1
- Message Text -> From the dropdown to the right, select New Message Posted To Channel -> Click the arrow to the right and choose the Text field
- There's a bunch bot settings you can customize if you feel so inclined here as well
- Broadcast to channel -> no -> Continue

Spotify播放列表

  1. 创建一个新的Zap集成与Slack ->继续
代码语言:javascript
运行
复制
- Slack Trigger -> New Message Posted to Channel -> Continue
- Connect the Slack account you want to use -> Continue
- Channel -> #spotify-links -> Continue
- Trigger for Bot Messages -> Yes -> Continue

  1. 添加格式化程序操作->继续
代码语言:javascript
运行
复制
- Text -> Text -> Continue
- Transform -> Exact pattern
- Values -> Input -> Select dropdown to the right -> New Message Posted to Channel -> Text
- I found a regex that would select just the Spotify ID out of the URL, even if there is a query string, as Spotify often adds one to their sharing links.
- Pattern -> `[^\/][\w]+(?=\?)` -> Continue
代码语言:javascript
运行
复制
    1. Add a Spotify Action -> Continue

代码语言:javascript
运行
复制
- Create -> Add Track to Playlist -> Continue
- Connect Spotify account you want to use -> Continue
- Playlist -> Choose the playlist you want to add the music to on Spotify. If you haven't created it yet, go to Spotify and create a new public playlist 
- Track -> Use Custom Value(advanced)
- Custom Value for Track Track ID -> Choose 2 Text from the dropdown -> Continue

那应该让你滚开。一定要测试你的数据,并确保事情顺利进行。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51932404

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档