I’m trying to extract a specific field from a webhook payload using Studio actions. The goal is to branch based on whether a status field equals “active”.
I’ve got an ASSIGN action that pulls the JSON body into a string variable called webhookPayload. Then I use another ASSIGN to parse it into a map.
The issue is in the subsequent IF action. When I reference the parsed map, the condition always evaluates to false, even though the payload definitely contains the key.
Here’s the snippet:
{
"webhookPayload": "{\"status\": \"active\", \"id\": 12345}",
"parsedData": {"status": "active", "id": 12345}
}
The IF condition is set to:
{{parsedData.status}} == "active"
It seems like the ASSIGN action isn’t converting the JSON string to a proper object that the IF block can read. Am I missing a step in the conversion? The documentation is pretty vague on handling nested structures.
I’ve tried using GET_JSON_FIELD in the expression but that doesn’t seem to work inside the IF condition field itself. Just returns null or throws a parsing error in the preview.
Anyone else hit this wall with Studio scripting?