If you ever wanted a straightforward method for connecting a Google Calendar event to a Joplin note, notebook or tag, keep reading.
Requirements
You will need to be using or have installed:- Joplin and the web-based Google Calendar. The Google Calendar app for Android/IOS is not supported.
- Google Chrome (Windows/Linux) and Firefox (Linux) browsers. Other browsers haven't been tested yet, but Firefox and any Chromium-based browser that supports extensions should work. Runs rather janky on Linux at this point.
- Tampermonkey extension (downloadable for Chrome here)
- Windows 10/11 (other operating systems haven't been tested yet) and Linux (Ubuntu and Linux Mint tested so far)
Background: Linking into Joplin
Joplin gives you a context menu option of "Copy external link" for individual notes, notebooks and tags. This places an application link (technically x-callback-url link) into your OS clipboard, in the form of joplin://x-callback-url/openNote?id={32-digit ID} for notes, for example. These application links are supposed to work a lot like regular (http:// or https://) web links but instead link into your application, Joplin in this case. To date, many applications don't support these kind of links.Read more about Joplin's External URL Links and the x-callback-url specification.
Script to enable linking into Joplin from Google Calendar
I have created a Tampermonkey script using JavaScript that, when loaded, allows you to paste any of these (bare) external links into an event's description when using the web-based Google Calendar, and then be able to view and use them as active links in the event's preview card (the box that pops up when you single-click the event) at any time thereafter. The links will appear as "Joplin note", "Joplin notebook" or "Joplin tag".Note: Only bare links are supported at this time. Embedding the application link in event description text will not work. I may look into supporting this embedding later.
Here's a sample event preview card, with these links in a suggested built-in styling (which can be turned off by setting USE_CUSTOM_STYLE to false in the script):
The links had been entered in the event thusly:
Installation
Here's how to install the script:- Download the zipped script from my Google Drive here. (I may host this on GitHub at some point)
- Extract CJLGPC.js from the .zip file.
- Open CJLGPC.js in Notepad or any text editor. Select all (Ctrl-A in Windows) and copy (Ctrl-C in Windows).
- Click the Tampermonkey extension's icon (usually in your Chrome toolbar) and then click "Create a new script'...''. Alternatively, open your Tampermonkey dashboard and click the "+" tab.
- Select all and paste, overwriting the default script with this one. Save (Ctrl+S in Windows).
- Go to your Google Calendar. If it's already loaded in a tab, reload the page.
Support and thanks
I wrote this script to start as simple as possible, to nail the basic need I had. I strived to make it compatible with other GCal extensions and add-ons. Please let me know of any incompatibilities.My time available for support is limited, but please feel free to ask questions or request enhancements in this topic.
Special thanks go to fabiosangregorio on Github who wrote a Chrome extension that clued me into how to access the GCal event preview card. I am using event handling code and some coding structure from that project. Also, thanks to me for mastering Regular Expressions years ago - that was really handy for my purposes here!
Version History
0.1 (4 Feb 2023) - Initial release. Consider this to be beta as long as it is 0.x.0.1.1 (23 Feb 2025) - Fixes to adapt to changes in Google Calendar DOM and security expectations in Chrome.