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
DEVONmenu

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.

Thomas

As detected an Airmail mail link has the following format:
airmail://message?mail=messageid

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:

x-devonthink://x-callback-url/createdocument?title=DevonThink%20folder%20&uti=com.adobe.pdf&comment=&destination=E94D7121-A362-48A8-A29E-09D9CDB381AE&location=airmail://message?mail=alex%2540muster.com&messageid=etPan.5b71950e.2ae8924a.49e%2540muster.com&source=JVBERi0xLjMKJcTl8uXrp…

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 https://yourproductivitytips.wordpress.com/2018/10/04/getting-paperless-in-sales-part-one/. Maybe this will help you to modify yours.

Best regards Klaus