I take a lot of meeting notes. Like a LOT. This Shortcut grabs the data out of a calendar event in Outlook, and spits out a Markdown file that can be edited in any standard text editor. And now, it does it automatically.
If you’ve ever used time-of-day Shortcuts in the past, it was a bit of a letdown. You’d get a notification to tap at the time you set up, and tapping that notification would open the Shortcuts app and start the automation. In the current beta of iOS14, Shortcut automations can be run by a time-of-day trigger without confirmation. This makes Shortcuts a much more powerful tool for automations, and I’m pretty pumped about it.
For example, I have a Shortcut I run every morning. It looks at my work calendar, and for every meeting that is not “all day”, it pulls the meeting title, date, calculates the duration, gathers the attendees, grabs the notes from the calendar event, and creates a Markdown document in iCloud drive.
Side note: I take plain text notes in Obsidian on Mac and 1Writer on iOS. These apps use a wiki-linking style of markup, similar to Roam. Wiki-links use double brackets around a phrase to automatically create “transclusion” links (basically, 2-way crosslinking). So, you’ll see in my shortcut that I surround every attendee with double brackets. This allows me to simply click on the person’s name and jump to their “page”, which will show me all the backlinks to other meetings I’ve been in with them. There will be a whole series of posts on my note taking in the future…
How does it work? Here’s the Shortcut, step by step
Note: This shortcut requires Data Jar and a helper shortcut, but can easily be modified to just save a variable and do the text replacement as part of this shortcut. I use Data Jar as a pseudo-clipboard-manager, and keep a lot of helper Shortcuts that do one thing (this one strips out special characters) so they can be re-used in other automations.
- Grab a bunch of calendar events from Today
- Repeat block, looping over each calendar event
- If statement -
if event == all day, do nothing. Otherwise
- Get title of event
- Send to Data Jar (can also just save to clipboard for next action, or set as a variable, but I prefer Data Jar)
- This helper Shortcut (linked below) replaces all the characters that cause Obsidian to choke in a file name.
- Step 6 dumps the modified text back into Data Jar. We’re getting it back here.
- Grab the start date
- And end date
- This calculation action gets the minutes between the start and end dates
If block determines what to display as duration. It’s not needed for this Shortcut, since I filter out All Day events at the beginning. But this Shortcut is the basis for other manual shortcuts so I leave the block in.
- If the number of minutes is over 1200, it’s “All Day”
- Otherwise, set the text to how many minutes
- Save this as a
Grab the Organizer from the event
Get the Attendees
Set Attendees as text, so we can manipulate the output
Use a RegEx Replace Text block to replace new lines with brackets and commas. (the previous step puts each attendee on a new line in the text action)
Get the notes from the event
- It’s not technically necessary to build a Dictionary, but I find it easier. If something changes above, I can just edit the dictionary entry and wherever it is used below doesn’t need to be edited.
filename is a combo of the date and title, followed by
.md (date uses Zettle format) Outputs:
2020-07-08T1830-This Is A Meeting.md
summary is the start date in long format, and the duration. Outputs:
July 8, 2020 6:30PM (30 mins)
attendees is the text from above, surrounded by opening and closing brackets. Step 18 only added the brackets between attendees, so this completes the block.
- This builds out the actual document text, using the values from the dictionary
- This sets the filename to the value of the
filename key in the dictionary
- Finally, the file is saved to iCloud Drive.
Because of a limitation in Shortcuts, it can only save to it’s own folder (if you want to do it without confirmation). So I save the documents to a folder that Hazel is watching. Hazel has a rule to move the files into a different iCloud Drive folder that Obsidian is pointing to.
This Shortcut took me about an hour to build several months ago. I’ve been using it every work morning since then, and it’s saved me tons of time. Now that I can run it on a schedule without touching it, it’s even more convenient. When I get to my desk in the morning, all my notes templates are in Obsidian and ready to roll.
Get the Shortcuts
Meeting Notes Shortcut
Regex Replacer Shortcut