My Automator Workflow fails because it fails to find the git command within the 'Run Shell Script' command? Need help
Scripts run via Automator use the default search path which usually does not include /usr/local/bin. In your case an easy fix would be to put

export PATH=/usr/local/bin:$PATH


somewhere at the beginning of the script.