How do I validate data in Automator? I'm making an app in Automator to quickly delete my iMovie Library (to save space). However, I want my app to check if the iMovie Library has already been deleted and show a dialog saying so. I know how to make the dialog, but I can't figure out how to do it. How do I do this? I'm using macOS 10.11.

My workflow:


Ask for confirmation
Get specified Finder items (the validation would go after this)
Move Finder items to trash 
Run AppleScript (to show a dialog saying "Done")
You can use a Run AppleScript action to perform validation. Between actions 2 and 3 in your workflow, add a Run AppleScript action with the following:

on run {input, parameters}
    if input is {} then
        display notification "File already deleted"
        tell me to quit
    end if
    return input
end run


This checks if the input is empty (because the file can't be found), and if so, runs your desired code — you can customise display notification as you please, such as showing an alert. The use of tell me to quit if the input is empty will stop the workflow at this point.