When the workflow trigger event occurs the trigger checks that any required conditions are met, and if met, the "change-state" action forces a change of the state.
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.
The destination state must be included for the "change-state" action.