Skip to content

Extra Customization

kat edited this page Dec 10, 2022 · 16 revisions

The script supports a number of customizable options that are configured using the constants declared at the very top of the script.

This section of code will look similar to the following:

const NAME_NOTION = "Name";
const DATE_NOTION = "Date";
const TAGS_NOTION = "Tags";
const LOCATION_NOTION = "Location";
const DESCRIPTION_NOTION = "Description";

const EVENT_ID_NOTION = "Event ID";
const CALENDAR_NAME_NOTION = "Calendar";
const CALENDAR_ID_NOTION = "Calendar ID";
const LAST_SYNC_NOTION = "Last Sync";

const ARCHIVE_CANCELLED_EVENTS = true;
const DELETE_CANCELLED_EVENTS = true;
const IGNORE_RECENTLY_PUSHED = true;
const FULL_SYNC = false;

const CANCELLED_TAG_NAME = "Cancelled/Removed";
const IGNORE_SYNC_TAG_NAME = "Ignore Sync";

If you're even just a little familiar with coding, then you should be able to modify these without much issue. If not, please read the formatting instructions below before continuing!

Formatting instructions

TODO 😞

Boolean Options

These customization options can be either enabled or disabled (true/false). They must be either set to true or false.

ARCHIVE_CANCELLED_EVENTS

Default = true

Whether or not pages tagged as removed/cancelled should be archived by the script.

DELETE_CANCELLED_EVENTS

Default = true

Whenever or not events marked as canceled in GCal should be tagged as removed/cancelled and then archived by the script.

IGNORE_RECENTLY_PUSHED

Default = true

Whenever or not events recently synced from Notion to GCal should be synced back from GCal to Notion in the same script instance. Note that disabling this option can cause duplicate pages in Notion!

FULL_SYNC

Default = false

Whenever or not a full sync should be done when pulling events from GCal. Should only really be used when events are missing. The sync token is discarded, and the GCal API will list as many events as it can when called, ignoring whenever or not those events have been updated or are new.

String Options

These options are defined using strings! Remember to surround your entry using quotation marks! "

Changing property/tag names.

To change the property and tag names from the default ones used by the script, not only do you need to change them in Notion, but you also need to change the corresponding constant in the script. All of these constants are declared at the very start of the script and are in all caps. Make sure the strings you set to these constants match what you are using in the database!

Clone this wiki locally