Automated/Bot 消息发布到 Microsoft-Teams 聊天室
Automated/Bot message posting to Microsoft-Teams chat room
如何自动 post 将消息发送到 Microsoft-Teams 中的聊天室?这是用于单向消息传递:即 post正在发送消息,而不是阅读消息。
这里的大局是我们正在评估不同的群聊解决方案,其中一个要求是 post 从各种服务和程序向聊天室发送错误消息。
一个明智的方法似乎是建立一个 Bot using the REST API however just the authentication seems crazy complex, even then I can't work out how to just post a message. We're looking for a general solution that can be used simply in different scripting languages (Perl, Python, shell scripts, etc), so we don't want to use the .NET SDK or Node.js SDK.
我们已经研究过 Slack 和 Cisco Spark。在这两种方式中发布消息都非常简单,所以我希望 Microsoft-Teams 也有类似的简单解决方案?!
例如:
在 Slack 中,您可以使用 incoming webhooks to post messages. You use the web interface to get a unique webhook URL for each chat room, and then do simple HTTP POST to that URL (with a JSON message payload) to post to that chat room 作为机器人。我让它在 10 分钟内工作。
在 Cisco Spark 中,您 create a Bot which gives you a unique Access Token. You then get a room_id for the chat room and use those together to do an HTTP POST (again with a JSON payload) to create a message in the chat room。
那么您如何以编程方式 post/create/send 向 Microsoft-Teams 中的聊天室发送消息?
您所描述的正是 Office 365 Connectors 的工作原理。 Connector
允许您使用网络挂钩和简单的 JSON 负载将消息 post 发送到组或团队中。
有一个 playground 可以玩这些非常有用。但是请注意,playground 的 webhook 实现中存在一个错误,因此出于测试目的,我会坚持使用 Send via Email
选项。这不会影响这些在生产中的工作方式,该错误与 Playground 应用程序本身隔离。
最简单的方法是使用 "Incoming Webhook" 连接器 post 向频道发送消息。有关详细信息,请参阅此处:https://msdn.microsoft.com/en-us/microsoft-teams/connectors?f=255&MSPPError=-2147217396#setting-up-a-custom-incoming-webhook
如何自动 post 将消息发送到 Microsoft-Teams 中的聊天室?这是用于单向消息传递:即 post正在发送消息,而不是阅读消息。
这里的大局是我们正在评估不同的群聊解决方案,其中一个要求是 post 从各种服务和程序向聊天室发送错误消息。
一个明智的方法似乎是建立一个 Bot using the REST API however just the authentication seems crazy complex, even then I can't work out how to just post a message. We're looking for a general solution that can be used simply in different scripting languages (Perl, Python, shell scripts, etc), so we don't want to use the .NET SDK or Node.js SDK.
我们已经研究过 Slack 和 Cisco Spark。在这两种方式中发布消息都非常简单,所以我希望 Microsoft-Teams 也有类似的简单解决方案?!
例如:
在 Slack 中,您可以使用 incoming webhooks to post messages. You use the web interface to get a unique webhook URL for each chat room, and then do simple HTTP POST to that URL (with a JSON message payload) to post to that chat room 作为机器人。我让它在 10 分钟内工作。
在 Cisco Spark 中,您 create a Bot which gives you a unique Access Token. You then get a room_id for the chat room and use those together to do an HTTP POST (again with a JSON payload) to create a message in the chat room。
那么您如何以编程方式 post/create/send 向 Microsoft-Teams 中的聊天室发送消息?
您所描述的正是 Office 365 Connectors 的工作原理。 Connector
允许您使用网络挂钩和简单的 JSON 负载将消息 post 发送到组或团队中。
有一个 playground 可以玩这些非常有用。但是请注意,playground 的 webhook 实现中存在一个错误,因此出于测试目的,我会坚持使用 Send via Email
选项。这不会影响这些在生产中的工作方式,该错误与 Playground 应用程序本身隔离。
最简单的方法是使用 "Incoming Webhook" 连接器 post 向频道发送消息。有关详细信息,请参阅此处:https://msdn.microsoft.com/en-us/microsoft-teams/connectors?f=255&MSPPError=-2147217396#setting-up-a-custom-incoming-webhook