In my Workflow, i receive FTP files encrypted with PGP. I saw encrypt/decrypt node in n8n but it doesn’t support PGP. So i try to do it with Function script. First, i try to install openpgp and use it in my fuction but it’s not working. Do you know how to install npn node package in n8n?
Then i try to get my data from FTP node but it looks in a binary format like $node(‘FTP’).I_DONT_KNOW. Do you know how can i access to my binary variable?
Last but not the least, is there anyone that alrady develop something similar?
Many thanks
Hey @michael75, how exactly you’d install an npm module like this one would depend on how you have installed n8n. Perhaps you could share some details about your setup? It would be great if you could fill out the question template when posting new questions as this would cover the relevant details in many cases.
In general, you’d need to install the module so n8n can access it and then specifically allow its usage via the NODE_FUNCTION_ALLOW_EXTERNAL
environment variable.
Binary data can be read using await this.helpers.getBinaryDataBuffer(itemIndex, binaryPropertyName)
in the Function node as mentioned here.