Adding your google calendar agenda to your daily journal

Today I fixed the recurring event detection issues, added multiple calendar support, and the ability to name calendars. :slight_smile: Fingers crossed I can figure out the release issues tomorrow, then I can work on template support.

2 Likes

I have a working build, yay! Release 0.9.7 · muness/obsidian-ics (github.com)

Please give it a whirl and report back. Thank you!

12 Likes

@muness confirming the plug-in works great. This is exactly what I was looking for (and checking if someone has worked on something like this before hacking something myself). Thanks a lot for working on this and sharing :raised_hands:

2 Likes

Thank you so much Muness. The plugin works great.
I am looking forward to more customizing options, but just the “basic” functionality you integrated now is already going to be part of my workflow. I like how you integrated it seamlessly with the periodic notes and calendar plugin.

I can already see how this is going to help me do time-blocking.

  1. time-block in my google agenda for the week
  2. create the daily notes in obsidian
  3. import for each day the calendar
  4. add the tasks I want to do under each list
  5. Each day, link the daily note to the “day planner” timeline.

The way I use it is that I set some emojies for the various calendars I have. This way, the list looks clean and emphasizes the name of the event.


image

3 Likes

Thank you for pointing out such a useful tool! I actually found a different use case for this: Getting the zoom-url of your next meeting!

This line gets the “Location” property of the next event in my work calendar. (I tend to save the Zoom-URL in the location field and not the URL field – just change ‘location’ to ‘url’ if you use the URL field)

gcalcli --calendar Academia agenda --details location "`date '+%Y-%m-%d %H:%M'`" "`date '+%Y-%m-%d 23:59'`" | grep "Location" | cut -d ":" -f2,3 | cut -c 2- | head -n 1

Now why stop here? I’d like to open the zoom link directly. open comes to mind, but when specifying that the link should be opened with zoom, I can even skip the extra step of my default browser opening the Zoom URL first. So we modify the thing a tiny bit, and get the following script, which will automatically launch the zoom meeting of the next appointment I have :smiley:

now=`date '+%Y-%m-%d %H:%M'`
endOfToday=`date '+%Y-%m-%d 23:59'`
calendar="workCalendar"
zoomURL=`gcalcli --calendar $calendar agenda --details location "$now" "$endOfToday" | grep "zoom.us" | cut -d ":" -f2,3 | cut -c 2- | head -n 1`
open -a "zoom.us" "$zoomURL"

Well, I am gonna put this into an alias and into my launcher app. I know this isn’t strictly an Obsidian-related use case, but I am sure this will nevertheless be useful to some people.

1 Like

This is amazing, you’ve saved me so much time. How can I show my appreciation? I can’t find a link in your github or blog that lets me buy you coffee or anything

Can this work for shared calendars that I have setup in google?
I added the additional calendars, and the plugin stopped working. I removed them, and it works for the main calendar again

Hi @muness , I tried it. When I went to activate “ICS”, it says “failed to load plug-in”.

Steps I took to get the above error:
I downloaded the release, unzipped your file and saved all the files from that to the ics folder within the plugins folder, as instructed in your readme. And then restarted the Obsidian app. I searched and found ICS plugin. Then I activated it. And I got the error.

I am using Windows 10 on a PC.

Hey @muness, the Plugin works wonderful. Helps me so much. I am not into coding, but it would be also of great help if one could import the All-Day-Events from google calendar (besides the daily Agenda), like an upcoming section for the rest of the week in your daily notes. Smart ass writing that without having the skills to code it :slight_smile: Big thanks again!

1 Like

I think I saw All-Day-Events in the iCal.

I’ll try to take a look at this and the failed to load plug-in error some folks are reporting over the holidays and cut another release.

Would you say the plugin is working well enough that I should submit it to the official plugins list so that folks can install it directly from inside Obsidian?

1 Like

I only registered to tell you to do so! This plug-in works better than some of the “official” community plugins I tried and deserves to get some attention.

I would love to see customization options so that different calendars are being imported in different formats. For example I use one calendar for time-blocking and another for automated time-recording. I left your plugin unchanged for the first one (the formatting as tasks makes sense there) but hacked it (poorly, I’m afraid) to import the other calendar as a log (including details such as the calendar entry’s description.

Oh, and before you do submit it to the community plugins: Get that coffee button going as nick_s suggested.

Keep up the good work! :+1:

1 Like

@muness thank so much for this. I’m having the same issue on M1 macbook. Replicated steps above and same issue.

Any ideas?

ABSOLUTELY! Go for it! I`ve been working with it 14 days now. No problems so far. Planing my daily agenda with it every day. The all-day-event-thing would be great though. Thx again for this tool!

1 Like

I just discovered this and was amazed on how wonderfully it works! Thanks a lot! I don’t have to authenticate gcalcli anymore!

I also implemented the emojis as calendar name approach. And added this in the location of the event list in my daily notes template:

<% tp.file.cursor(1) %> <%* app.commands.executeCommandById("ics-plugin:import_events") %>

and also my daily notes had:

<%* app.commands.executeCommandById("backlink:toggle-backlinks-in-document") %>

This automatically does the work I want it to and henceforth begins my newly designed productive days with a schedule!

2 Likes

Just found this, and it does exactly what I want/need. Thank you for your work on this - I’ve looked at producing plugins myself and it’s not a trivial task!

And thanks for @rupadarshiray for his pointers on automating this with Templater. I’m struggling to get this to appear anywhere other than the top of the daily note (maybe because I’m using the live editor?), but that’s a minor annoyance.

2 Likes

Thanks for the kind words y’all!

My new employer blocks sharing calnedars as ics so I had been blocked. I figured out a way to test ics again, so will try to tackle some of the issues and suggestions over the holidays. I’ll post updates here to keep y’all updated.

If you’re so inclined, buy me a coffee. :blush:

It should work for additional calendars. That’s actually how I use it, with 4 calendars. See any errors in the console?

Hey muness, it looks like what you’ve done here is amazing! Unfortunately when I enter use the ICS: import events command on my daily note template, nothing appears (no text). I’ve added my calendar etc. and have put in test events to make sure that it’s not just that my calendar is empty…

Hope you can help.

Thanks in advance!

Hi, and thanks for your work on this, I’ve been desperate for such a plugin – but I too am seeing the “failed to load” message on my Mac notebook. When I check the console I see this error:

Screen Shot 2022-01-26 at 2.31.38 PM

This is how my plugins folders are populated, and I noted that “main.ics” is in a “src” subfolder, so perhaps not visible. but when I move it up a level into the “obsidian-ics-master” and restart Obsidian, the plugin still fails to load.

Any idea what might be wrong? Thank you!!

Sorry all who can’t get the plugin to load: I haven’t been able to reproduce the issue. I’ve tried on my Mac and Windows machine in my real vaults and brand new ones.

Can one of you document the issue for me with a brand new vault and any environment specifics? Thanks!