JavaScript Code
JavaScript Code runs custom JavaScript in Glide apps. With it, you can transform data, perform calculations, or connect to external APIs. The feature is available as the JavaScript Function computed column and the Run JavaScript Code action.
Enterprise Feature
This feature is available as an add-on to Enterprise plans. Contact sales to get started.
Writing the JavaScript Code
JavaScript Code requires a function named run that takes a JSON object as input and returns a JSON object as output.
The following packages are available for use in the code:
lodash— Utility library for data manipulationdate-fns— Date formatting and calculationsms— Convert time strings to millisecondsuuid— Generate unique identifiersfast-deep-equal— Deep equality comparison
Using a coding agent
Glide provides a JS Code Sandbox environment designed for use with coding agents.
A coding agent such as Claude Code can generate the JavaScript code for you based on a description of the desired functionality. This allows you to generate the code by describing the requirements with a prompt, and the agent you choose generates the code in code.js. You can then copy the code into the Function Code field in Glide.
JavaScript Function Computed Column
The JavaScript Function computed column executes code for each row in a table and returns the result as a dynamic value.
In the Data Editor, click the plus symbol to add a new column.
Run Javascript Code Action
The Run Javascript Code action executes JavaScript in response to user interactions or workflow triggers. Unlike the computed column, this action includes a Log Output URL field that captures console.log() output for debugging.
Layout Editor
Workflow Editor
In the Data Editor, create columns to store the Result and optionally the Log Output URL.
Click the Action dropdown and navigate to Integrations → Run Javascript Code, then select Run Javascript Code.
Frequently Asked Questions
Which plans include JavaScript Code?
JavaScript Code is an add-on for Enterprise plans. Contact sales to get started.
How many updates does JavaScript Code use?
JavaScript Code uses 1 update each time it runs. When used as a computed column in the Data Editor, it uses an update for every row where it runs.
What is the difference between the computed column and the action?
The JavaScript Function computed column runs for each row and returns a value. The Run Javascript Code action runs on demand (via button click or workflow) and includes a Log Output URL for debugging.