Email capture: OmniFocus 2 PRO with outlook 2016

Considering this thread is somewhat old… i must be the silly one and couldn’t follow simple instructions … ;(

@svendah - are you able to re:post Sven Fechners Alfred-workflow as its probably preferrable. His link no longer works on his site with quite a few people asking the same?

@mygeekdaddy - the apple script seems from Veritrope site [it still refers to Outlook 2011 - not too sure if it’s the same for 2016 version] is updated as you’ve mentioned, however i was unable to find. "~/Library/Application Support/Microsoft/Office/Outlook Script Menu Items " - the folder doesn’t exist on my file directory under my users. Googling said that Outloook216 script was removed. Tried to put the script into Automator but my newbie-ness again failed as it failed with ‘Growl’ error line even though the script clearly points to no.

  • are you able to post the script here and any advice on steps please?

Veritrope has updated his version at the link now. Thanks Veritrope.

I just got this script working. Not sure where it went wrong but I had to comment out all of the quotes within the quoted variables. Mostly this was in the growl codebase (seems like it should be ripped out at this point…)

Anyway, I also rebuilt the Alfred workflow since Sven’s seems to have been pulled down.

You can get them both here.

1 Like

Thank you for creating the script and workflow. I had a terrible time trying to find a working script that imported Outlook mail to OmniFocus; your work did the job.

I’ve posted links to here from several places, including a top-level thread on this forum, for the benefit of future seekers.

There is a bug in outlook 16.x that occurs when the Reminders window is open, the selectedItems property always returns 0.


This is working with Outlook version 16.16
Make sure you have Omnifocus Pro
Download Alfred
Purchase the power pack
Add a “Keyword to AppleScript” workflow
Set your keyword then on the AppleScript copy and paste the script below the ######

I’m also using an Outlook URL Handler so it will paste the message ID in the notes of the task. If you want this feature download this
Put this in your applications folder and right click and choose open. This will give it authorization to work when you fire the workflow.

finally, select a message and trigger your workflow.

If you don’t want to use the URL handler then just remove “outlook:// & toOpen &” from the script

    on alfred_script(q)
  # Set due date to tomorrow by default
#set dueDate to (current date) + (1 * days)
tell application "Microsoft Outlook"
	# Will create tasks of all selected emails
	set currentMessages to current messages
	repeat with email in currentMessages
		# subject = task name, contents = task note, sender = context
		set subjectOfMail to subject of email
		set contentsOfMail to plain text content of email
		set fromSender to sender of email
		set senderOfMail to name of fromSender
		set toOpen to id of email
		tell application "OmniFocus"
			tell the default document
				set newTask to make new inbox task with properties {name:subjectOfMail, note:"outlook://" & toOpen & return & return & contentsOfMail}
				#set contextsList to (flattened contexts where name is senderOfMail)
				#if length of contextsList > 0 then
				#set context of newTask to first item of contextsList
				#set context of newTask to make new context with properties {name:senderOfMail}
				#end if
			end tell
		end tell
	end repeat
end tell
end alfred_script

So awesome, thanks for sharing! It’d be even more awesome if there was a way to make the message link work on iOS. ;-)