Is it possible to create automation around the outcome of a task?

Is it possible to create automation around the outcome of a task?

I want to create a workflow task that is executed when a generated task of a certain name is closed (completed, deferred, etc.. Is it possible to do this?