Function Note TypeError

Have received the following error running node:

Cannot read property ‘substring’ of undefined
at customFunction (RawFunctionNode:2:39)

Been using the same function (javascript) for two identical workflows (one workflow per device, one trigger URL per device). One workflow is working properly, the other provide this error message.

Java Script in the Function Node:
var x=parseInt(, 6),16);, 2),16);, 4),16);
}else if(x=45){;
}, 6),16);, 8),16);, 10),16);, 12),16);, 14),16);, 16),16);, 18),16);, 20),16);, 22),16);, 24),16); = +;*(;

The Workflow look like this:

Please assist

HI @tirosh_gutte,

I took a look at your workflows and it looks like you are seeing this problem as the data coming in is not in the same format. The data coming in to the Webhook has the entire payload as one key with an empty string as the value:

When your Function Node is looking for {{}}, it is not finding anything, as the payload that is coming in is being recognized as a key, not multiple keys with multiple values. It looks as though the Webhook is sending data in this format, so be sure to check how you have it set up!