替换自定义集成中的 URL

Replace URLs in custom integration

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

最明显的方法似乎是使用 URL(例如 https://erp.acme.com)的第一部分作为 "trigger word" 的传出 Webhook,但这似乎不起作用与私人团体和频道。 Google驱动好像没有这个限制。哪个 API 提供了足够的灵活性?

Slack 的一位工程师回复并提供了两种解决方案。谢谢布拉德!

解决方案 A

将传出 webhook 触发器设置为 <https://erp.acme.com – 注意开头 <,因为这是在 Slack 端解析 URL 的方式。传出 webhook 目前仅适用于 public 个频道。

方案 B

提供元标记以利用 Slack 的 "unfurling"。

您可以阅读 link expanding documentation here, as well as this in-depth blog post 关于 Slack 展开的文章。