how to debug the scripts describe in https://docs.rocket.chat/guides/administration/admin-panel/integrations#script-details-1
hi! Welcome to our Community
If you change the verbosity in ADMIN > WORSPACE > SETTINGS > LOGS > Log Level you can see the outcome of the script execution there.
Also, console.log should spit logs there too.
Let me know if this helps