You are the experts in Node Red, would it be interesting to create a new Node to use it directly in Node Red?
Or do you suggest using it with HTTP POST?
I don't know how to create nodes, I'm just starting in Node Red
/** Allow the Function node to load additional npm modules directly */
functionExternalModules: true,
in settings.js (restart node-red), you can use the "setup" tab in a function node, it will import the nodejs library directly for use within the function node.