Get multiple file names and feed them into variable
I have an automator app partly containing a "Run AppleScript" section where I want to feed filenames from the input into a variable that I later use as a title for in an email generated by the workflow in the app with "New Mail Message".
Here's the apple script code:
on run {input, parameters}
tell application "Finder"
set Filenames to name of file input
end tell
end run
When i input one file everything runs smoothly, but if i input two or more i get this error message "Can't make ___ into type integer" :
I'm on 10.15.7 Catalina with a 16" MBP (2019)
MacBook Pro 16″