Skip to main content
Automate.ax runs deployed project code on a pinned Bun 1.4 runtime for ARM64 Linux. You can use Web APIs, Bun APIs, Node.js-compatible APIs, and packages from the npm registry inside custom action handlers.

Choose between Web APIs, Bun APIs, and packages

  • Use standard Web APIs such as fetch, Request, Response, Blob, streams, and Web Cryptography APIs when they cover the task.
  • Use Bun’s built-in runtime APIs for files, image processing, Markdown, hashing, compression, and other common server-side work. The Bun 1.4 release notes list the APIs available in this runtime.
  • Install packages from the npm registry when you need another library. Bun supports ESM, CommonJS, Node.js module resolution, and many node:* APIs, but it isn’t completely compatible with Node.js. Check Bun’s Node.js compatibility table when a package depends on a specific Node.js API.
Prefer a Bun built-in when it avoids an external binary or native add-on. Packages that need a separate executable or a runtime-specific native add-on may not work in the Linux ARM64 deployment environment.

Install dependencies and types

Install and lock every imported package before deployment:
Automate.ax bundles imported dependencies into the deployment. The production runtime doesn’t install missing packages. When you use the Bun global, install its TypeScript definitions:
TypeScript 6 and later also require "types": ["bun"] in compilerOptions. Keep any other type packages your project already lists. See Bun’s TypeScript configuration.

Process images with Bun.Image

Bun.Image provides a Sharp-shaped, native image pipeline without an external package or native add-on build. On the Automate.ax Linux runtime, it can decode, resize, rotate, and encode JPEG, PNG, and WebP images. Use it inside an action handler so the I/O and processing happen during execution:
An organization member supplies the image URL and starts the action from the dashboard. The WebP bytes appear in the action output, and markSignificant keeps the successful run in the default Recent runs view. Feed Bun.Image validated bytes rather than a request-supplied filesystem path, and set maxPixels before decoding to reject decompression bombs.

Finish work inside the action handler

An action must finish its work before its handler returns. Don’t start a long-lived server, background process, or Bun.cron job and expect it to continue afterward. Use Automate.ax triggers such as onSchedule for durable scheduling. The runtime can’t modify the deployed project files. Use /tmp for temporary files, or keep data in memory. Custom code doesn’t receive Automate.ax database credentials or the Lambda execution role’s AWS credentials. Use integration accounts or credentials you explicitly provide for external services.