Incoming email Trigger AppleScript

HI folks. I'm looking at running an applescript on incoming emails. I want to grab the body of the email.


Does the email get selected upon arrival (hence tripping the script in 'rules') so that the applescript can focus on its content? I'm unclear as to how the applescript knows which one to choose.


Any advice appreciated.


Cheers

Mac Pro, OS X El Capitan (10.11), Hypercard UG!

Posted on Jan 12, 2018 6:43 AM

Reply
2 replies
Sort By: 

Jan 12, 2018 10:36 AM in response to BioRich

In Mail Preferences : Rules, you create a set of unique rules that evaluate to true, and then you set the Perform the following Actions selection to Run AppleScript. By default, this is expecting the particular AppleScript to be placed in the ~/Library/Application Scripts/com.apple.mail folder, so you can select it.


Use rules to manage your email inbox in Mail on Mac - Apple Support

Adding scripts to Apple Mail Rules

Processing incoming messages in Applescript via mail rule in Mavericks

MacScripter / Running an AppleScript during Rule processing for Mail

Reply

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Incoming email Trigger AppleScript

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