Function Updated 17 Oct 2026
process(script, [cursor])
Executes a #JS script string and returns its output.
Only allowed when the workspace owner's account (or its group) is marked as trusted by Docly — otherwise the call throws "Access denied, can't execute 'Process' function.". Never run text that comes from users: the script runs with the site's full rights.
Parameters
scriptstringrequired#JS code to execute
cursorobjectoptionalOptional object whose values are available to the script as global variables (this).
Returns
The output produced by the script, as a string. null when the script is null.