Difference between script automation and scripting block

I am currently struggling with a script which runs in the scripting block but not within an automation. I have the following error while testing :
However, it seems like I am respecting the restrictions given on the Airtable support site, so I don’t understand the problem. (I can share my code, if necessary)

Please share your code. Without more information, it is almost impossible to troubleshoot your problem. Screen captures with more information also often are helpful.

When pasting in your code, please use the “Preformatted text” format option in the toolbar for the forum editor. This will put backtics (```) around your code and make it more readable.