Automator Get Filename of Selected File
Use a Run Shell Script action. 

Select the /bin/sh shell and select pass input as argument

Add the code 

for f in "$@"
do
    rm -rf "$f"
done


I would also suggestion using a Ask for confirmation action before running the script. You know for safety, since rm has no way back.