Hook Integration with Outlook Calendar

Hi all,

I’d like to link Documents to outlook calendar entries. I managed to link eMails in outlook, however somehow I am unable to link to a calendar entry.

Does somebody know how I can hook to outlook calendar entries or is this a bug/feature request?

Welcome to the Hook Productivity Forum, @authsec. Oddly, I think this is the first request for Outlook Calendar. According to the documentation, it seems like this would only work with Exchange (the only ID I can see is exchange id). We’ll have a look.

1 Like

Yes, I’d like it too. Especially as calendar entries nowadays often contain essential video links!
Also Outlook Contacts!

In the mean time, what I do is to search for the item in HoudahSpot, and link to the file it finds.

(@LucB that suggests there is an underlying ID to find)

1 Like

I’d really like to second that request.
also for outlook mails.

Would be the tools for my omnifocus and GTD work.

1 Like

Thanks! It would be awesome if this works!

Any updates on this one? It would so much help being able to do that.

Having said that, there’s sort of a workaround…

I’m never keeping anything really in Outlook. I’m always archiving my mails into DevonThink using this solution.

And since most calendar entries are actually calendar invites that were sent to me, they also end up in DevonThink. So whilst I can’t directly “hook them up” within Outlook, what I can still do is hook their representations which I have in DevonThink.


We have draft scripts in-house. They needs more investigation and testing. And: I don’t know how reliable Microsoft is with respect to the IDs it generates for these things (e.g., when moving them in lists).

However, in case anyone wants to comment, here’s a draft. (

DRAFT Get Address Script for Outlook:

tell application "Microsoft Outlook"
	set messageList to current messages
	if current messages is not missing value and current messages is not {} then
		set myObj to item 1 of messageList
		set objs to selected objects
		if objs is not missing value then
			set myObj to item 1 of objs
		end if
	end if
	set objId to id of myObj
	set myClass to ""
	if class of myObj is calendar event then
		set objName to subject of myObj
		set myClass to "calendar"
	else if class of myObj is incoming message then
		set objName to subject of myObj
	else if class of myObj is outgoing message then
		set objName to subject of myObj
	else if class of myObj is task then
		set objName to name of myObj
		set myClass to "task"
	else if class of myObj is note then
		set objName to name of myObj
		set myClass to "note"
	end if
end tell

if objId is not missing value and objId is not equal to "" then
	if myClass is not missing value and myClass is not equal to "" then
		return "[" & objName & "](outlook://" & myClass & "/" & objId & ")"
		return "[" & objName & "](outlook://" & objId & ")"
	end if
end if

DRAFT Open item script for Outlook

set myObj to "$0"
set AppleScript's text item delimiters to "/"
set n to count of text item of myObj
if n is equal to 3 then
	set myClass to "message"
	set myId to text item 3 of myObj
else if n is equal to 4 then
	set myClass to text item 3 of myObj
	set myId to text item 4 of myObj
end if
tell application "Microsoft Outlook"
		if myClass is equal to "message" then
			open message id myId
		else if myClass is equal to "calendar" then
			open calendar event id myId
		else if myClass is equal to "note" then
			open note id myId
		else if myClass is equal to "task" then
			open task id myId
		end if
	end try
end tell

There’s no code for contacts, however, because it does not seem to be possible to open Outlook contacts by ID.

1 Like

Thanks! So where do I put them?

I found it. Wow!!!

That works great, I can now link all my assets for one meeting together in one place.

This is a game changer, thanks for that!

One thing I have though: It may be an impossible thing to ask, so it’s worth asking anyway.

As I’ve mentioned above, I’m archiving my mails in DevonThink. The way I do that is to move them automatically through a locally running IMAP server.

So, a Mail in Outlook becomes a copy (file copy) of that mail in DevonThink.

Now, with hook, if I “hook” to a mail in Outlook, that link gets of course lost when I move the mail over to DevonThink.

I would like to keep it.

Only Hook knows about the metadata of those assets. Only Hook could potentially solve it.

If not, no big deal as because of the well working automation of the integration between outlook and devonthink, I’m moving the mails over anyway pretty regularly.

By the way, how does Hook clean up? Are the things that no longer exist at some point cleaned up?

Thanks again for your great help!


I haven’t looked into this particular DEVONthink case in detail, but I agree it would be helpful to provide a mapping between different copies of the “same” item (and we have some general internal tickets on that kind of thing). There are different ways one could do this , the first two perhaps currently:

  1. If DEVONthink’s (or EagleFiler’s) import automation is open, then when importing a particular email message, one could get the email’s RFC-compliant ID, and then create bookmarks in Hook, using Hook’s automation, and link the new DEVONthink item and email together again using Hook’s automation.
  2. It may be possible to modify Hook’s get address DEVONthink script to try to create a link in the process. That would require that DEVONthink expose an API to get the RFC-compliant email message ID; I haven’t looked to see DEVONthink for that. And I haven’t run this by our Hook DEVONthink developer however.
  3. A more general solution could be incorporated in Hook that would work across applications.

Sorry the above is not very precise. The big idea is that your request points to a more general need.

I’m not using the import automation from DT as far as “pulling data from a mail application” is concerned. That one is a very manual process. I’m pushing the mails into the inbox directory from where DT is going to pick it up.


  1. Outlook is used to pull the mail off the Exchange Server and push it into a local IMAP server.

If the mail was “hooked”, I’d expect to that status not to change at this point.

Internally, the IMAP server will store that mail as a .eml file format, with a mostly random filename, into the file system.

  1. As a file system copy operation (cp), that file will be copied into Devon Think’s global Inbox folder

In the process of that, the file name is changed to a variation of the Subject: header of the mail. Variation, as some mail subjects have characters that won’t work in a file system, and also, some Subject Fields have UTF-8 encoded parts. Those are decoded. Finally if in the target folder, a file with the same name already exists, then a “.” is added to the end of the file name until we have a unique file name…

Basically, you can’t go by Subject header. That one will vary.

  1. DevonThink suddenly sees a wild mail appearing, and imports it.

I think that’s a hard one to solve. A hash over a part of the email that won’t change (essentially all headers except subject are candidates) may be a way.

One thing, unrelated, that I keep thinking: It would be great to have a Finder extension (similar to Dropbox) where you can see immediately that some “Hook” exists. At least, a tag that we could set automatically. I often hook things together now, but I keep just pushing the hotkey to see if there’s some hook behind.

A Finder extension has been on the internal todo list for a while for Hook. We’re working on some major enhancements of Hook window first.

Meanwhile, there is the option to add a Hook Finder tag to any file that gets hooked to another. It’s currently configured in Hook’s General preferences tab. Hook does not yet sync these tags, so if you remove the last hook, the tag remains. Another thing we need to do. (It’s possible for devs to do it with Hook’s automation.