AppleScript (or TextExpander snippet) for getting a message URL in Airmail

This is one of @MacSparky’s well-known and loved tricks on Apple Mail, I replicated it with Airmail. Airmail does expose its messages URLs via a simple command, but I find inserting the URL of the selected message via TextExpander more convenient. This AppleScript snippet will return the URL of whatever message you have currently selected in the app (and it can be tied to a TextExpander abbreviation).

tell application "Airmail"
	return selectedMessageUrl
end tell
1 Like

Sorry for replying to and old post, but thank you! I’ve been using Spark lately after getting tired of Apple Mail (again). Rosemary intrigued me on one of the latest episodes of Nested Folders where she talked about the spam bounce action in Airmail. One big blocker for me is I love when I grab a URL to a spark email it shows me the whole thread when I open that URL later, not just the single email. Is this possible in Airmail?

My use case is putting an email link in OmniFocus because I like keeping my to-dos in one place, but it doesn’t help me to pull up only original email. Ideally I need to see the whole thread in case anyone responded. This is one of the many reasons I wasn’t getting much use out of links either.

1 Like

I have not dug deeper into Airmail’s Apple Script support, sorry. :slightly_smiling_face:


I didn’t remember that Airmail supported applescript… now Im intrigued again…

1 Like

Airmail’s limited AppleScript support isn’t deep or robust from my experience.

1 Like

That must be why I did not remember it. :grinning:

Quite likely the case