需要Microsoft团队和python集成的Https终结点

编程入门 行业动态 更新时间:2024-10-20 20:42:51
本文介绍了需要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终结点

本文发布于:2023-11-14 10:03:09,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1586915.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:团队   Microsoft   Https   python

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!