I've got this working - though I only setup up coloured labels - doesn't change the name of them. But you only have to do that once, when the planner is complete.
I use excel as a source with boolean columns for each label I want to create.

I initialise boolean variables first

then create conditions looking at the columns in my excel spreadsheet for whether each of the labels conditions is true or false and setting my variable true or false accordingly
Note that you need to look for True (not true or TRUE) in order for it to check it properly but set the variables with lower case
Conditions to set variables
then finally when I create the task I use the variable
Add the task using the variables for the labels