The DEVONthink Get Item method in Shortcuts returns an error when tied to the share sheet. The get item method on other apps behaves as expected. The DEVONthink Get Item method works if it is getting it from the clipboard. Shouldn’t have to copy the item first before running this method. It should work fine with the share sheet. I’m running iOS 15.01 on an iPhone 13 pro max. Does anyone have any idea why this is giving an error instead of getting the item?
Could you please share a screenshot of your Shortcut? The
Get Item action takes a UUID and provides you with the DEVONthink item for that UUID. And: what do you select when you activate the shortcut?
And from which application do you call that shortcut, what kind of object is selected?
I select an item in DTTG. I’m trying to create a markdown link to the item that I can paste in Obsidian.
I think what is happening is that the share sheet is pulling the linked item UUID as well as the http link. This is what I get when I do a Quick View of the share sheet:
Yep. That was the issue. The Share sheet was sending a list of 2 items and I only needed the first item on the list. Of course that item had the name of the Linked item along with the UUID so I had to split it on new line to grab just the UUID. I don’t know why the share sheet is grabbing the UUID along with the YouTube link in the bookmarked item. Maybe DDTG developers can take a closer look at this behavior since it is not an issue in other apps. Here is the working script:
Ah, great that you were able to figure this out. So you are activating this shortcut with a document in DEVONthink To Go selected?
Yes. And then creating a markdown link that opens the DTTG file. The link is then manually copied into whichever Obsidian note I want to put it and now my note can reference the original source through DTTG.
Now, if only Obsidian would release an API to allow Shortcut functions. When this happens, I’ll be able to fully automate the process.
The problem is that when you share a document from DEVONthink To Go, all apps expect something different. That’s why DEVONthink To Go puts both the title AND the item link into the text property when it opens the share menu.