Create file in DEVONthink using Shortcuts app

Hi, I’m trying to automate the creation of a file in Devonthink using “Shortcuts” app in ios.
My problem is that in the actions proposed for devonthink you can’t put a variable for the file.
Devonthink support was unable to resolve the bug.
Does anyone have a shortcut already made with an action to create a file (with a variable) in Devonthink that I can modify for my personal use?

Thank you for your help.

Welcome @teknopol

What kind of file are you trying to make?

Hi @BLUEFROG
I am just trying to save a PDF file from previous action.
When creating the shortcut, i can’t specify a variable for the file in Devonthink “Create File” action.

The support team told me that there is bug with ios version.

Maybe someone in the community has already made this kind of shortcut using an older version of IOS. I would just like to duplicate the shortcut so that it works for me since I don’t have other solutions.

Try this:

  • use Choose and choose any file from the files dialog
  • touch the new file name and select Ask Each Time
  • long press the new File variable and let go of finger
  • that should give you the option to Select Magic Variable

Super finicky and was driving me nuts…

2 Likes

Thanks for the diligence and instruction on this. It is indeed fiddly.

Much appreciated (and I’m sure by more than me) :slight_smile:

Have you successfully tried this?
In what kind of shortcut?

@dvrooman
It works!!!
You are a genius.
Thank you so much.

1 Like

Thanks @BLUEFROG!

I have tried it. I have a shortcut that’s taking share sheet images and placing them in a specific group in DTTG. It uses Repeat with each item in shortcut input.

As an aside, I kept getting permissions errors with Photos. Eventually I figured out that if I put a “Photos get the latest photo” action (that I don’t actually use the results of) in, the shortcut will prompt for permissions once and then run correctly going forward.

@teknopol
You’re welcome! I’m glad someone else can benefit from the screaming and hair pulling that went into figuring that out :crazy_face:

As an aside, I kept getting permissions errors with Photos. Eventually I figured out that if I put a “Photos get the latest photo” action (that I don’t actually use the results of) in, the shortcut will prompt for permissions once and then run correctly going forward.

Will it prompt for permissions on each run?

I actually added a Convert Image action to alleviate the permmissions error you mentioned.

Oh, and if you don’t want the photos app to be the shortcut icon while it’s running, make sure the photos action is inside the repeat. It appears that any application action before the loop will hijack the shortcut name and icon

All these years later and Shortcuts still feels like a beta product in many ways… sigh :confused:

1 Like

It didn’t prompt me after the first time.

Good to know about concert image. I guess the only problem with that would be if you want to keep the native format and you’re importing multiple file types…

Omg, couldn’t agree more. It makes more sense to me than AppleScript ever did, but still so janky.

1 Like

Actually, maybe it prompts once in each App? Haven’t tried this extensively…

Noted.

I thank you so much for this - saved (the rest of) my afternoon!

1 Like