Can a rule use a parameter to define a variable?

I have a rule that takes a webhook with incoming parameters. Id like to have a single rule that can set variable values based on the incoming parameters. Id prefer this over having 12 rules or 12 if-then statements. I seem to only be able to manually set a preferred variable without a way to flip to something else.

for example:

I want 1 of 12 tiles to change color based on the incoming webhook. a parameter might be “room”. if “1” is the room, id like to change variable $room1text. if it was “2” that came in, id like it to use “$room2text”, and so on.

On that note can we also copy tiles and then change the variable they are assigned to? I do a lot of styling tweaks and i dont want to do the work over and over again. if i could copy a tile and then change the variable, it would be super helpful.

thanks

@irfan, you can use the context variable to access the parameters passed in through the HTTP trigger.

Then you can set the variable using this context variable as shown in below:

This is not currently supported.

— EDIT —
After reading it again, I just realized I misunderstood what you meant. :stuck_out_tongue:
You’d like to dynamically select a different variable, instead of assigning the parameter into a variable. Dynamically using different variables is not currently available though, so you may have to use the multi-if-conditions approach.

Yep I was taking about dynamically setting a actual variable not just the variable value. Thanks for clarification