I have a very simple automator action consisting on a shell script that should be executed in a selected folder in the finder. When I execute the action I get the message:

The action "Run Shell Script" encountered an error.

Obviously this is too generic. Is there an easy way to see a more precise error message that give me a clue of what the problem is about ?

3 Answers 3


Enable the Automator Log

Automator's Log panel should display more detailed error information. You can show it by clicking the Log item in the View menu (or pressing ⌥⌘L).

Log Panel

  • 8
    but I am not executing the action in the Automator editor with the 'Run' button, but directly in the Finder. There is no way to see the error if the action is executed in the Finder ?, otherwise how can I execute it in the automator editor if the action takes a parameter a selected folder ?
    – Sergio
    Oct 30, 2012 at 22:17
  • 2
    Yes, you can run it in the Automator editor and the "Selected Finder Items" action just uses whatever is selected in the frontmost Finder window, even if that's not the active window.
    – robmathers
    Oct 30, 2012 at 22:34
  • At 2016-01-07 on MacOSX 10.10 using this method for testing scripts that rely on "Selected Folder Items" does not work on my device. Jan 6, 2016 at 20:04
  • 3
    You can fake having items selected in Finder by introducing Get Specified Finder Items as the first step of your workflow. Pick a few sample items and push Run.
    – duozmo
    Jan 13, 2016 at 23:04

If you need to debug workflow outside of Automator.app, then syslog command can be used.

Say you made Quick Action workflow with Run Shell Script action like below:

for f in "$@"
    syslog -s -l i "Touching file: $f"
    touch "$f"

"Quick Action" workflow

Now you can use Quick Action in Finder:

Running "Quick Action"

Output of syslog command can be viewed in Console.app:

Output of Syslog command

Another way to view output of syslog command – is to use log command in Terminal.app.

log stream --info --debug --predicate 'process == "syslog"'

log command in Terminal.app


We can improve Quick Action shown above by sending local notification on successful completion:

for f in "$@"
    syslog -s -l i "Touching file: $f"
    touch "$f" || exit 1 # Early exit on failure.
    osascript -e "display notification \"Touched file: $f \" with title \"Automation\""

Local notification

  • notification adds a really nice touch! thank you.
    – Vibin
    Jun 25, 2020 at 10:23

If you're willing to use JavaScript via the Run JavaScript action rather than shell scripting, you can get pretty great step-through debugging features that web devs nowadays are used to, i.e. the Web browser Inspect panel (in this case Safari's). Setup guide available in Apple's docs on debugging Automator JS.

Setup is simple and as of this comment is verified working on Big Sur.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .