Is it possible to use external JavaScript libraries in Zapier?

I’ve been using Zapier on a paid plan for a while now and I’ve had great success. As a developer, I’m looking to implement some more advanced functionalities in my Zaps. I’m curious if there’s a method to integrate external libraries or SDKs, like those for Firebase or Google Sheets APIs, into the JavaScript code within a Zapier trigger or action. This would really help with validating some existing code steps I have. Has anyone managed to utilize third-party libraries in their Zapier JavaScript actions?

From my experience working with Zapier’s JavaScript environment, the sandbox restrictions are quite strict and you cannot import external libraries through require() or similar methods. I spent considerable time trying to work around this for a project that needed crypto operations. The built-in modules are limited to basic utilities like crypto, querystring, and a few others. What worked for me was implementing smaller utility functions manually within the code action itself. For anything requiring substantial external dependencies like Firebase SDK, you’re essentially forced to architect around it by either preprocessing data outside Zapier or using their webhook triggers to communicate with your own service that has full library access. The platform prioritizes security and stability over flexibility in this regard.

Unfortunately, Zapier’s Code by Zapier actions don’t support importing external npm packages or third-party libraries directly. The JavaScript environment is sandboxed and you’re limited to vanilla JavaScript and a few built-in modules they provide. I ran into this limitation when trying to use moment.js for date manipulation in one of my workflows. What I ended up doing was copying the specific functions I needed from smaller libraries directly into my code block, which worked for simple utilities but obviously isn’t feasible for larger SDKs like Firebase. For more complex integrations, you might need to consider using Zapier’s webhook functionality to call your own hosted API endpoint where you can use whatever libraries you need.

yeah i’ve tried this before and its pretty limiting tbh. only workaround i found was using zapier webhooks to hit my own server where i can run whatever js libraries i want. not ideal but gets the job done when you need firebase or other apis