Define variables externally via SMS or HTML


#1

1) Give a description of the problem
I’m looking to define a variable string (local or global, I’ll take either) through some external means, whether that be a text message, an HTML trigger, or some other input method to which I’m currently ignorant. Is this possible or are webcore data inputs strictly limited to ST devices/locations data?

2) What is the expected behavior?
Ideally, a unique variable, e.g. “pet_gate_reminder”, is sent to a piston through some not-too-cumbersome means, and that unique variable can later be used in a SMS or notification text when triggered by any number of ST events. The idea is that the variable or variables are unique and novel, and do not require going into webcore every time a new reminder is created.

Thank you for any insight you all can provide!


#2

Part 1) I might be able to recommend something.
Part 2) (lost me at hello :)))) - I am not a coder so I have no idea what’s going on on part 2::))))))))

part 1) What i am about to suggest is probably not what you are looking for but just wanted to share. (Big guns will jump in and give you answers I am sure)
you can execute a piston via URL address. Each piston has a unique URL link.
if you create a piston without any triggers/conditions…

Execute
With Location
Do
Set variable @glabalvariable = 100

If you click on this pistons URL, from your phone, browser etc, it will set the variable and changes to what ever you want. (What ever is in this piston)

I guess you are looking for something more like, SMS a number and put 100 and that changes to variable to 100. if you send 70, variable becomes 70 etc…


#3

If you create a piston and then click the “external URL: click to open/execute” link, it will give you the secure url of the piston you have created.

You can then pass arguments to the piston via that url.
If the argument references a global variable (call it ‘var1’) and you’ve told your piston “store that argument as var1”, Webcore will store your argument in that variable.
From there, Webcore can certainly send that variable in a push or sms notification.


#4

I think he wants to define the variable itself?


#5

Thanks Glen. This is what I was hoping was possible and I figured it out: defining a global variable at the end of the piston URL. Easier than I thought! Appreciate the help.


#6

@jonchiz3 Can you elaborate how you set your global variable at the end of the piston URL?
I’m trying to create a piston that executes a number of times depending on my externally defined number.