mattermost / mattermost-plugin-zoom

Zoom plugin for Mattermost :electric_plug:
Apache License 2.0
107 stars 68 forks source link

Adding support for transcripts, recording, AI summarization and meeting subscription to channels #377

Open jespino opened 3 months ago

jespino commented 3 months ago

This PR include 3 important changes:

  1. It allows the user to subscribe channels to meetings. That way, whenever that meeting is started outside mattermost it will post a message with a link to the meeting (identical to the one is create when you click the zoom button).
  2. Whenever a meeting is finish, if there is a recording it is going to report the recording, the transcription and the chat messages in replies to the original zoom post (this works for the meetings in the point 1 and for the meetings that are created using the zoom button).
  3. If you have the mattermost AI Copilot plugin installed and configured, whenever you receive the transcription and the chat, you can summarize them using the AI plugin.

Testing

For testing this, you should test the 3 features independently (there is some degree of overlap, but I going to propose independent test cases). Another important thing is that before you test it you need to configure the zoom application in the zoom marketplace with the right webhook events (it has change, so check out the documentation).

I expect all the test proposed here are executed after properly configuring zoom plugin and AI copilot plugin

Test case 1: Subscription

Test case 2: Recordings, Chats, and Transcriptions (Without AI Copilot enabled)

Test case 3: AI Summarization (With AI Copilot enabled)

jespino commented 3 months ago

@mickmister PTAL

azigler commented 2 months ago

@jespino trying to build this locally and encountering some issues that are probably really simple to fix -- maybe my environment is configured incorrectly. Can you help me out?

EDIT: Also, I'm looking to configure this Zoom plugin in my own Zoom workspace (which I registered and set up) but I need to know a little more about the scopes and events you set up for this plugin. Can you share your example?

> make server

mkdir -p server/dist;
cd server && env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 /usr/local/go/bin/go build  -ldflags '-X "github.com/mattermost/mattermost/server/public/pluginapi/experimental/telemetry.rudderWriteKey=1d5bMvdrfWClLxgK1FvV3s4U1tg"'  -trimpath -o dist/plugin-linux-amd64;
# github.com/mattermost/mattermost-plugin-zoom/server
./configuration.go:133:105: undefined: manifest
./http.go:459:46: undefined: manifest
./http.go:900:46: undefined: manifest
make: *** [server] Error 1
> make webapp

./build/bin/manifest apply
cd webapp && /Users/andrew/.nvm/versions/node/v18.12.1/bin/npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: react-dom@18.3.1
npm ERR! Found: react@17.0.2
npm ERR! node_modules/react
npm ERR!   react@"17.0.2" from the root project
npm ERR!   peer react@">=16.8.0" from @emotion/react@11.11.0
npm ERR!   node_modules/@emotion/react
npm ERR!     dev @emotion/react@"11.11.0" from the root project
npm ERR!   4 more (@emotion/use-insertion-effect-with-fallbacks, ...)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^18.3.1" from react-dom@18.3.1
npm ERR! node_modules/react-dom
npm ERR!   peer react-dom@">= 16.8.0" from styled-components@6.1.10
npm ERR!   node_modules/styled-components
npm ERR!     styled-components@"6.1.10" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: react@18.3.1
npm ERR! node_modules/react
npm ERR!   peer react@"^18.3.1" from react-dom@18.3.1
npm ERR!   node_modules/react-dom
npm ERR!     peer react-dom@">= 16.8.0" from styled-components@6.1.10
npm ERR!     node_modules/styled-components
npm ERR!       styled-components@"6.1.10" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /Users/andrew/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/andrew/.npm/_logs/2024-06-26T21_44_49_459Z-debug-0.log
make: *** [webapp/node_modules] Error 1
azigler commented 1 month ago

I consulted @jespino and was able to build by using nvm install and then make dist.

On the Zoom side, after creating the integration according to the documentation, I went to Features then Access and toggled on Event Subscription and subscribed to these events:

Then I went to Scopes and enabled these scopes:

Scopes Description
meeting:read:meeting View a meeting
meeting:write:meeting Create a meeting for a user
cloud_recording:read:recording View a recording
archiving:read:list_archived_files Get an account's archived meeting or webinar files.
user:read:user View a user

I started following the steps for Test Case 1 but after creating a recurring meeting in the Zoom interface, I was unable to subscribe to it in a channel with /zoom subscribe [meeting ID without spaces]. I get this error: Can not subscribe to meeting: meeting not found

I'm unable to test Test Case 2 because as far as I can tell, this requires a paid Zoom account so you have access to cloud recordings? Please let me know if there's another way to test this.

My main takeaway is that this setup has several steps. You have to configure the Mattermost plugin and the Zoom app in parallel, because they require each other's fields to complete. Then you have to add all the scopes, then configure the webhook events and add them. And then you have to use slash commands to actually set it up. I think there's still some improvement to be done for the admin setup experience. What if we make this a step-by-step prompted guide via a /setup slash command or something? I think the Jira plugin does this successfully.

I propose that an issue is opened to update the docs page for this plugin to reflect these new scopes and events. Right now, the docs for configuring the webhook events don't tell you what events you need enabled (it just suggests a name, maybe reflects an old UI on Zoom?)

In terms of producing video asset(s), I see two objectives:

Next actions:

cc @jasonblais

azigler commented 1 month ago

I opened a docs PR to correspond with the changes in this PR.

https://github.com/mattermost/docs/pull/7276

azigler commented 1 month ago

@jespino Currently there is no way to know what meetings a channel is subscribed to, which makes it hard to know what state it's in. Should we add a slash command (maybe /zoom list) that shows subscriptions for the channel?