buzzjackson wrote:
What am I missing?
Hard to know without looking over your shoulder, checking exactly what you've done and comparing it with the original suggestion.
That said though, I can't see how the original workflow ever created an email with attachments, as it doesn't appear to pass references to the selected pdfs to the New Mail Message action.
The following may work better. I've omitted the action that moves the selected PDFs to the Downloads folder - you could re-instate it if you wanted to.
My workflow would run like this (six steps, numbered in the screen grabs).
- Quick Action Workflow receives current PDF files in Finder.
- First action: Set Value of Variable - I set the variable name to Attachments. This stores the file references for later.
- Second action: Run AppleScript - exactly the same as in the original, this extracts the names of the attachments for the email's subject line.
- Third action: Set Value of Variable - I set the variable name to Filename. Stores the the values output from the AppleScript.
- Fourth action: Get Value of Variable. I set the variable name to Attachments. This picks up the file references for use as attachments. In the Options for this action, check Ignore this action's input. There should be no flow arrow connecting the previous Set Value... action with this Get Value... action.
- Fifth action: New Mail Message. The file references from the fourth action will be passed to the email message as attachments. In the subject line, drag in the Filename variable from the list at the bottom of the workflow.
The screen grabs hopefully illustrate this. Step 4 is duplicated to show the join:
You would need to add a Send Outgoing Messages action at the end if you wanted the email to be sent automatically.
For reference, this is the original, unedited, AppleScript (not quite how I would have done it):
on run {input, parameters}
set subjectInfo to {}
tell application "Finder"
repeat with oneFile in input
copy name of oneFile to end of subjectInfo
end repeat
end tell
set AppleScript's text item delimiters to {", "}
return text items of subjectInfo as text
end run
Cheers,
H