Help

Re: Using / creating shared library for Script blocks / Automations

821 0
cancel
Showing results for 
Search instead for 
Did you mean: 
John_McParland
4 - Data Explorer
4 - Data Explorer

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?

1 Reply 1
cideck
4 - Data Explorer
4 - Data Explorer

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…