Automator workflow only works when clicking "step"
The behaviour you describe suggests a timing issue. One or more steps are not completing before the next step begins.

Consider combining all the steps into a single AppleScript. You can use the do shell script command in AppleScript to call out to shasum:

-- Get value to hash from clipboard
set myValue to the clipboard

-- Build the command to execute
set hashCommand to "echo -n " &amp; quoted form of (myValue) &amp; " | shasum -a 256"

-- Debug check the command; comment out when it looks good
display dialog hashCommand

-- Execute command and place on clipboard
set myHash to do shell script hashCommand
set the clipboard to myHash


The clipboard is accessible by AppleScript:

display dialog (the clipboard)


As a single AppleScript, you can debug using Applications > Utilities > Script Editor and gain much better insight into what is happening as the script runs.