Automator, Show/Hide hidden file
Your if statement test,[ ... ], is not properly formed, change:

if [ defaults read com.apple.finder AppleShowAllFiles = "FALSE" ]


To:

if [ "$(defaults read com.apple.finder AppleShowAllFiles)" = "FALSE" ]