Skip to content
Skip to main content

CalendarSync component

Last updated:

The CalendarSync component lets users enable or disable automatic Notetaker scheduling for their calendar events. Typically, you would use it on settings or integration pages where users manage how Notetaker joins meetings.

import React, { useEffect } from "react";
import { CalendarSync, provider as useProvider } from "@nylas/react";
// import '@nylas/react/style.css' // to style the component
function App() {
const provider = useProvider();
useEffect(() => {
// Necessary to set before using the component
provider.setAccessToken("nylas-access-token");
provider.setApiUrl("eu"); // can be "us" or "eu", defaults to "us"
}, []);
return (
<CalendarSync
calendarId="example-calendar-id"
grantId="example-grant-id"
notetakerName="Example Notetaker"
onUpdate={(calendar) => console.log("Updated calendar:", calendar)}
onCancel={() => console.log("Edit cancelled")}
onError={(err) => console.error("Error:", err)}
hideRecordingSettings={false}
hideNameInput={false}
/>
);
}
export default App;
PropertyTypeDescription
calendarIdstringThe ID of the calendar to sync with.
onSync?(event: SyncEvent) => voidA callback generated when the sync status changes.
autoSync?booleanAutomatically sync on mount.
className?stringAdditional CSS classes for the container.
PropertyTypeDescription
status'syncing' | 'success' | 'error'The current sync status.
error?stringThe error message generated if sync fails.
timestampstringWhen the sync event occurred.