When the workflow trigger event occurs the trigger checks that any required conditions are met, and if met the "clean-messages" action removes all set messages.
If adding the JSON trigger using workflow builder there is no need to include the opening "triggers": JSON markup notation, it is added automatically by workflow builder.
Tip
A message can be set using the "set-message" trigger action.