Microsoft Teams的应用程序有几种形式:
- Tabs
- Bots
- Connectors
- Messaging extensions
- Activity feed integrations
- Outgoing web hooks
这篇我们主要介绍如何使用 ASP.NET Core来开发最简单的Outgoing web hook。
什么是outgoing webhook
Outgoing webhooks allow you to create a simple bot for basic interaction, like kicking off a workflow or other simple commands you may need. Outgoing webhooks live only in the team in which you create them and are intended for simple processes specific to your company’s workflow.
If you’ve worked with outgoing webhooks or slash commands in other chat platforms, you can now bring what you have developed over to Microsoft Teams via outgoing webhooks. Outgoing webhooks are an easy way of extending your team without having to go through the full process of creating a bot via the Microsoft Bot Framework. You can use them for custom workflows and commands such as kicking off a build or checking the latest set of livesite issues.
You also have an effective way of ensuring that your service is accessible only by authorized users, as the security token used by your outgoing webhook will only be scoped to the team in which it has been added
上面是微软官方对outgoing webhook的说明,其实简单来说,outgoing webhook就是当我们想要创建一个Bot应用时,可以不必使用微软Bot Framework来创建,这个应用可以执行我们团队的一些自定义工作流和简单命令。
如何在teams里面创建outgoing webhook
要创建一个outgoing webhook, 进入到Teams应用, 导航到“团队” Tab页, 选中需要建立的Channel, 选中“应用”这个Tab,点击最下方的“创建传出webhook”(英文版本叫Outgoing Webhook), 如下图所示: