twentyhq / twenty

Building a modern alternative to Salesforce, powered by the community.
https://twenty.com
GNU Affero General Public License v3.0
16.03k stars 1.8k forks source link

Meeting Bot #5249

Closed FelixMalfait closed 2 weeks ago

FelixMalfait commented 5 months ago

1. Define env vars and pass them as client config MEETING_BOT_PROVIDER=aimeetingbot MEETING_BOT_API_KEY=xxxx Pass the meeting bot provider to the frontend in clientConfig.

Note this is a standard across our codebase, we use a “driver based” approach for all external providers, even if there’s just 1 provider implemented.

2. Add an option to opt-in in integration page Frontend: design will be confirmed by @Bonapara

Backend: we need to add a new billingSubscriptionItem to the subscription, which will track that the user has opted-in to the meeting bot extension. I think we need a custom resolver for that.

Related: #5247

3. Add an option to opt-in to MeetingBots in calendar settings Frontend: design will be confirmed by @Bonapara. Conditionally display section "meeting bot" with a setting to define when meeting bots should be automatically added to meetings Backend: we need to introduce a new column on calendarChannel table, which we can call meetingBotAutoAttendance, values = NEVER, EXTERNAL_MEETINGS, ALL_MEETINGS

4. Add an option to toggle bot at the calendarEvent level Frontend: basic dropdown/enum field (should come for free) Backend: add field on calendarEvent, meetingBotShouldJoin, with values TRUE, FALSE, CHANNEL_SETTINGS

6. Call MeetingBot API for events to be logged Create a listener on calendarEvent.created/updated/deleted and call the meeting bot API accordingly. Meeting provider and link can be found on calendarEvent.conferenceLink and calendarEvent.conferenceSolution

5. Webhook at the end of calls Create an endpoint /apps/aimeetingbot/webhook to receive webhook notifications At the end of calls, we will create a new activity with type=note We can easily import markdown to the body: https://www.blocknotejs.org/docs/editor-api/converting-blocks#parsing-markdown-to-blocks We also need to call the Stripe API tu update usage metrics: https://docs.stripe.com/api/billing/meter-event/create

Bonapara commented 4 months ago

WDYT of this UX? (Will need advice for the wording that are mostly placeholders for now)

Index

image

Integration detail page

image

image

image

Calendar page

CleanShot 2024-05-06 at 15 10 37

Lazare-42 commented 1 month ago

hey :)

Came back to this.

Would you like for us to implement this?

We definitely can, but would perhaps need a small onboarding on the code-base @FelixMalfait @Bonapara

This can 100% be our scope