Help

Re: Automation Scripts: IDE / Developer Environment best practice

1748 0
cancel
Showing results for 
Search instead for 
Did you mean: 
mainway
5 - Automation Enthusiast
5 - Automation Enthusiast

Hello everyone ‌🙂

I have a large number of automation scripts, some of which are quite complex. However, developing the scripts is relatively tedious because the script editor gives a limited view of the code (and it lags behind a “real” IDE, e.g. no copilot etc). There is also no version control.

I currently develop our scripts this way:

  • I write the script in Visual Studio
  • I also maintain the GIT repo there
  • When I'm done, I copy the script into the Airtable script editor

However, copying back and forth is error-prone and tedious.

My questions to the community:

  • What are your best practices for writing automation scripts and managing the scripts?
  • Is it really not possible to make the code view in the editor full screen (Safari, see image)?

Thank you very much!

IDE.jpg

5 Replies 5
dilipborad
9 - Sun
9 - Sun

Hello @mainway 

I can understand what you feel about Airtable's script editor and it's the same story for almost every Airtable expert.

But we can't able to go to another IDE for airtable script because

1. All the Airtable-related functions and syntax suggestions are available here only.
2. While we do it outside we couldn't do a quick test.
3. For managing version control I think we can use Git and if the script is small then store it on the Local(or Clouds) system as a file.

For now, they think the script is mostly used as an extra option. When it will be used as a primary option(step) for most people then airtable thinks to give more features on it.

I also use an external editor and git, and copy back and forth. 

I always copy the entire script back and forth, even if I changed only one small thing in one line. 

If I haven’t touched a script in a while, I copy the script from Airtable to my code editor and run a diff with the version in my code editor. That way I know if someone made an unauthorized change to the production script, or if I forgot that I am in a different branch. 

To answer you other question, no, it is not possible to hide the left and right panels of the automation script editor.

Sho
11 - Venus
11 - Venus

I do it the similar approach. I manage complex formulas, scripts and extensions in GIT and code them in VS CODE.

I see that in the Airtable editor, it's now possible to edit multiple points by Ctrl+D or ALT+click. They are making an effort.

Also, the recent formula editor in the field is difficult to use because the suggestions are forced.

sandromancuso
4 - Data Explorer
4 - Data Explorer

Hello everyone,

I'm also trying to run the Airtable scripts outside Airtable. The main reason is that I have some complex data transformation logic that is getting more and more complex and I want to be able to unit test it using Jest and maintain the history of my changes on GitHub.

Has anyone been able to do that? I'm struggling to get Jest to execute the script as it doesn't recognise (as expected) things like input.config() or base.getTable(). 

I was wondering if there is any "mock library" available that I could import to my scripts (only during tests)  that could emulate some of the Airtable objects. 

Do you know any examples of unit testing Airtable scripts? 

Thanks

fone_personal
4 - Data Explorer
4 - Data Explorer

I also have the same question: did anybody managed to create a "mock library" to be able to develop and execute code locally ?

The execution part would be to test and validate that the code is working as expected, in production it would still be run inside airtable. The copy/paste part doesn't really bother me, it's more that I would like to be able to use debugger and the full functionalities of an IDE when developing complex formulas.