Skip to main content

Templates

Templates are pre-built gate functions you can apply with one click. They cover the most common sync scenarios so you can get started without writing any code.

To use a template, navigate to a sync rule's gate function settings and select the Templates tab. Click on any template to apply it immediately.

Screenshot: Template selector showing all 5 built-in templates

Pass All Events

Syncs every event from the source calendar to the target calendar without any filtering or modification. This is the default gate function for new sync rules.

Use case: Simple calendar mirroring where you want an exact copy of all events.

function gate(event: GateEvent): GateResult {
return { pass: true };
}
tip

Pass All Events is a good starting point. You can always switch to a different template or customize the gate function later.

Block Personal Events

Blocks any event that contains "personal" in the title or description. All other events sync normally.

Use case: Sharing your work calendar with colleagues without exposing personal appointments.

Visual Builder equivalent: Yes -- you can recreate this with a Title "contains" condition.

function gate(event: GateEvent): GateResult {
if (event.matches('personal')) {
return { pass: false, reason: 'Blocked personal event' };
}
return { pass: true };
}

The matches() helper performs a case-insensitive search across both the event title and description, so it catches "Personal", "PERSONAL", "personal appointment", and similar variations.

Redact Personal Events

Passes all events through, but replaces the title and description of personal events with generic placeholder text. This keeps your calendar's time blocks visible while hiding sensitive details.

Use case: Showing your availability on a shared calendar without revealing personal event details.

Visual Builder equivalent: Yes -- you can recreate this with a Title "contains" condition and a transform action.

function gate(event: GateEvent): GateResult {
if (event.matches('personal')) {
return {
pass: true,
transform: {
title: 'Personal Event',
description: 'Details redacted',
visibility: 'private'
}
};
}
return { pass: true };
}

Events that don't match "personal" sync unchanged. Events that do match still sync (so time blocks remain visible), but their title becomes "Personal Event", description becomes "Details redacted", and visibility is set to private.

Add Prefix to Title

Prepends [SYNCED] to every event's title. This makes it easy to distinguish synced events from native events on the target calendar.

Use case: When you sync events to a calendar you also use directly and want to know which events came from CalendarPipe.

Code-only template

This template does not have a Visual Builder equivalent because the Visual Builder cannot use template literals for dynamic string construction. Use the Code Editor to customize the prefix text.

function gate(event: GateEvent): GateResult {
return {
pass: true,
transform: {
title: `[SYNCED] ${event.title}`
}
};
}

To change the prefix, edit the template literal. For example, replace [SYNCED] with [Work], [Shared], or any text you prefer.

Set Events as Free

Syncs all events but marks them as "free" on the target calendar so they don't block your time.

Use case: Reference calendars where you want to see events but don't want them to show you as busy. Common for team calendars or shared project calendars.

Visual Builder equivalent: Yes -- you can recreate this with a Pass action and a showAs: free transform.

function gate(event: GateEvent): GateResult {
return {
pass: true,
transform: { showAs: 'free' }
};
}

Template Comparison

TemplateFilters Events?Transforms Events?Visual Builder?
Pass All EventsNoNoYes
Block Personal EventsYesNoYes
Redact Personal EventsNoYesYes
Add Prefix to TitleNoYesNo
Set Events as FreeNoYesYes

Next Steps