How to let user specify name of new screenshot using Automator

automator

I'm trying to understand how to use 'Folder Actions' and/or Automator so that when I take a screenshot, it allows me to type in a name for the file as it stores it in the screenshot folder (which I've changed from the Desktop to a folder named 'screenshots' on the Desktop). When I Ctrl-click the Folder and choose Folder Action Setup, it gives me a list of scripts, none of which do what I want, so I assume I have to write this script in Automator?

Using Automator, I start with the "Files and Folders" –> Get Selected Finder Items as my first step. Then I tried "Files and Folders" –> Rename Finder Items, but this seems to be only about adding a date to the existing name.

I see I can use Automator -> "Ask for Text' to display a dialog to the user, but then how do I use that input to rename the file?

Best Answer

After much hunting, I found Get Selected Finder Items and then Rename Finder Items: Name Single Item. One nuance is that renaming the file ends up recursively calling the script, because the file with the different name is perceived as a new file. I got around this by having a 'staging' folder, then the ultimate destination folder, and used Mover Finder Items as the last step in my Automator sequence.