简体   繁体   English

是否可以实现MS Teams的扩展以将文件与自定义文档流集成在一起

[英]Is it possible to implement an extension of MS Teams to integrate Files with custom document flow

I have a task to integrate MS Teams with custom document flow. 我的任务是将MS Teams与自定义文档流集成在一起。 The document flow provides REST Api to upload document and get metadata values that must be put to document before upload. 该文档流提供了REST Api来上传文档并获取在上传之前必须放在文档中的元数据值。

What is desired: Add new menu item to Files tab - "Save To XXX System" After click on "Save To XXX System" it suppose to display wizard to setup document metadata. 需要什么:将新菜单项添加到“文件”选项卡-“保存到XXX系统”中单击“保存到XXX系统”后,它会显示向导来设置文档元数据。 On finish step it will upload document by rest. 完成步骤后,它将休息上传文件。

I cannot find how to modify Files tab functionality. 我找不到如何修改“文件”选项卡的功能。

Also as an option I'm considering to create new Teams Tab App that will display duplicate of Files Tabs with desired function. 另外,我正在考虑创建一个新的“团队标签”应用程序,以显示具有所需功能的“文件”标签的重复项。 But in this case I'm looking for solution how to read list of files from Files tab. 但是在这种情况下,我正在寻找解决方案,该方法如何从“文件”选项卡中读取文件列表。

There is currently no way to modify the Files tab, but your idea of creating a tab should work. 当前无法修改“文件”选项卡,但是创建选项卡的想法应该可行。

What you need to do is use the MS Graph API to call https://graph.microsoft.com/v1.0/groups/{groupId}/sites/root/weburl where {groupId} can be retrieved by calling the microsoftTeams.getContext() function (as described in more detail here ): 您需要做的是使用MS Graph API调用https://graph.microsoft.com/v1.0/groups/{groupId}/sites/root/weburl ,其中{groupId}可以通过调用microsoftTeams.getContext()来检索microsoftTeams.getContext()函数(如更详细地描述在这里 ):

microsoftTeams.getContext(function(context) { 
  /* 
  Your function logic here. 
  context.groupId will contain the groupId required for the URL above.
  */ 
});

You may also find it more convenient to implement your tab using SharePoint itself instead of writing it from scratch. 您可能还会发现使用SharePoint本身而不是从头开始编写选项卡更方便。 There are details for how to do this here . 有关于如何做到这一点的细节在这里

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM