GOOGLE CALENDAR

The Google Calendar to Roam Integration allows users to import the list of events on a given day into their daily notes page. The name of the script is google-calendar.

Installation

You could use the Copy Extension button below to individually install this extension. To install, just paste anywhere in your Roam graph and click "Yes, I Know What I'm Doing".

Manual Installation

If instead you prefer to manually install, first create a block with the text {{[[roam/js]]}} on any page in your Roam DB. Then, copy and paste this code block as a child of the block.

var existing = document.getElementById("google-calendar");
if (!existing) {
  var extension = document.createElement("script");
  extension.src = "https://roamjs.com/google-calendar.js";
  extension.id = "google-calendar";
  extension.async = true;
  extension.type = "text/javascript";
  document.getElementsByTagName("head")[0].appendChild(extension);
}

Usage

The script supports the following configuration attributes, to be added in the [[roam/js/google-calendar]] page:

  • Google Calendar - (Required) This is the calendar ID that the extension will use to query for events. It's usually your gmail address, such as dvargas92495@gmail.com.
  • Include Event Link - (Optional) Set to true if you would like to hyperlink the event summary with a link to the google calendar event. Note, because there are more characters to be typed it's a slower operation.
  • Skip Free - (Optional) Set to true if you would like to filter out the events from your calendar that you've set to 'Free'
  • Format - (Optional) The text to add for each calendar event. Could use the following placeholders to be replaced with the event's data:
    • /Summary - the name of the event
    • /Link - the link for the event
    • /Hangout - the hangout link for the event
    • /Location - the location for the event
    • /Start Time - the start time of the event - /End Time - the end time of the event

Here's an example configuration page:

Be sure to make your calendar publicly accessible, since it needs to be queryable by the extension's api token:

In any page, create a Import Google Calendar button by typing in {{import google calendar}} (case-insensitive) in a block. Upon clicking the button, the extension will clear the button and fill the page in with the events you have scheduled for that day in the following format by default:

[Summary] ([Start Time (hh:mm am)] - [End Time (hh:mm pm)]) [ - link to Zoom/Meet]

It will be displayed in the timezone of your browser. It will use either the page's title if it's a daily note, or the current date if it's not.

This extension is also integrated with Smart Blocks! If you have both this extension and Roam42 installed, there will be a <%GOOGLECALENDAR%> command available. The command will automatically run the import google calendar logic and paste the events in blocks before continuing with the rest of the workflow.

Demo

Other Extensions