[Resolved] Output type based on input type?

I am trying to make a couple of shortcuts that work together to get some conference videos depending on how they are selected:

  1. Input from URL
  2. Input of text (session code)

#1 takes the URL, determines the session code, and then passes it to #2.

#2 Accepts text. If it is empty, it requests input for the text. Then it queries the REST endpoint from the conference to get metadata related to the session, including the various video formats, description, title, etc. Then it downloads the video and opens it in Files for me to save it where I can watch it in my preferred video player.

I had this working as one shortcut that accepted a URL, but I figured that i would prefer this new method as I could be on my PC, see a session, then I could just hop over and enter the session code, or I could see a reference on a discussion to a session code and enter it.

Since I have modified it, it wants to save the file as a .TXT file inside of files even though the contents are an MP4. Any thoughts on that?

EDIT: Nevermind… I was testing the filename renaming process and my magic variable used to open in Files was pulling the name value rather than the file. The filename from download has very little context, so I wanted to name it - .mp4… It was _x.mp4.

On a side note, I would love to be able to choose the folder within the Shortcut rather than be prompted and also choose whether to overwrite an existing file… and then just save it rather than asking.

If you disable Ask Where to Save, you should be able to do exactly that, as long as you are saving within Shortcuts’ folder on iCloud or In Dropbox. Anything else is limited by sandboxing.