Documentation Index Fetch the complete documentation index at: https://docs.spojit.com/llms.txt
Use this file to discover all available pages before exploring further.
The Code Runner connector lets you run custom JavaScript or Python code inside your workflows. Use it for custom logic, data transformations, and calculations that aren’t covered by the built-in utility connectors.
No connection required — this utility connector works out of the box.
execute-javascript — Run JavaScript
Execute JavaScript code in a sandboxed VM environment. JavaScript code to execute.
Input data, available in the code as the data variable.
Execution timeout in milliseconds (max 30000).
Example request: {
"code" : "const total = data.items.reduce((sum, n) => sum + n, 0); \n console.log('Processing', data.items.length, 'items'); \n return { total, average: total / data.items.length };" ,
"input" : {
"items" : [ 10 , 20 , 30 , 40 ]
},
"timeout" : 5000
}
Example response: {
"success" : true ,
"result" : "[object Object]" ,
"stdout" : "Processing 4 items" ,
"stderr" : "" ,
"executionTime" : 3
}
execute-python — Run Python
Execute Python code in a sandboxed environment. Input data, available in the code as the data variable.
Execution timeout in milliseconds (max 30000).
Example request: {
"code" : "import re \n\n emails = re.findall(r'[ \\ w.+-]+@[ \\ w-]+ \\ .[ \\ w.]+', data['text']) \n print(f'Found {len(emails)} emails') \n {'emails': emails, 'count': len(emails)}" ,
"input" : {
"text" : "Contact us at support@example.com or sales@example.com for help."
},
"timeout" : 5000
}
Example response: {
"success" : true ,
"result" : "{'emails': ['support@example.com', 'sales@example.com'], 'count': 2}" ,
"stdout" : "Found 2 emails" ,
"stderr" : "" ,
"executionTime" : 85
}
Tips
Use the data variable to access input passed from previous workflow nodes.
Keep code focused — for simple transformations, consider using the JSON Tools or Text Tools connectors instead.
Both JavaScript and Python run in isolated environments with limited access to system resources.
Set an appropriate timeout for long-running computations.