Script that requires npm modules


Is there a way to use npm modules in the script node, or maybe inside some other node?

I am trying to use a special email parser available on npm to further process email I fetched via the IMAP node.

Thank you very much.

HI @dbi

Welcome to the community!
Are you using n8n cloud or self-hosted?
On cloud, you cannot.
On self-hosted you can set it with the env variables.


Thank you @BramKn.

I’m assuming you mean as explained here:

Yes correct.