Undefined Buffer Error code

Hello.

I received this Buffer undefined error in a code block generated by the Mindstudio architect
The function just exports a CSV file.
Any ideas how to fix this or to change the function ?
Thank you
Dan

Execute Function
1 Action started on CloudRunnerInstance ID: 96zsk at May 28, 2025 4:48:27.881 PM EDT
2 Resolving variables
3 2 ms Resolved function configuration object: JSON
{inputData: {headers: [...]data: [...]sourceFileMapping: [...]}outputUrlVariable: "consolidatedCsvUrl"}
4 Loading code
5 7 msPreparing JavaScript execution environment (Node v22.15.0 LTS)
6 Executing “Consolidated CSV Generator”
7 Console log: “Generating CSV content…”
8 Console log: “Converting to Buffer and uploading…”
9 1 msError: “Buffer is not defined”
10 Execution error: Error: Buffer is not defined

Hi @DanG,

Could you please share a Loom with an overview of your setup, an example of the issue in the Debugger tab, and the Custom Function code and configuration? That would help us get a better understanding of what might be causing the function to error out.

Also, feel free to check out the Custom Function section in our Troubleshooting guide:
https://community.mindstudio.ai/t/troubleshooting-guide-101/71#p-104-custom-function-error-5