How to create new file in the same group as selected file with Siri Shortcut?

Hi,

I have Siri (iOS) Shortcut for creating new markdown document with markdown-link to selected file. It works OK, but new file is created in predefined group, Global Inbox for instance.

How to create new document in the same group as selected file with Siri Shortcut?

First, I think that this is not possible yet, since DTTG always and invariably saves to predefined group.

Second, I’m not sure how that should work without surprises. The “selected file” is inside DTTG. An iOS Shortcut can be run from anywhere. So there might be no file selected in DTTG when you say “Hey Siri” or invoke the sharing menu or run the shortcut some other way, since DTTG is closed. In fact, I’d rather see the possibility to define the group one wants to save the file to, so that you can say “Hey Siri, create new markdown file in my favorite group for new markdown files.” (Ok, I never use Siri, so I have no idea how one talks to it).

This currently isn’t possible due to an iOS bug with URL schemes. If we can find a way around it, we will.

chrillek, some file must be selected, as I need to create new note with link to the selected file.

2021-07-29 Doc 1 was selected, and 2021-07-29 Doc 2 has been created with markdown-link to 2021-07-29 Doc 1.

These are Shortcut screenshots. Hope it is possible to understand in Russian localization.

It would be better, if one can obtain (get) parent group of selected file, and create new file in the same group.

BTW, I have Shortcut, which moves a file to desired group. It uses the following:

x-devonthink://x-callback-url/update?uuid=IndexCardUUID&destination=GroupUUID

I could use this for for moving newly created file to the same group as selected file if I could get parent group.

This is command to create new markdown note:

Actually I use this approach in Keyboard Maestro. It saves me a lot of time, as I need to connect my notes with links.

Sorry, I misread your first post. At least I understood that the first command of your shortcut is „Open“ :wink:

I think the problem is that there’s no way to find the parent group of the currently selected record in DTTG. It’s simple in DT, but since DTTG is not scriptable … tough luck.

Thank you, chrillek and BLUEFROG.

Hope for further development of iOS/iPadOS and Shortcuts.

I like idea that it would be possible to use only one set of tools for mac, iPad, and iPhone — Shortcuts.

Well, if shortcuts were more powerful – yes. As they’re now, they look more like a half-baked alternative to Automator workflows.

1 Like

Shortcuts for macOS looks like Keyboard Maestro with deeper integration. They use scripts.

I love Keyboard Maestro, but…

A Look At the New Shortcuts App For Mac - YouTube

Thanks for the link. I haven’t seen much on macOS’ Shortcuts yet.

@chrillek, I managed to find the parent group of the currently selected record in DTTG without script and without URL scheme.

This allowed me to create shortcut, which helps me link files as it necessary for Zettelkasten.

Maybe this shortcut would be helpful for someone — Note with link to selected file.

Attention: The shortcut should be run from Shortcuts.app (not from the Share menu).

This is the “key”:

It is possible to go further for “more Zettelkasten”. For instance, append markdown link from new file to currently selected via Update Content action:

Are you running this from the Share menu in DEVONthink To Go ?

Also parents may not work as expected if you’re using replicants.

From Shortcuts.app in Slide Over or Split View.

It does not work from the Share menu.

Sorry, I forgot to define it in my post.

No worries.
One friendly person tested the Share menu in iOS 15 beta and said it’s working, so we’re crossing our fingers that it will be so for the public release.

1 Like