Office 365 Direct Email - Possible Solution

I have inquired previously about the possibility of creating a Hook to a specific Office 365 email using Outlook Web Access.

I found this answer to how to create the required URL. “Solution 1” works well.

Is it possible to use this information to write a Script so that this URL can be utilized by Hook?

1 Like

Thank you, @rkaplan. I had a quick look and this seems doable and would be worthwhile! (I haven’t discussed it with the dev team yet, but I’ve updated the ticket accordingly.)

1 Like

That would be awesome. I moved to Outlook when my firm’s case management system released an Outlook add-in. Right now, I’m doing the song and dance in the link in the post from @rkaplan. Would be awesome if I could use Hook instead.

@Evan

I still hope this can be added to Hook - that would be the easiest solution

But in the interim I figured out a workaround using Keyboard Maestro instead of Zapier:

1 Like

@rkaplan Thanks for sharing this! I’m going to check it out first thing when I get to the office this morning.

Thank you so much for sharing this, @rkaplan. I had to tweak it somewhat – for some reason my Office 365 links looked a little different than yours – but I have it working. I couldn’t get it working for items in a user-created folder, as the link included some symbols inserted in the middle of it, and my regex isn’t strong enough to figure out how to remove them. But I just act on items in my archive, inbox, and sent items anyway. Thanks again.

Excellent - glad to hear that helped

1 Like

a dev here proposed this, should anyone want to try this version:

tell application "Safari"
        set d to first item of documents
        set u to URL of d
        if u contains "https://outlook.office.com/mail/inbox/id/" then
                set AppleScript's text item delimiters to "https://outlook.office.com/mail/inbox/id/"
                set messageID to text item 2 of u
                return "https://outlook.office.com/owa/?ItemID=" & messageID & "&viewmodel=ReadMessageItem&path=&exvsurl=1"

        end if
        return u

end tell

if it works we can adapt it to other browsers.

Thanks @LucB

That works fine to get the URL in Safari - is there a way for the title of the Hook to be set to the title of the email?