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.
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.
{"firstName": "Henrik", "lastName": "Foo"}
{firstName: "Henrik", lastName: "Foo"}
"
“
return statementAlways 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.
const sum = x * y * input;
return sum;
const sum = x * y * input;
Usually, inline comments work as long as there are proper line breaks in the code. But if you have problems, just remove them.
return input.firstName + " " + input.lastName;
// return full name
return input.firstName + " " + input.lastName;
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.
