Apple Mail Rule Updater

Apple Mail has the best Rules function compared to 3rd Party apps, but updating them is cumbersome.

I have created the Applescript below that makes it easy to update Rules by adding one of the following parameters based on the selected Mail message(s)

  • Email address
  • Domain name
  • Subject keyword
  • Message content keyword

In this example, I received a Twitter email regarding a post by Federico Viticci.

I selected the message and invoked my Email Conflict Palette and chose option 7

Email Conflict Pallete

I am then prompted to select the Rule to update and the Rule type to use. In this example I ran each option, using “Gruber” as the keyword.

Note the Rule needs to exist first; you can create it using a dummy rule to get started.

Select Rule

Select Rule Type

Here is the Rule after processing the email message. ZZZZ was the dummy entry.

I find that I can process most of my Mail automatically with the use of Rules and this update routine makes the maintenance of the Rules system so much easier.

I hope you find this approach of use; any questions give me a shout.

Iain

1 Like

great script, super helpful. thx, much appreciated

Thanks.

I have updated the code to give a Recipient option when appending the Rule.

script which keeps on giving.
updated.

thx again

here is one that you might find useful for your mail automations.
Extracts Data from selected email, creates named sub-mailbox, creates new contact and creates mail rule to move future email to said sub-mailbox.

Great script. I couldn’t get the Contact component working, I think this is a Ventura beta issue, other Contacts scripts I have are also having issues.

I borrowed your new Mail rule process and added it to my script, makes a nice addition.

can you show me the finished product?

When I make changes I update the linked Gist on Github (above).

I use this process so I don’t have to keep loading new versions of the code. Unfortunately the displayed link in Discourse doesn’t recognise the change.

Hope it helps.