I am wrote code (below) inside a Twilio function which utilizes the Airtable API which first looks up a record in specific table (“clients”) in an Airtable base. It then pulls field data from that record (using record.get), and then using JSON in the “Callback”, enables me to utilize that field data later on in my Studio flow. It works perfectly.
What I’m trying to figure out now is how to reverse that procedure. I’d like, once again, to first find the Airtable record. But then, instead of using “record.get” to pull field data in; I would like to write/update fields back into that Airtable record.
In other words, after the line that reads:
“if (record.get(“Client_ID”) === clientnumber)”
instead of the two record.get commands that pull data from the fields, what would the code be to write data (say just a literal string) back to those two fields?
Thanks in advance for any help you might provide!
My Function Code to Fetch Airtable Data Into My Studio Flow