Trying to gather global vars into a single object once daily

Hi folks. I have a flow that is monitoring a series of IoT things and sending SMS alerts just fine.

I am trying to do something that seems simple enough. Create a daily SMS that gathers designated saved global variables.

I thought that generating a single json object using the Change Node would be pretty straight forward but I just can't get the syntax right.

When I try something like

{
"var1" : global.get(x),
}

it chokes on the 'g'.

When I use
{
"var1": "global.get(x)" or global.x
}

it literally prints the string "global.get..."

Any ideas on the best way to do this?

"var1": $globalContext("x"),
Should be corrext. Select JSONata in the dropdown .

1 Like

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