Drafts entry using details of Office 365 Calendar

Hi all,

I’d like to export meeting details from an Office 365 calendar entry into Drafts, make notes, and then export my notes.

I can export my notes no problem, but does anyone know how to pull in the meeting details from Office 365?

Thanks!

1 Like

A couple of options:

Pull from Drafts

If you use the calendar and event scripting objects in Drafts, you should be able to specify your O365 calendar as the source, and use the events function to get your list of events in a specified time frame. You can use a prompts to help you specify the dates/times and which event if there are multiple from your date/time filtered search.

After that the properties of the event object should give you the information you need.

Share to Drafts and Process

Calendar apps such as Fantastical will allow you to share calendar events; I’ve not seen this in the native Calendars app, but it may be buried in there somewhere.

When Fantastical shares an event to Drafts it dumps an iCal formatted set of text into the new draft. Since this is structured data, an action to process the text into a friendlier format could be used against the draft.

Hope that helps.

Here’s a third option… maybe not as elegant as a pure Drafts solution, but you can start in Shortcuts to grab all calendar info you want and then launch a new Draft.

Here is a shortcut I frequently use for that very use case

https://www.icloud.com/shortcuts/bca965955a504157bfa8e199d5bd2302

3 Likes

To add to this, if you wanted I’m pretty sure you could use a “Run Shortcut” step in a drafts action, if you wanted to launch this from Drafts (rather than going into Shortcuts).

I’ve been playing more with Drafts lately after the latest episode but I must admit I’m more comfortable in Shortcuts so I’ve been using that pretty heavily in the workflows I’m creating.

2 Likes

Thanks BL! Works like a charm. All I had to do was change the URL from drafts5 to drafts4 and voila!

1 Like

Is there a way to get the names and email addresses of all the attendees?

I do exactly this using Shortcuts - but I dump it into Obsidian instead of Drafts. I have a timed automation that goes through my Outlook 365 Calendar every morning and creates a single note for each meeting. It pulls in the title, organizer, attendees, time, date, duration, and the contents of the invitation.

In Shortcuts, I grab each piece of data from the calendar event (using the “Get {something} from Calendar Event” action) and save it in a dictionary,
CleanShot 2022-10-20 at 10.42.54

then format a text block using all that data
CleanShot 2022-10-20 at 10.42.01
and save it as a Markdown file. You could just as easliy send to Drafts.

I make sure to include all the syntax for linking (double [[ ]] in Obsidian) so everything can backlink. I also do some text replacement logic along the way (“If meeting title contains {this word}, use {this thing} as the project name” type of stuff)

I can’t share the actual shortcut, it has a lot of proprietary company stuff in it, but if you’re interested I’d be happy to create a generic sample shortcut for you!

EDIT:
I would create this in Shortcuts, for sure. You could probably do it with JS in Drafts actions, but then you are stuck in Drafts forever. If you build it out in Shortcuts, you have more flexibility. If you decide to not use Drafts later, you can just swap out the last action from “Send to Drafts” to “Send to Tana” or “Save to File” or whatever you need.

SECOND EDIT:
Here’s what the output of my shortcut looks like in Obsidian: