the only way I know to run an application automatically on shut down is by using logout hooks. save the workflow as an application and then add a logout hook to run this application. see this link on how to make logout hooks
http://www.bombich.com/mactips/loginhooks.html
I'm not too sure though how well this will work tough because I don't know at what point in the logout process the hook is executed. also, it might cancel the logout.
there is also the following workaround but it requires keeping a certain application open all the time.
again, save the workflow as an application.
then paste the following apple script into Script Editor
<pre style="
font-family: Monaco, 'Courier New', Courier, monospace;
font-size: 10px;
margin: 0px;
padding: 5px;
border: 1px solid #000000;
width: 720px;
color: #000000;
background-color: #ADD8E6;
overflow: auto;"
title="this text can be pasted into the Script Editor">
on quit
tell application "Main HD:Applications:Safari.app" to launch
-- desired actions here
continue quit
end quit</pre>
the example above works with safari. put the path to your own application there. also put the name of your hard drive instead of Main HD in the above.
save the script as an application and check the box "stay open". add the resulting application to your login items.