Automator: combine images as PDF with useful file name
But I would like the name of the PDF to be based on the name of the first (or any) of the images.

Note that the following was tested and works for me as shown, under macOS Catalina, to have the created PDF document named for the name of the first file in the sorted files list.
With the Automator Quick Action set to Workflow receives current [folders] in [Finder], the following actions achieve the goal.

Get Folder Contents

[] Repeat for each subfolder found


Sort Finder Items

by [name] in [ascending] order


Set Value of Variable

Variable: sortedFiles


Run AppleScript
  on run {input, parameters}
      tell application &quot;Finder&quot; to ¬
          return displayed name of ¬
              first item of input
  end run


Set Value of Variable

Variable: fileName


Get Value of Variable

Variable: sortedFiles
Options
[√] Ignore this action's input


New PDF from Images

Save output to: [2020_Projects]
Output File Name: New PDF from Images Output


Rename Finder Items: Name Single File

[Name Single Item]
Name: [Basename only] to [fileName]

Note: Drag and drop the fileName variable to the to field.




Reveal Finder Items