updated: Advanced Webhook Builder woes

I am able to send JSON data to activate a Route. When I look at the console I see the data received by hologram is:

{“cid”:“1”,“devid”:“1”}

However I get the error in “ROUTE ERRORS”:

APP #9312 : Variable ‘cid’ does not exist in data

yet, “cid” is definitely in the JSON data received, so I don’t get the problem.

Any ideas would be appreciated.

My destination URL in the Route is:
http://www.myserver.com/myfile.php?cid=<< cid >>. . . . with no spaces

Hi,

I’m not sure you can access variables that are part of your incoming data string.

Certainly, I do the following with success. This is the POST payload (but could likely be put in the URL after ? [i.e. query string], even though I don’t do it that way myself):

{"dev":"<<device.name>>","rec":"<<received>>","tag":<<tags>>,<<decdata>>

decdata is what comes in from your device. In your case you’d use:
“cid”:“1”,“devid”:“1”}
Note that there is no leading curly bracket in the string from your device since that is provided in the post payload. You could delete the device name, received time, and tags fields if you don’t need them. Device name is useful and probably avoids the need for your devid:1 (the code in all your devices remains the same, with holgram proving the distinguishing identifier (device.name).

Hope this helps. If someone knows how to extract particular variables out of the incoming string (as OP wanted) please feel free to reply!

Cheers, Phil

I also meant to say that in the portal you can give each SIM card a unique device name (e.g. as simple as “1”, if you wanted!).

Thanks. So, i thought i could access individual values but i see now i can catch the entire payload with the decdata tag and i am able to work with that.

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