Filter by Attendee Count
What it does: Applies different rules based on how many people are attending — labeling 1:1 meetings, passing team meetings, and blocking large group events.
Use case: Automatically segment your calendar by meeting type: highlight one-on-ones with a prefix, pass through standard team meetings, and skip company-wide all-hands that shouldn't block your availability.
function gate(event: GateEvent): GateResult {
// 1:1 meeting — label it and pass through
if (event.attendeeCount <= 2) {
return { pass: true, transform: { title: `[1:1] ${event.title}` } };
}
// Large meeting — block it
if (event.attendeeCount > 10) {
return { pass: false, reason: 'Large meeting excluded' };
}
// Team meeting — pass through unchanged
return { pass: true };
}
How It Works
The attendeeCount computed property returns the number of entries in the attendees array. The logic uses two thresholds: <= 2 for 1:1 meetings (you + one other person) and > 10 for large group events. Any meeting in between (3–10 attendees) is treated as a regular team meeting and passed through unchanged.
Customization
Only sync 1:1 meetings:
function gate(event: GateEvent): GateResult {
if (event.attendeeCount <= 2) {
return { pass: true };
}
return { pass: false, reason: 'Not a 1:1 meeting' };
}
Skip solo events (attendeeCount === 0 or 1 means no invitees):
function gate(event: GateEvent): GateResult {
if (event.attendeeCount < 2) {
return { pass: false, reason: 'No other attendees — skipping solo event' };
}
return { pass: true };
}
Apply different transforms per size category:
function gate(event: GateEvent): GateResult {
if (event.attendeeCount <= 2) {
return { pass: true, transform: { title: `[1:1] ${event.title}` } };
}
if (event.attendeeCount <= 5) {
return { pass: true, transform: { title: `[Small] ${event.title}` } };
}
if (event.attendeeCount <= 20) {
return { pass: true, transform: { title: `[Team] ${event.title}` } };
}
return { pass: false, reason: 'Event is too large' };
}
Related Recipes
- Filter by Attendee Domain -- Gate events based on attendee email domains
- Multi-Condition Filter -- Combine attendee count with other conditions