I am trying to use the new Airtable Automation to update record. I have a form that captures updated information whil I am auditing a computer. This information is stored in a table called Encryption Audits. I want to use airtable’s built in automation to update a separate table with any information that has changed. Encryption Log is the name of this table. When I try and set it up to update, I get “received invalid input.” I am attemptimg to take the fields from the encryption audit table and update my encryption log table with this information. Even tried just having it update the record with text I typed in manually. All attempts end with invalid input. Any help would be much appreciated.
Airtable Automation- Update Record
Best answer by Kamille_Parks11
Your step failed because your test passed “G5ZJCP2” as the value for the Record ID. That is not a Record ID.
You need a “Run a script” action step before your “Update record” step to filter your Encryption Log records to {Serial # or Service Tag #} = "G5ZJCP2"
For the script to work you’ll need a script input variable, set it up like so:
“Input variable name”: tag => “Input variable value”: Record (Step 1: Trigger) ... {Serial # or Service Tag #}
Then edit the script to be something like this:
const tag = input.config().tag
const logTable = base.getTable("Encryption Log")
const logQuery = await logTable.selectRecorsAsync()
const logRecords = logQuery.records
const matchesFound = logRecords.filter(x => {
return x.getCellValue("Serial # or Service Tag #") == tag
})
output.set('logID', matchesFound[0].id)
Then use the output from the script (logID) as the Record ID for your “Update record” step.
This is all assuming your Audit Records aren’t linked to your Log records (even though they probably should be). If your records are being linked together when someone fills out the form, you can solve this with a simple Formula Field/Lookup Field setup and avoid writing a script altogether.
Login to the community
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.

