Help

Using Script in Automation

Topic Labels: Scripting extentions
2464 4
cancel
Showing results for 
Search instead for 
Did you mean: 
Alex_Liberchuk
5 - Automation Enthusiast
5 - Automation Enthusiast

I wrote my first script, tested it and it works ! I Used the Script template from " Table optimizer" to convert “wide” table to “long” one.

Now I am trying to utilize this script in my Automation routine using trigger and it doesnt run. I coped and pasted script into Automation, but when I test it, it give me error:

TypeError: input.config.table is not a function

Any help ?

4 Replies 4

Not the same environment, automations run on Airtable’s own servers. input.config is no the same thing in the cloud, it’s basically a variable.

edit: come to think of it, it is the same thing, you’re just observing the test run and tackling an issue from a different perspective.

anyway, re-declare the symbols giving you trouble and get rid of the input.config object from the original Automation script.

ìnput.config() works very differently in scripting app compared to in an automation action script. In an automation action script, you cannot get a table directly. You can only get input variables.

For more information, see the documentation here.

Olu_Adebajo
5 - Automation Enthusiast
5 - Automation Enthusiast

Hi @kuovonne @K_V , I looked at the documentation you recommended, but couldn’t get it to work. Would you be able to look at my script to say what’s missing?

Screen Shot 2022-03-01 at 12.36.28 PM

Welcome to the Airtable community!

As I said in my previous post, ìnput.config() works very differently in scripting app compared to in an automation action script. You also cannot use input.recordAsync in an automation script.

In order to get the script to work, you would need to rework most of your script. Everything that has squiggly red underlines would need to change. If you want more personal advice on how to do this, you can book a meeting.

On the other hand, it looks like you are just trying to timestamp a record with the time an automation has run. You may be interested in my Automation Helpers Scripts. One of the scripts output a timestamp that can be used in a later Update Records action.