Nov 05, 2020 01:46 AM
I configured an Airtable automation script to trigger when a record matches some conditions.
I had expected to somehow get an “input” containing the said records, but it feels like there isn’t such thing. My goal is to perform processing for the said records only.
I didn’t find anything in the API reference Airtable Scripting.
Is it possible? If not, what’s the recommended way to about that? I’m thinking about iterating over all elements and check if some field is empty and if so then perform some processing for that record.
Also, I read that only 15 records can be updated per second, how does this work? Is it handled by Airtable automatically or do I need to temporize the updates myself so that I don’t go over the limit?
Jul 22, 2021 11:35 AM
Oh my goodness, you figured it out. This error drove me crazy for months and the support team was useless to help me solve it. UX is shitty indeed. Glad you shared it!
Aug 28, 2021 02:14 PM
there’s no way to add input. I still can not find how to pass inputs. All i am trying is when status changes to active, i want to send a webhook and pass some data of the updated record.
Aug 29, 2021 04:33 AM
You’re actually right, we cannot define the value (record id) to be used by the script.
I recorded a video to explain the workflow a bit in-depth: Airtable Script - "when a record matches conditions" - How do I get the records that triggered ... -...
@Ross_Patton I think your answer is misleading, because @Ates and I assumed you found a way to set variables, but the only thing Airtable provides is a way to see what values are being used (at least when using a record id).
Aug 31, 2021 07:57 PM
Hi,
you can input any data from records participated in previous steps. Also, you can use one script step to form and pass any value to another step
in some table, i had to use script step to convert formula result, because otherways it refused to work properly in “Find records” filter. WIth script, it worked perfect.
Other example, i used small table and it’s top record with Single select to add some interactive actions with current and other tables (update links, create reports), because “Button field” feature lacks some functionality, at least ability to show/hide buttons (that’s why variable called “button” despite it’s a ‘single select’ field):
Sep 01, 2021 12:02 AM
Interesting! I wasn’t aware we could provide values from one script to another within the same automation. I had looked for that feature but couldn’t find any official documentation about it, is it new? Would you have a link to the official doc?
I don’t think it solves the root issue at hand, because it doesn’t really make it any more straightforward to go through such an additional step, and I believe it also complicates things, but that’s still interesting to know, as a workaround. (I’m not sure to understand well how you use it to provide your own custom values, though)
Sep 02, 2021 08:12 AM
I’m not sure about how long it exists here, I’m started to work with airtables and learn javascript in June.
When you change something about input or output data of some step, you have to re-test each step before.
Another case, one time, my new automation step ‘find records’ didn’t work. Actually, it worked, but didn’t find supposed records. That happened because I created it by copying existing one, but select other table&fields. Some filter step became ‘invalid’ several days ago because I had one field error in my base for a short time, but automation config didn’t show that error.
After some useless debug attempts, i just deleted it and created new one, and it worked.
It seems like I can’t understand what the problem with root issue. I just can show an example howTo, hope it will helps anyone reading this topic (sorry for some “ninja-code”, i’m dba, not a developer)
choose trigger, select fields:
use script step
Use desired field values:
name these variables, so you can use them in script instead or getting record from query and get cellValues
you will see possible variables during script input
finally, define script output variable (or several variables):
Use it in next step:
And that’s it: :grinning: