make code formatter & linter
Make code modules support javascript (node 20) and python (3.12). scenario data is available via `input` (key-value pairs mapped in the UI); the module output is whatever you `return`. preinstalled JS libraries (`moment`, `moment-timezone`, `lodash`) are loaded via `require()`.
const items=input.items||[]
return {count:items.length}working inside make? the codefmt Chrome and Firefox extension adds a right-click Fix with codefmt in the code editor, so you format and lint in place without copy-pasting in and out of this page.
what make code modules support
Make code modules let you run custom javascript (node 20) or python (3.12) inside your scenarios. scenario data arrives as the input global, and whatever you return becomes the module's output.
make code globals
codefmt recognizes every global Make's sandbox injects: input, fetch, process, Buffer, URL, and the timer functions. you won't see false positives, and real bugs still surface instantly.
formatting make code
codefmt beautifies your code by adding Make's async wrapper before formatting and removing it afterward, so you paste just the module body and get back code that drops straight into your scenario. preinstalled libraries like lodash, moment, and moment-timezone are loaded via require().
frequently asked questions
what is Make code?
Make code is a Make module that lets you run custom javascript (node 20) or python (3.12) inside your scenarios. scenario data is available as the input global, and whatever you return becomes the module's output. codefmt formats both the javascript and python variants.
what globals are available in Make code javascript modules?
Make code javascript runs in a node 20 sandbox and exposes input (the scenario data mapped in the UI), console, fetch, process, Buffer, URL, setTimeout, setInterval, clearTimeout, and clearInterval. libraries like lodash, moment, and moment-timezone are preinstalled and available via require(). codefmt recognizes all of these as valid globals.
does Make code support python?
yes. Make code supports python 3.12 in the same module. the python runtime exposes input as the scenario data global, and you return a dict to send output back to Make. codefmt has a dedicated python formatter (Ruff) and will wrap your code correctly so Ruff can parse a bare return statement.
can I use async/await in Make code?
yes. Make code javascript modules run in an async context, so top-level await works directly. you can also use return at the top level to set the module's output. codefmt adds the async wrapper before formatting and strips it back out afterward.
does codefmt lint Make code?
yes. codefmt runs oxlint on javascript and Ruff on python, with Make's injected globals registered so you don't get false positives for input, Buffer, URL, and friends. you get instant diagnostics for undefined variables, unused imports, style issues, and common bug patterns before you paste the code back into Make.
also format code for zapier, n8n, pipedream, hubspot data hub, hubspot cms (hubl)
other tools: json formatter, python formatter, snippets
primary source: Make: the Make Code app