Is there some way to create code that is shared between multiple scripting blocks? Either by external import from some source, or a native solution?
Example: I have a function addClientToSession(clientRecordId, sessionRecordId)
that I want to use in multiple blocks. Right now, I have to copy and paste the function into each scripting block or automation step I want to use it in, and if I want to update it, I have to be sure I edit every instance. I’d much rather be able to do something like import addClientToSession from "shared-block-id"
.
If this is impossible, what solutions have other people in the community used to accomplish something similar?