Help

Error with -> input.recordAsync is not a function

Topic Labels: Automations
2777 4
cancel
Showing results for 
Search instead for 
Did you mean: 
Arthur_Lanter
5 - Automation Enthusiast
5 - Automation Enthusiast

Hi all,

I have an error when I reproduce this example: Airtable Scripting

let record = await input.recordAsync(‘Select a record to use’, table);

Throw this error:

TypeError: input.recordAsync is not a function

Does anyone have an idea of what I need to change?

Thanks,

Arthur

4 Replies 4

Are you writing an automation script?
Automation scripts cannot take user input.

Instead setup your script to use input.config() and automation input variables.

Thanks!
I don’t want to take a user input, but I do want to use a script within an automation. I want to send to that script a record from an interface using a button. I thought to use the “When a button is clicked” trigger. But I don’t see a way to get the record as an input.

I saw that post, but I guess it doesn’t concern an interface button.

I guess I can not use a button from my interface but will have to do it directly from the grid with a button field.

You can do this. You need to use input.config() in combination with an input variable to get the record ID of the triggering record. It is documented here. Note that you need to use the version for automations.

Arthur_Lanter
5 - Automation Enthusiast
5 - Automation Enthusiast

Hi Kuovonne,

Great, simple and easy indeed. Thank you for your help!