Pass Filename on to Mail Subject

A newbie question but, how do you pass the filename of a file added to a folder to a email Subject.

Cheers, Adam.

Don't know if this is exactly what you want, but here's a start:

Start Mail Message with Selected Filename in Subject.kmmacros (4.8 KB)

Thanks Dan, really appreciate your time with this. I’ll test it out.
Cheers, Adam.

Glad to help. Let me know if you need more help.

Not necessarily better than the method @DanThomas showed, but definitely more rudimentary… I have PDF invoices which are created. Hazel*** watches the folder where they are created, then selects them in the Finder. At that point everything is passed over to Keyboard Maestro. A Copy command is issued on the file, an email is created, and a Paste command is issued twice, once in the Subject field and once in the body of the email.

The reason a Paste command is executed in the Subject field is because in Apple Mail, doing so there inserts the file name. Point being, I don’t think many people know that pasting a file in the Subject field just inserts the name. You’ll figure out whether or not that helps here.

***Hazel: Today only, the software is 50% off. It’s a great piece of software which is a wonderful automation complement to Keyboard Maestro. If anyone has considered buying it, today is a good day for that.

Hi Dan, sorry to be a pain, I am using a folder trigger that runs when a
new file is added but I get this message. I obviously need to select the
file somehow. Cheers, Adam.

That’s OK, you’re not a pain. Check out the Wiki.