Which exact OpenAI output field should be mapped into Custom JS V2? (OpenAI → Custom JS input always empty)

:bullseye: What is your goal?

to feed an OpenAI → generate a response module output into a custom js → execute inline Javascript Code module.

:thinking: What is the problem?

I have been working with chatgpt to try and architect this scenario, I’m stuck at the 2nd to last step. chatpgt is trying to tell me there is absolutely nothing wrong with the output of my OpenAI generate a response module which it claims is a valid JSON (I’m not 100% sure chatgpt isn’t hallucinating when it tells me the output is fine), and that my issue must be with what I am trying to map into custom js.

:test_tube: What have you tried so far?

I have tried to map to raw result, file data, output → content → Text, no matter what I try, my custom js runs with a null output. I know the openai module is outputting something, because I can see the beginnings of it previewed in the mapping screen.

:camera_with_flash: Screenshots: scenario setup, module configuration, errors


Can you post the full code you’re using with your JS function? Right now, I think your function never returns anything, and also the OpenAI value is wrapped inside the object.

Hey Peter,

click on the OpenAI module, toggle advanced settings, scroll down and enable the setting where the response is in JSON format.