Automator: "Run Shell Script" throws error because of missing "on" command
on run {input, parameters} is AppleScript syntax, not a valid shell command. If you want to execute AppleScript in the service, use the Run AppleScript action instead of Run Shell Script.