Skip to main content

Filter by Attendee Domain

What it does: Only passes events through if at least one attendee has an email address from a specified domain (e.g. @company.com).

Use case: Sync only work-related meetings by requiring a company email attendee, or isolate meetings with a specific partner or client.

function gate(event: GateEvent): GateResult {
if (event.hasAttendee('@company.com')) {
return { pass: true };
}
return { pass: false, reason: 'No company attendee' };
}

How It Works

The hasAttendee() helper searches all attendee email addresses for the given pattern using a case-insensitive match. Passing @company.com matches any attendee whose email ends with that domain. If none match, the event is blocked from syncing.

Customization

Allow multiple domains:

function gate(event: GateEvent): GateResult {
if (event.hasAttendee('@acme.com') || event.hasAttendee('@partner.com')) {
return { pass: true };
}
return { pass: false, reason: 'No approved domain attendee' };
}

Block events from a specific domain instead (inverse logic):

function gate(event: GateEvent): GateResult {
if (event.hasAttendee('@competitor.com')) {
return { pass: false, reason: 'Blocked competitor domain' };
}
return { pass: true };
}

Match a specific person by email:

function gate(event: GateEvent): GateResult {
if (event.hasAttendee('manager@company.com')) {
return { pass: true };
}
return { pass: false, reason: 'Manager not in attendance' };
}