Using / creating shared library for Script blocks / Automations

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?

Hi, indeed scripting in AirTable is awesome both via scripting block and automations, but I also need to be able to re-use my javascript code in various automations. Looking for some kind of import or include feature, but it does not seem to exist yet. Very interested if anyone has a solution, otherwise it will soon be a nightmare to maintain…

This topic was solved and automatically closed 15 days after the last reply. New replies are no longer allowed.