4

我已将 Twitter 和 Google Drive 应用程序添加到我的 Slack 团队。对于我目前正在开发的 ERP 系统,我想替换某些 URL,类似于 Twitter / Google Drive 的做法:

  • 谷歌驱动器:

    您包含链接的消息将更改为指向 Slack 中外部参考文件的共享消息点

    用于 Slack 的 Google Drive 集成

  • 推特:

    自动展开粘贴的 Twitter URL,显示完整的推文和附加媒体

显而易见的方法似乎是使用带有 URL 第一部分的传出 Webhook(例如https://erp.acme.com)作为“触发词”,但这似乎不适用于私人组和频道。Google Drive 似乎没有这个限制。哪个 API 提供了足够的灵活性?

4

1 回答 1

2

An engineer from Slack replied and offered two solutions. Thanks Brad!

Solution A

Set the outgoing webhook trigger to <https://erp.acme.com – note the opening <, as that's how URLs are parsed on Slack's side. The outgoing webhooks currently only work in public channels.

Solution B

Provide meta tags to make use of Slack's "unfurling".

You can read the link expanding documentation here, as well as this in-depth blog post about Slack unfurling.

Infographic on Slack's

于 2016-02-22T18:36:01.943 回答