I understand that the trigger has a “step result” that can be used in the automation actions under the “Then” section.
But if I were to add a “Script” action in the first spot, could further actions down the automation stack use its return value?
What I’d like to do is to have the first “Script” action return data from linked entites, and then in the second action step, have that data sent in a GPT prompt and use the return value of the prompt to update a field of the entity on which the automation was triggered.
In my experience, no. I hope this is an update released this year. This kind of functionality makes developing in Airtable quick and easy. It would no doubt save time when building in Fibery too.
In my case I need to generate an 8 character alphanumeric string as part of a user friendly ID. This part is easily handled by a script. It would be ideal if I can simply return this string from the script and then reference it as a step result later in my automation.
The results of automation steps are available in scripts as args.steps (an array, where args.steps[1] is the result of the trigger, and elements [2], [3] etc. are the results of the action steps).
If an action is itself a script, then you can return a value using the return() function, and use it in subsequent steps.
It would be very helpful to have the results of prior steps be referenced in the no code formulas. Here for example, the formula should show “Step 2 Contact” in the “Steps results” section. I would expect to be able to select the contact created in step 2.
Otherwise it just feels like rules are there for either coded automations or only very simple single level no code automations. Even in basic cases, one would expect the results or prior steps to be listed as inputs to subsequent steps.