Script that requires npm modules

Hello,

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.

2 Likes

Thank you @BramKn.

Iā€™m assuming you mean as explained here:
https://community.n8n.io/t/help-not-been-able-to-import-external-modules/686/8?u=dbi

Yes correct.