需要Microsoft团队和python集成的Https终结点 [英] Need a Https endpoint for microsoft teams and python integration

查看:64
本文介绍了需要Microsoft团队和python集成的Https终结点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些python脚本,这些脚本可以根据要在Microsoft团队中托管的用户输入来执行某些工作.对于外发的Webhook团队,要求在哪里以及如何获取它的https链接.我对此很陌生,所以不要将任何事情视为理所当然.

I have some python scripts which perform some jobs based on the user inputs I want to host this on microsoft teams. For an outgoing webhook teams asks for a https link where and how do I get it. I am pretty new to this so do not take anything for granted.

推荐答案

基本上,此呼出网络挂钩"意味着Teams可以调用某种类型的Web服务,该服务托管在可公开访问的https地址上.最后,它的功能与bot非常相似,因此可以创建一个成熟的bot.这是有关创建Microsoft机器人(针对Teams或其他方式)的指南,使用Python .

Basically, this "outgoing webhook" means that Teams has the ability to call a web service of some sort, hosted on a publicly-accessible https address. In the end, it functions very similarly to a bot, so it's possible to just create a full-blown bot. Here's guidance on creating a Microsoft bot (for Teams or otherwise) using Python.

不过,还有一个更简单的选择,就是基本上只在某个地方托管网络功能(例如,Azure功能或我想是Amazon Lamba).请参阅本文.如本链接所述:

However, there's a more simple option, of basically just hosting a web function somewhere (e.g. an Azure Function or, I guess, an Amazon Lamba). See this article. As mentioned in this link:

外发的Webhooks将数据从团队发布到任何选定的服务能力 接受JSON有效负载的过程.将传出的Webhook添加到 团队,它的作用类似于漫游器,它使用以下方法在频道中监听消息 @提及,将通知发送到外部Web服务,以及 用丰富的消息(包括卡片和图片)进行响应.

Outgoing webhooks post data from Teams to any chosen service capable of accepting a JSON payload. Once an outgoing webhook is added to a team, it acts like bot, listening in channels for messages using @mention, sending notifications to external web services, and responding with rich messages that can include cards and images.

Azure函数会自动获取一个完整的,唯一的https地址,因此可以使用.

An Azure Function automatically gets a full, unique, https address, so it's fine to use.

另一个示例是此博客文章介绍如何创建Webhook调用的流程(电源自动化").该示例最后还使用Azure功能将团队+流"粘合在一起",但是它稍微解释了一些概念.您可以忽略Flow而仅使用Azure函数.

As another example, this blog post describes how to create a Flow ("Power Automate") that the webhook calls into. This example also ends up using an Azure Function to "glue together" Teams + Flow, but it explains the concepts a bit. You could ignore Flow and just use an Azure Function.

是否要构建-实际-机器人取决于-您可能希望做些什么.例如,您想与用户进行更完整的对话吗?您是否希望用户能够在频道之外与您的代码进行互动(例如1-1对话)?这些都是表明您是否需要合适的机器人的东西.

Whether to build an -actual- bot depends on -what else- you might want to be able to do. For instance, do you want to have a more complete conversation with the user? Do you want to the user to be able to interact with your code outside of a channel (e.g. a 1-1 conversation)? These are the kinds of things that will indicate if you might need a proper bot.

这篇关于需要Microsoft团队和python集成的Https终结点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆