Troubleshooting

This page lists common mistakes you might run into when trying to get JavaScript code to work in Make. If you're still having problems with getting the code to work, join the Slack community to receive custom help.

Input variables

Many errors occur if, for example, a JSON object is used in the input field, but you do not pass a valid JSON with correct quotation marks.

Valid JSON object

{"firstName": "Henrik", "lastName": "Foo"}

Invalid JSON object

{firstName: "Henrik", lastName: "Foo"}

Valid quotes

"

Invalid quotes

“

JS code

return statement

Always include a return statement in your CustomJS code. It's the only way to send data from your script to the next module in your Make workflow. For more information, see Return Statement.

Correct return statement

const sum = x * y * input;
return sum;

No return statement

const sum = x * y * input;

Inline comments

Usually, inline comments work as long as there are proper line breaks in the code. But if you have problems, just remove them.

Removed inline comments


return input.firstName + " " + input.lastName;

Inline comments

// return full name
return input.firstName + " " + input.lastName;

JSON structures

If you want to use JSON structures from other Make modules, you must first convert the collection using the Transform A Make Collection to JSON module.

CustomJS Make Inline JS
CustomJS Make Inline JS