MacOS – Automator service not showing in services menu

applescriptautomatormacosmail.appservices

I know next to nothing about the OS X, but I've been asked to make a few different scripts for actions in Apple Mail. One is to bind a hotkey that will create a reminder with a followup time of two business days.

I followed a guide on how to build the script and insert it into Automator found here. The script works when running in the AppleScript application, and compiles and runs in Automator. The service/workflow generated by Automator is saved to ~/Library/Services/ but does not show in the services menu in Apple Mail. This article says that services for Apple Mail should be in the /System/Library/Automator folder. I am unable to move the service to that folder as the folder is locked. The service is set to have no input, and be in the mail application.

How can I get this workflow/service to show in the mac mail services menu?

Best Answer

Depending on how your script is configured, by default, any Service requires to have an item selected / highlighted (in your case, an email) as they are context sensitive.
You can disable this behaviour by changing the drop down field "Service receives" and selecting "no input". This obviously only applies if your script fetches input itself or doesn't need it.

Selecting no input allows for the service to run without the need to select an item

Unfortunately there do seem to be weird issues when services have spaces and/or numbers in their name.
As stated by @gerlos, renaming them should solve the problem, but a reboot might be required (Which was the case for me).

As an extra;
If you're now finding that you don't like the name of the new service, you can change it!
Just right click the .workflow file and select 'show package contents'.
Inside you'll find a configurable info.plist file.
Open it up with your favourite text or plist editor (Or just plain old TextEdit) and look for the xml key 'NSMenuItem', it should contain a key entry 'default' associated with a string, the string in question is the service's display name.

More information on everything that's configurable (e.g. a service description) can be found in the apple documentation here: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/SysServices/Articles/properties.html

Tested on OS X High Sierra