CustomJS is a code-first automation platform that enables seamless integration of custom JavaScript logic into various systems and technologies, allowing users to extend applications by writing functions for tasks like sending emails, generating PDFs, or updating CRM data fields.
CustomJS is a code-first automation platform that enables seamless integration of custom JavaScript logic into various systems and technologies, allowing users to extend applications by writing functions for tasks like sending emails, generating PDFs, or updating CRM data fields. On Nagent, Customjs is exposed as a fully-configurable developer tools integration that any agent can call — 5 actions, and API key authentication. No code is required to wire Customjs into your workflow — connect it once via the External Integrations panel and reuse it across every agent you build.
Agent builders use Customjs to automate the kinds of tasks developer tools teams previously handled manually. Concrete examples — each one is a single agent step in Nagent — include:
Every action and trigger is paired with a structured input/output schema (visible in the sections below), so when you wire Customjs into Helix — our agentic agent builder — the editor knows exactly what each step expects and produces. Configure once, deploy anywhere across your Nagent agents.
Every operation an agent can call against Customjs, with input parameters and output schema. Drop these into any step of an agent built in Helix.
CUSTOMJS_AUTHENTICATE_API_KEYAuthenticate and validate a CustomJS API key. Returns workspace details, request limits, and decoded JWT token information including user email. Use this to verify an API key is valid before making other CustomJS API calls.
Input parameters
The CustomJS API key to verify. Obtain from the CustomJS dashboard.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
CUSTOMJS_CONVERT_HTML_TO_PDFConvert HTML content to a PDF document. Use this tool to generate PDF files from raw HTML markup. Supports: - Complete HTML documents or fragments - Inline CSS styling (colors, fonts, tables, borders, backgrounds) - Unicode characters and special symbols - Multi-page documents Returns raw PDF bytes suitable for file storage or download.
Input parameters
JavaScript code snippet to process the HTML conversion. Uses the built-in HTML2PDF utility. The default value handles standard HTML to PDF conversion - typically no changes needed.
The HTML content to convert to PDF. Can be a complete HTML document including <html>, <head>, and <body> tags, or just a fragment. Supports inline CSS styles for formatting.
Instructs the API to return binary PDF data. Must be 'true' for PDF output.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
CUSTOMJS_CONVERT_HTML_TO_PNGTool to convert HTML string to PNG image. Use when you need a PNG from HTML after preparing your markup.
Input parameters
HTML content to convert into a PNG image
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
CUSTOMJS_MERGE_PDFSMerge multiple PDF files from URLs into a single PDF document. Use this tool when you need to combine two or more PDF documents into one. The PDFs are merged in the order provided. All input URLs must be publicly accessible. Returns a downloadable merged PDF file.
Input parameters
List of publicly accessible HTTP/HTTPS URLs pointing to the PDF files to merge. The PDFs will be merged in the order provided. Minimum 2 URLs required.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
CUSTOMJS_RUN_PUPPETEER_SCRIPTExecute a Puppeteer script in a headless browser and capture a screenshot. Use this tool for browser automation tasks such as navigating to URLs, interacting with page elements, extracting data, or capturing visual snapshots of web pages. The script runs in a sandboxed Puppeteer environment with access to a 'page' object.
Input parameters
JavaScript wrapper code that invokes the PUPPETEER utility. In most cases, use the default value. Only modify if you need a different execution pattern.
Puppeteer script to execute in a headless browser. The script has access to a 'page' object (a Puppeteer Page instance). Common operations include: page.goto(url), page.waitForSelector(selector), page.click(selector), page.type(selector, text), page.screenshot(), and page.evaluate(). The script runs asynchronously, so use 'await' for async operations.
Whether to return a screenshot of the final page state as PNG image data. Set to true (default) to capture and return the screenshot.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
No publicly available marketplace agent is found using this tool yet. There are 94 agents privately built on Nagent that already use Customjs.
Build on Nagent
Connect Customjs to any Nagent agent in minutes — no API key management, no boilerplate. Just configure and deploy.
The five questions agent builders ask before adopting a new integration.
Open the External Integrations panel inside Nagent (app.nagent.ai/externalIntegration), find Customjs, and click "Connect Now." You'll authenticate with an API key — Nagent handles credential storage and refresh automatically. Once connected, Customjs is available to any agent in your workspace.
No. Nagent provides no-code integration for every tool. Once Customjs is connected, you configure its 5 actions directly in the agent builder UI — no API calls, no boilerplate, no schema management.
Helix — Nagent's agentic agent builder — lets you drop Customjs steps into any workflow visually. Pick an action (e.g., one of those listed above), fill in the inputs (Helix knows the required vs. optional schema for each parameter), and connect it to upstream/downstream steps. Triggers run as the entry point of an agent, so when a Customjs event fires, the agent kicks off automatically.
Every Customjs action and trigger ships with a fully-typed schema — input parameters with name, type, required flag, and description, plus the output payload shape. The schemas are documented in the sections above. Helix uses these schemas to validate your configuration at build time and to type-check the data flowing between steps.
Yes. While Customjs ships with 5 pre-built developer tools actions, you can layer custom logic around them inside Helix — pre/post-processing steps, conditional branches, retries, or stitching Customjs together with other connected tools. For deeper customization, talk to our team about Nagent's Agentic AI Lab — forward-deployed engineers who build Customjs-based workflows tailored to your business.