Skip to main content

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

Are you writing an automation script?


Automation scripts cannot take user input.



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


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.


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.


Hi Kuovonne,



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


Reply