If you want to skip ahead to today: I put this functionality together as a plugin: muness/obsidian-ics: Generate Daily Planner from ical feeds
I wanted to get my meetings into my Daily Notes. Here’s what I got working:
- Today's meetings
- [ ] 10:00-10:30 Chat about <...> https://xx.zoom.us/j/<id>?pwd=<pwd>
- [ ] 10:30-11:00 ❇️ Muness // ... 1:1 https://zoom.us/j/<id>?pwd=<pwd>
- [ ] 12:15-13:00 ❇️ ... / Muness Skip Level
- [ ] 13:00-14:00 Team Weekly
- [ ] 15:30-16:00 Appointment
- [ ] 16:30-17:00 ❇️ ... / Muness 1:1
Along the day, I check off meetings as I wrap them up. Steps to get here follow.
Setup gcalcli
- insanum/gcalcli: Google Calendar Command Line Interface
- You’ll have to then setup your own API because Google doesn’t enable this out of the box. Follow the login instructions starting from “Go to the Google developer console”.
- Type
gcalcli --client-id <clientid> --client-secret <secret> agenda
from the command line replacing the client id and secret with the values you got from the preceding step. You should see your agenda after authenticating through your browser. - Once authenticated, you no longer need to specify the client-id and secret. Test it with
gcalcli agenda
Setup a script to pull the items you want to the command line and in the format you like. Test it and make sure it works on the command line. Here’s mine, replace “my work calendar” with the one you want to pull data from (you can get a list from gcalcli list
:
IFS= read -r prefix
/usr/local/bin/gcalcli --calendar "<my work calendar>" agenda --details all --tsv --nodeclined "`date '+%Y-%m-%d'`" "`date '+%Y-%m-%d 23:59'`" | awk -vprefix="$prefix" -F $'\t' '{print prefix $2 "-" $4 " " $9 " " $8}' | grep -v "Busy (via Clockwise)" | grep -v "Travel Time (via Clockwise)" | grep -v "Lunch (via Clockwise)"
Bring into Obsidian in your daily notes
- Setup konodyuk/obsidian-text-expander: Text Expander plugin for Obsidian
- Move the script into ~/.obsidian/scripts/agenda.sh
- In the Text Expander settings, add a template for it:
"regex": "^agenda:",
"command": "echo <text> | cut -c 8- | sh <scripts_path>/agenda.sh"
},
- And add it to your journal notes:
- Today's meetings
{{agenda:\t- [ ] }}
In the morning I hit tab after that template and Text Expander then uses the script to replace it with the list of meetings.
It’s a lot of steps. Let me know if you’re having trouble and I’ll try to help! Please include context and examples. I tested this on macos, and linux should be fine. I haven’t tried it on my Windows machine yet.