Help with copy item link as markdown link in DTTG


I have moved some of my work to the iPad. I use item links to reference PDF pages that I find important during my research. I would like to be able to paste an item link in a markdown file in the following format [name of file in devonthink](devonthink url). Has anyone figured out a way to automate this?

I looked at workflow app, but I am not sure where to start with it.

Thanks for the help DEVON community.

1 Like

How you do this depends on the Markdown editor that you are using - for example if you are using an editor like Editorial or 1Writer you could construct an action in both that would select the DevonThink item link and then return to the editor and process the item link further. In Workflow you would need to string a number of workflows together. If I was doing this in Workflow I would construct the first workflow to get the DevonThink item link of the currently selected document in DTTG. The URL would look something like this:


The GetJSON component triggers the next workflow that would query DTTG for the returned item link and then return some JSON data to the third workflow. (JSON is a series of keys and data e.g. “name” : “Name of item”)

The third workflow scrapes the JSON data to return the name of the document and DevonThink item link and then formats them into a Markdown link and copies this to the clipboard. The following links are the workflows that I have described to give you a better idea

  1. First workflow
  2. Second workflow triggered by first
  3. Third workflow triggered by second

Thank you Kseggleton! Very helpful response. :smiley: