Feature: Conference Integration
Relevant source files
The following files were used as context for generating this wiki page:- packages/api/src/schemas/events.ts
- packages/meeting-links/src/detect.ts
- packages/api/src/providers/calendars/google-calendar/conferences.ts
- packages/api/src/providers/calendars/microsoft-calendar/conferences.ts
- apps/web/src/components/event-form/conference/conference-details.tsx
- packages/google-calendar/src/resources/calendars/events.ts
- packages/api/package.json
The Conference Integration feature provides a unified system for handling video and phone conferencing details associated with calendar events. It is designed to parse conference information from various providers like Google Meet and Microsoft Teams, normalize it into a standardized format, and render it consistently in the user interface. The system can also request the creation of new conference meetings when creating or updating an event.
This is achieved through a combination of a shared data schema, a dedicated meeting link detection utility, and provider-specific adapters for both parsing existing data and generating new conference requests. The frontend consumes this normalized data to display conference details, such as join links, meeting codes, and phone numbers, to the user.
Core Data Structures
The foundation of the conference integration is a set of standardized data schemas defined using Zod. These schemas ensure that conference data is handled consistently across the application, regardless of the source provider.
Sources: packages/api/src/schemas/events.ts:10-34
conferenceSchema
This is the main union schema that represents conference information. It can be one of two types:
create: A request to generate a new conference meeting for an event.conference: Detailed information about an existing conference meeting.
The diagram below illustrates the structure of the conferenceSchema and its components.
Schema Details
The fields within the conferenceSchema are defined as follows:
| Field | Type | Description |
|---|---|---|
type | "create" | "conference" | Discriminator to determine the object's purpose. |
providerId | "google" | "microsoft" | Identifies the source calendar provider. |
requestId | string | (For create type) A unique ID for the creation request. |
id | string | (For conference type) A unique ID for the conference, often derived from the meeting link. |
conferenceId | string | (For conference type) The provider-specific ID for the conference. |
name | string | (For conference type) The user-friendly name of the conference service (e.g., "Google Meet"). |
video | conferenceEntryPointSchema | (For conference type) Details for joining via video. |
sip | conferenceEntryPointSchema | (For conference type) Details for joining via SIP. |
phone | conferenceEntryPointSchema[] | (For conference type) A list of entry points for joining via phone. |
Sources: packages/api/src/schemas/events.ts:10-34
Meeting Link Detection
A critical component of the system is the ability to identify conference links from arbitrary text, such as an event's description or location field. This is handled by the @analog/meeting-links package, which is a dependency of the API.
Sources: packages/api/package.json:28, packages/meeting-links/src/detect.ts
The detectMeetingLink function takes a URL string and attempts to match it against a list of regular expressions for known conferencing services. If a match is found, it returns an object containing the service id, name, and the original joinUrl.
Supported Services
The utility supports a wide range of services. The following table shows a partial list:
| Service ID | Label | Example Regex Pattern |
|---|---|---|
meet | Google Meet | https?:\/\/meet\.google\.com\/... |
zoom | Zoom | `https://(...)?zoom.(us |
teams | Microsoft Teams | https?:\/\/teams\.microsoft\.com\/l\/meetup-join\/... |
webex | Webex | https?:\/\/.*?webex\.com\/... |
skype | Skype | https?:\/\/join\.skype\.com\/... |
discord | Discord | https?:\/\/discord(app)?\.com\/... |
facetime | FaceTime | https:\/\/facetime\.apple\.com\/join... |
Sources: packages/meeting-links/src/detect.ts:3-200
Provider-Specific Integration
The API uses provider-specific logic to translate data between the external calendar provider's format (e.g., Google Calendar API, Microsoft Graph API) and Analog's internal conferenceSchema.
Google Calendar Integration
Integration with Google Calendar is handled in packages/api/src/providers/calendars/google-calendar/conferences.ts.
Parsing Conference Data
The parseGoogleCalendarConferenceData function is the primary entry point for parsing conference details from a GoogleCalendarEvent object.
- Primary Method: It first checks if the event has a structured
conferenceDataobject. If so, it extracts details for video, SIP, and phone entry points directly from this object. - Fallback Method: If
conferenceDatais not present, it callsparseGoogleCalendarConferenceFallback. This function scans other event fields for a meeting link using thedetectMeetingLinkutility. The fields are checked in the following order:hangoutLink(legacy Google Meet)descriptionlocationsource.urlattachmentsgadget.link(legacy)
This flow is visualized in the diagram below.
Creating a Google Meet Conference
To create a new Google Meet call, the toGoogleCalendarConferenceData function is used. It takes a conference object of type create and transforms it into a GoogleCalendarEventConferenceData payload. This payload instructs the Google Calendar API to generate a new "hangoutsMeet" conference and attach it to the event.
// packages/api/src/providers/calendars/google-calendar/conferences.ts:202-212
export function toGoogleCalendarConferenceData(
conference: Conference,
): GoogleCalendarEventConferenceData | undefined {
if (conference.type === "create") {
return {
createRequest: {
requestId: conference.requestId,
conferenceSolutionKey: {
type: "hangoutsMeet",
},
},
};
}
return undefined;
}
Sources: packages/api/src/providers/calendars/google-calendar/conferences.ts:202-212, packages/google-calendar/src/resources/calendars/events.ts:747-756
Microsoft Calendar Integration
Integration with Microsoft Calendars (and by extension, Microsoft Teams) is handled in packages/api/src/providers/calendars/microsoft-calendar/conferences.ts.
Parsing Conference Data
The parseMicrosoftConference function extracts conference details from a Microsoft Graph Event object.
- Primary Method: It prioritizes the
onlineMeeting.joinUrlor the legacyonlineMeetingUrlfields. If a URL is found, it's used to create theConferenceobject. It also extracts phone numbers fromonlineMeeting.phones. - Fallback Method: If no
onlineMeetingURL is available, it callsparseConferenceFallback, which inspects theevent.location.locationUriandevent.location.displayNamefields for a detectable meeting link.
Sources: packages/api/src/providers/calendars/microsoft-calendar/conferences.ts:57-96, packages/api/src/providers/calendars/microsoft-calendar/conferences.ts:15-55
Creating a Microsoft Teams Conference
To create a new Teams meeting, the toMicrosoftConferenceData function is used. If it receives a conference object of type create, it returns an object that sets isOnlineMeeting to true and specifies teamsForBusiness as the provider. This signals to the Microsoft Graph API to provision a new Teams meeting for the event.
// packages/api/src/providers/calendars/microsoft-calendar/conferences.ts:5-13
export function toMicrosoftConferenceData(conference: Conference) {
if (conference.type !== "create") {
return undefined;
}
return {
isOnlineMeeting: true,
onlineMeetingProvider: "teamsForBusiness" as const,
};
}
Sources: packages/api/src/providers/calendars/microsoft-calendar/conferences.ts:5-13
Frontend Display
On the client side, the normalized Conference object is rendered by the ConferenceDetails React component. This component ensures that regardless of the provider, the user sees a consistent and usable interface for conference information.
The component checks if the conference.type is "conference". If so, it renders the details using specialized sub-components:
ConferenceVideo: Displays the main video join link, meeting code, password, and PIN.ConferenceSip: Displays SIP join details.ConferencePhone: Lists available dial-in phone numbers.
Each item, such as a join link or meeting code, is accompanied by a CopyButton that appears on hover, allowing the user to easily copy the information to their clipboard.
This diagram shows the rendering flow and user interaction within the ConferenceDetails component.
Sources: apps/web/src/components/event-form/conference/conference-details.tsx:185-203
Summary
The Conference Integration feature is a robust system that abstracts the complexities of different conferencing providers. By normalizing data into a standard conferenceSchema, it allows the backend to process and the frontend to display conference information in a predictable manner. The use of the @analog/meeting-links utility provides powerful and extensible link detection, while provider-specific adapters for Google and Microsoft handle the translation to and from their native API formats. This architecture makes the system flexible and easy to maintain or extend with new providers in the future.