You can't run an automator action when shutting down your mac. But you can run a script inside automator to shut down your mac.
Create a new automator workflow, and use the action "Quit application" and select the application you want quitted. Then find the script action, and insert this:
tell application "Finder"
shut down
end tell
Save it all as an application. Run that application, to shut down the application, and turn off your Mac (I haven't tested the script, since I didn't want to shut down my mac at the time of writing this, but multiple sources recommends this
)