Save the date! Join us on October 16 for our Product Ops launch event. Register here.
Feb 03, 2022 02:44 PM
This doesn’t seem to have been asked before, which suprises me.
Is it possible to do this? ie use an existing script like a procedure?
Feb 03, 2022 03:20 PM
No, this is not possible. All of the code for a script must fit in the single script editor at once.
Some people have creative systems where the script retrieves code stored externally (either in the base or on the internet) and then the script uses eval
to run the additional code. However, this technique only works in Scrpting App (not in Automation Scripting Actions), and it introduces a additional complexity and risk.
Feb 03, 2022 04:30 PM
A more advanced option would be to use a service like Autocode or Pipedream to create a custom endpoint that can be called from within a script. Setting up something like this would take a good bit of work, it wouldn’t be literally as easy as calling a procedure, and would probably only be worth it for non-trivial use cases. However, that may be what some are looking for.