SOLVED! Shortcuts shortcut problem with renaming file

What am I doing wrong but I cannot rename a PDF with this Siri Shortcut shortcut? I’ve included the shortcut and the error I get in the screenshots.

Without testing it (time constraints) and off the top of my head, are we sure you don’t need to supply the extension when using Set Name? It looks like there is an option in Advanced to not include it; maybe play around with that?

  1. Where are you sharing from? A PDF from a mail app, Files, a PDF reader, …
  2. Is it only happening for PDFs or other files and images too?
  3. What is the name you are setting it to?
  4. On what action is it failing?
  5. Can you share the actual custom Shortcut so others can test it?

I’m not 100% sure right now, but I’ve seen some inconsistencies when trying to name things and then share them. I’ve not yet narrowed it down to something definitive; it could yet be my own understanding.

Another thing I’ve run into is you may need to tap on the Shortcut input in Get Variable, and set it to be As File.

As a first action try to use the “Set variable” action to have the input of the shortcut referenced to a variable. This variable can then be recalled in your last set of actions.

Maybe that works…

The standard “Shortcut Input” variable is a reference to the input. For a share sheet based shortcut there ahould be no need to explicitly use a Set Variable to do this.

You might need this if you were running one shortcut from another and the second is not a share sheet enabled shortcut. The Shortcut Input variable is only available when a shortcut is enabled for use from the share sheet. As a result if a shortcut is passed input from Run Shortcut, and it isn’t share sheet enabled, Set Variable should be used so you can reference the input throughout the second ahortcut.

So I feel kinda dumb, but before trying any of these things I thought I should try the old standard of restarting my phone. It worked. Everything is working fine now. Thansk for the suggestions!!