-
-
Save fclad/25e7890ab110bc2f90dec7cf58b281b0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Based on Chris Russell's 2017 Medium post (https://medium.com/@chris.russell/integrating-things-3-with-microsoft-outlook-on-mac-63a9ba43abc3) | |
| -- and related GitHub gist (https://gist.github.com/crsrusl/67eee8497dd296879fe1a832b3205f0a). | |
| -- | |
| -- IMPORTANT | |
| -- As of Microsoft Outlook for Mac version 16.105.2, this script only works when using the "Legacy Outlook" variant. | |
| -- AppleScript support in New Outlook for Mac is tracked with roadmap ID 88537 | |
| -- (see https://www.microsoft.com/en-us/microsoft-365/roadmap?id=88537) | |
| -- | |
| tell application "Microsoft Outlook" | |
| -- Stop if no message is selected | |
| if selection is missing value then | |
| return | |
| end if | |
| -- Retrieve the selected message | |
| set theMessage to selection | |
| -- Get message attributes | |
| set theID to the id of theMessage | |
| set theSubject to the subject of theMessage | |
| set theSender to sender of theMessage | |
| -- Get sender name or email address | |
| try | |
| set theSenderName to name of theSender | |
| on error | |
| set theSenderName to address of theSender | |
| end try | |
| -- Add a link to this message in todoNotes | |
| set todoNotes to "[✉️ " & theSenderName & ": \"" & theSubject & "](ms-outlook://message/" & theID & ")" & linefeed | |
| end tell | |
| -- Open a Things3 Quick Entry pre-filled with todoName and todoNotes | |
| tell application "Things3" | |
| show quick entry panel with properties {name:theSubject, notes:todoNotes, tag names:"Outlook ✉️"} | |
| end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment