It's possible to use "Buffer" and "toString" on the script block?

I need to do something like that: let file = Buffer.from(response).toString('base64');
No description
6 Replies
Baptiste
Baptiste10mo ago
It's not working?
DárioLopes
DárioLopesOP10mo ago
Unfortunately isn't working, every time i run got this message "An error occurred, Buffer is not defined"
No description
Baptiste
Baptiste10mo ago
Nah indeed, the sandboxed code environment does not have the Node.js built ins like this... It's a limitation What are you trying to achieve?
DárioLopes
DárioLopesOP10mo ago
I'm trying to transform some information into base64 and then transform it into a PDF to send to the end customer This information comes via API(htt request) that I have already managed to configure got it, do you know some other way to do it?
Baptiste
Baptiste10mo ago
I should implement a block that converts a text content into a file and provides a URL
DárioLopes
DárioLopesOP9mo ago
thanks, this will really helpful Did you do this implementation?

Did you find this page helpful?