We’re excited to announce a new input method for the scripting block:
input.fileAsync ! This enables script users to upload files, which the script can then use to do things like create or update records.
If you’ve ever wanted to preprocess the data in your files before importing it to your base with the CSV or XML import block, you can now do so with
input.fileAsync ! Because you can access the file contents from inside the script, you could also do things like conditional record creation or custom fuzzy matching to update existing records. We’re excited to see how you can use this to empower your scripts!
The returned value from the file input gives you access to the uploaded File itself, as well as the parsed contents of the file (if supported). Currently, parsing is automatically performed for .csv, .xls, .xlsx, .json, .xml, and .txt files, giving you immediate access to the underlying data. Check out the full documentation for
input.fileAsync in the API reference inside the block, or take a look at the new “Spreadsheet importer” example.
Here’s a quick demo of the file input in action:
Cheers, and happy scripting!
Great stuff! Nice little Happy Friday gift.
I hope all you script block junkies can read between the lines (pun intended) and appreciate what you’re witnessing on a regular basis.
What’s happing here is a reflection of a well-designed and thoughtfully architected scripting platform. Some planned and well-executed design has made it possible for the Airtable team to rapidly develop and test new script features that can be pushed into production with low risk.
This is a team that is now fully engaged to help us help ourselves.