Nov 21, 2023 04:31 AM
Hello Airtable Community,
I'm encountering an issue with an automation I've set up and would appreciate any insights or advice you can offer.
Here's what I'm trying to achieve: I have an automation with two steps. The first step is a "Create Record" action, where a new record is added to a table. The second step is a script that should modify a field in the newly created record.
The problem: In the script part of the automation, I'm trying to access the ID of the record created in the first step. However, when I run the script, the variable that should hold the record ID (createdRecordId) is coming up as undefined.
Details of my setup:
The "Create Record" action seems to work fine, as a new record is indeed created.
In the script, I'm using input.config() to access the record ID, like this:
But createdRecordId is undefined during the script execution.
Additional Information:
Has anyone else faced this issue or have any suggestions on what I might be doing wrong? Any guidance or tips would be greatly appreciated!
Thank you in advance for your help!
Solved! Go to Solution.
Nov 21, 2023 09:37 AM
When you click on "Edit Code", is there a left-hand panel in the code editor? That's where you would configure the input variables.
Nov 21, 2023 08:04 AM
Hello @Wookiem
Have you passed input variable as recordId with its value?
Not sure but maybe you didn't pass it.
Just share some screenshot, which makes more sense.
Nov 21, 2023 08:59 AM
Nov 21, 2023 09:07 AM
Thanks Dilipboard.
No, I couldn't figure out how to configure either the output from add record step and the input to the script. Please let me know what I'm missing. Thanks!
Nov 21, 2023 09:37 AM
When you click on "Edit Code", is there a left-hand panel in the code editor? That's where you would configure the input variables.
Nov 21, 2023 09:55 AM
Thanks Andy_Lin1! That solved it for me.