Hi! Has anyone been able to use the Retrieve Survey Response Web Service task together with the Code task? I'm trying to get the JSON from a response, then convert it into readable text to send via an Email task, but the result keeps being empty.

The API is working:

The JS code is very simple:
function codeTask() {
// Retrieve the JSON content
let jsonResponse = "~{ch://OCAC_VAR4RGrFLH6Ekqf/$.result}";
// Parse the JSON content
let parsedResponse = JSON.parse(jsonResponse);
// Convert the parsed JSON into readable text (this can be customized based on the structure of your JSON)
let readableText = JSON.stringify(parsedResponse, null, 2); // Indented with 2 spaces for readability
// Return the readable text
return {
result: readableText
};
}The Email task is supposed to show the result, but turns out empty:

What am I doing wrong?


