Airmail to DevonThink Workflow - URL location not working

Hey all,

my DevonThink folder workflow to get Airmail messages as PDF into DevonThink works fine so far, but unfortunately the URL in the DevonThink item’s metadata is just ‘airmail://message?mail’ instead of a correct URL to airmail like ‘airmail://message?mail=mailaddress&messageid=messageid

Has anybody an idea how to resolve?

The workflow is based on the Create Document workflow from Federico Viticci:
DEVONthink’s New Advanced Automation

As I wanted to be able to choose the designated DevonThink folder, I expanded it with the possibility to get the folder ID from a dictionary saved in a plain-text JSON file as described by Tim Nahumck here in his blog post Using Simple Dictionaries in Workflow

As I don’t like the plain text format when an Airmail message is saved in DevonThink, I first create a PDF in Airmail. Below informations are given from Airmail to Workflow:
‘Title, Link to message, PDF’. As separator I choose ‘||’.
If the Input equals ‘Text’ and contains ‘||’ I assume it is sent from Airmail and it is processed as such.

Although the PDF is rendered and attached fine to DevonThink, the URL to the original Airmail message doesn’t work… Unfortunately the workflow is a little slow, but I thought to tackle this problem as soon as the link problem is solved :slight_smile:

Any help is well appreciated.


As detected an Airmail mail link has the following format:

Is it possible, that the equal sign after mail is the problem? As I suspect the x-callback notation gets a problem because a new assignment is expected.

A sample x-callback looks like this:


Is there any possibility to escape the equal sign in order to prevent the unwanted behaviour?

Hi Schmudi, I did it with airmail. Please find a example script at Maybe this will help you to modify yours.

Best regards Klaus