No UUID passed on to Shortcuts?

The URL commands, among which x-callback can be found in DTTG3 under

  • Question mark (global info)
  • Help
  • Appendix
  • URL Commands

As far as I can tell the getitemlink command does not allow for parameters such as page numbers, but I only browsed the documentation quickly to check for it.

———-
Follow-up of previous comments:

I’ve tried the shortcut from the sharesheet on a newer device and can confirm it works flawlessly as @sven.luetkemeier mentioned earlier. As I expected this behavior appears to be device dependend (whether it’s memory I don’t know), but as said I can work around on an iPad by using split screen.

The link returned by get-itemlink already includes the page number, unless the first page of a pdf is displayed:

3 Likes

So it does! Thank you!

Building on Sven’s example above that fetches the currently open item details, here I extract the URL and UUID which I use to fetch the document object from DTTG.

1 Like

I’ve regexed it out. But this also works of course.

I’m still hoping DT brings back the UUID, as I seem to get this to work only with split screen, depending on the age of a device. On older devices Shortcut somehow stalls if I use the share sheet to perform the callback.

2 Likes

Sorry to restart this older thread but…
Would I be correct in assuming that because of th issues outlined above, that it is not possible to use iOS shortcuts to make a list of transclusion links from an input selection or group of Markdown files?
i.e.

  • in DTTG - select group or multiple files
  • share to Shortcut
  • Shortcut gets link for each file
  • appends links to a text file and formats them for transclusion
  • copies text file to a new DTTG file

I am guessing that’s not possible.

tx

That wasn’t possible with the share sheet either as it shared just one link at a time. But you could just select files one by one and write their details to some text file I guess.

Did you manage to setup the shortcut mentioned above with the x-callback?

I did. I changed it to use the transclusion format link and that was great but it would take too long to do a whole group of notes. I did find a script for DT that does exactly what I needed so when I have to I can jump to the laptop and bang out a transclusion of a bunch of files.

What’s the current state of this? I’ve installed and successfully run the Shortcut that @sven.luetkemeier posted, but it doesn’t quite accomplish what I want and I feel like my own tinkering isn’t making any headway on altering/debugging it.

I would like to capture text excerpts from a PDF and a link to the page where the excerpt appears - ideally in a single gesture, or at least without too much friction. I’m messing around with shortcut actions and the URL scheme and trying different methods of launching the shortcut (ie. sharing the document or sharing the text selection) with different bits on the clipboard (ie. the page link or the excerpt) but so far I can’t put the pieces together in a functional order.

1 Like

I think my use case is a bit different (and sorry to reopen an old thread…), but I have a short cut that creates a new Markdown document in DTTG by pulling some information from a Contact–and I want to grab the UUID of the newly created DTTG item so I can add it to the notes of the Contact card (basically to create a link between the contact in Contacts and the item I’ve created in DTTG.

The work around doesn’t work, because I’m creating the item in Shortcuts and there isn’t anything selected in DTTG.

I’m open to other ideas–or adding an action to get the UUID of a newly created item.

How does your shortcut look like and how do you activate it?

Currently, I am activating it from the Shortcuts app, from there I select a Contact to process.

It correctly creates the new MD item in DTTG, but then I am stuck at how to now get the UUID at which point I will have it update the selected Contact.

I’ve included a link to the Shortcut, if that is helpful.

https://www.icloud.com/shortcuts/a79319f069e94f12990711463d1889d4

You just need to add the created item and use the item link.

Note the item link will not be an active hyperlink.

1 Like

Oh wow–I must have been much more tired than I thought–I could not find that…

Thank you.

No problem :slight_smile: