How to use "html2canvas" on n8n?

You need to create a custom image that has that library installed. Then you have to the env variable NODE_FUNCTION_ALLOW_EXTERNAL with the name of the package.