I am trying to figure out how to run the Field Tweaker scripting app whenever a record is created on a particular table. I have the app working successfully manually but I have not been able to figure it out thus far as part of an automation. I am assuming the code has to be changed slightly to reflect which field I want to tweak and what case but I am not sure if there is anything else I am going to need to do.
Any help or pointers would be greatly appreciated!
The Field Tweaker script was written before scripts could be run in automations. It was also designed to alter multiple records at once, not just one record. Enough of the script would need to be changed (either added, removed, or altered) that you might be better off starting from scratch.
Do you have experience writing code and what is your interest level in learning how to write Airtable scripts? If you want to learn to write Airtable scripts, this could be a good beginner project.
I recommend using Scripting App (versus Automation scripts) to start out because dealing with input/output is much easier in Scripting App. I also recommend starting your script with a completely blank script for your learning process and adding on from there, versus starting with an existing script written by someone else.
Start by writing a script that can input a record, save the current cell value for the field to a variable, and then output the value of the variable. Since this will eventually be an automation script, use
console.log() for your output for now. You will also want variables for the table and the record.
Then add code to that script that tweaks the value of the variable as you want. You might be able to copy a couple of lines from the original script for this. Output the tweaked value using
Add code to the script to update the original record with the new value.
Finally, convert the script to work as an automation script. You will need to learn automation input variables and how to get the record values from the input variable.