Apple Intelligence now features Image Playground, Genmoji, Writing Tools enhancements, seamless support for ChatGPT, and visual intelligence.

Apple Intelligence has also begun language expansion with localized English support for Australia, Canada, Ireland, New Zealand, South Africa, and the U.K. Learn more >

You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

automator - folder action: add attachment name to subject line email

hello everyone:


my goal was to create a folder action that every time a file (.PDF) was added to a folder it would generate a new email with the subject line = to the file name of the added file, the file would be attached and then sent to the recipient.


i did some searching and found the following automator folder action which does create an email and attaches the file and sends BUT I do not know how to make the file name part of the subject line?? It would be different for each file added.


here is what works in automator


1. Create Folder Action

2. Set "Folder Action receives files and folders added to" client folder

3. Add Launch Application Mail

4. Add New Mail Message and fill in To:, Subject:, and Message:.

5. Add Add Attachment to Front Message

6. Add Send Outgoing Messages




Mac mini 2018 or later

Posted on May 21, 2021 7:42 AM

Reply

Similar questions

9 replies

May 24, 2021 11:44 AM in response to VikingOSX

i honestly do not know what i am doing wrong. it was working with print "${1:a:h:r:t}"

the result was that it put the entire path in the subject line with file name. which isn't correct. it should just be file name in the subject line.

i apply print "${1:a:t}"

to the in place of print "${1:a:h:r:t}" now it doesn't attach the file to the email nor does it send an email etc.

what am i doing wrong?? frustrating. when i switch it back to print "${1:a:h:r:t}" it does nothing

May 24, 2021 5:19 AM in response to VikingOSX

thank you!!


this does work but as noted it will "place the folder name in the subject field and attach the dropped files after the body text." i am currently testing with folder on my desktop and the subject line of a test email was was the folder path followed by dropped file name (.pdf) name. ex: /Users/me/Desktop/test_folder/1234567.pdf


is there anyway to have the subject line just be the dropped file name?? ignore path to folder with the result = file name

automator - folder action: add attachment name to subject line email

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.