JavaScript
ToolJet workflows let you import npm packages into your workflow so that every JavaScript node can use them. Once a package is added, it is bundled and available across all JavaScript nodes in that workflow version.
info
External library support for workflows is available on Enterprise Edition plans.
Adding Packages​
- Open your workflow in the editor.
- Click the Packages icon in the left sidebar to open the package manager panel.
- Type a package name (e.g.,
lodash) in the search field — results are fetched from the npm registry. - Select the package and version you want to install, then click Add.
- The package is added to the workflow's dependency list and a bundle build starts automatically.
You can add multiple packages before the bundle finishes building. The bundle regenerates with all current dependencies.
Using Packages in JavaScript Nodes​
Once the bundle status is Ready, you can import the packages directly in any JavaScript node:
import lodash from 'lodash';
import { v4 as uuidv4 } from 'uuid';
const grouped = lodash.groupBy(getOrders.data, 'status');
return {
requestId: uuidv4(),
summary: grouped
};
Packages are available to all JavaScript nodes in the workflow — you don't need to import them separately per node.
Removing Packages​
- Open the package manager panel.
- Click the Remove icon next to the package you want to remove.
- The bundle regenerates automatically without the removed package.
Need Help?​
- Reach out via our Slack Community
- Or email us at support@tooljet.com
- Found a bug? Please report it via GitHub Issues