Automator service not showing in services menu

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?


Solution 1:

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

Solution 2:

So, apparently, I had to disable rootless system integrity protection just to move the workflow file between folders. I still hope someone finds a better way of installing services in the mail app in El Capitan, because having to do multiple reboots and disabling low level security features seems excessive when I'm just trying to pull data from two basic apps.

http://osxdaily.com/2015/10/05/disable-rootless-system-integrity-protection-mac-os-x/

Solution 3:

I stumbled upon this very problem recently, on MacOS 10.11 El Capitan and MacOS 10.14 Mojave.

I created a service in Automator, it automatically saved it in ~/Library/Services/ but didn't appear in services menu as I expected.

The issue seems to be related to the file name of the workflow file (perhaps spaces in file name). In my experience, it should be enough to rename the file to solve the problem.

To do so, go to ~/Library/Services/ (from Finder menu: Go > Go to folder and paste ~/Library/Services/ there) and rename the service file, removing spaces from file name.

Then you may need to go to Keyboard pane in Mac Preferences, and enable your service in the shortcut tab (look in the "Services" section).

Solution 4:

The renaming didn't help, and the "no input" as well. However the any application did the trick for me. I was sending the service strictly to Final Cut Pro, and for whatever reason it simply would not show up in the services menu. Changing it for any application solved the issue. The only problem is now the service is showing up everywhere, which is annoying. But it does't hurt, providing there is no shortcut conflict.

Edit: I change it back to FCP and boom, everything working fine. I guess it had an internal conflict with the path to the app or something.