Rule Machine, End Point, and Local Variables - Stuck on using the variable part

I'm stuck....
I created an endpoint in rule machine and modified the url to include a variable, like this http://192.168.109.178/apps/api/1342/trigger/{IPV4}?access_token=88888888-d333-333a-22d1-1e333a55555c).

The IPV4 gets picks up the IP address of the phone and returns the correct value, as you can see from this screenshot. I would like to use this value to run an automation but for the life of me I cannot figure it out... Help :confused:

image

Here it the complete screenshot

There are some places in the UI (generally freeform text input fields, like sending notification text) that let you use the "built-in" variables like value directly. However, to get fuller use of it, you'll likely need to create a local variable, then use a Set Variable action to assign the value of that variable to %value%. Then, you'll get all the features associated with "real" variables, including the ability to use them in conditions, etc. This is done on the "Select Actoins to Run..." page.

I'm not exactly sure what your goals are, but it sounds like this might help. Otherwise, feel free to share more about what you actually want to do with the rule.

2 Likes

This :point_up: I'm doing it in a few of my rules. First create a new local variable of type string (called ActionValue in my case:

image

Then assign the variable the value of %value%. You can then use your variable in your rule everywhere variables are supported. Like an IF statement:

image

@bertabcd1234 and @mattias - thank you both, that was the missing link. I did not realize that although %value% contained the information I needed, I could not use it unless I moved it over to my own variable.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.