For anyone else looking, this will only remove the trailing ; if it is there.
if(equals(last(triggerBody()['email']), ';'), substring(triggerBody()['email'], 0, add(length(triggerBody()['email']), -1)), triggerBody()['email'])
Replace the text in blue with your input.