Hey all, Stephen from the scripting block team here. Today we’re releasing a bunch of updates to the scripting block, based on all of your helpful feedback from the beta. To get access to the latest changes, you’ll need to reload your browser or Airtable desktop app.
Note that some of these are breaking changes and you will need to update your existing scripts accordingly — sorry for the inconvenience; these should be the last breaking changes before we launch the block more broadly.
-
Breaking:
input.text()
andinput.buttons()
have been renamed toinput.textAsync()
andinput.buttonsAsync()
. This means you need to prefix them with theawait
keyword. -
Breaking:
output.text()
is now plain-text only, but accepts values other than just strings. Useoutput.markdown()
if you want to output Markdown. - Breaking: all methods will validate their inputs — if you pass input to Airtable functions that don’t match the documented values, your script will now error.
- Custom script names have been removed. You can still label a script by renaming the entire block (you can do this by double clicking the block name).
-
output.markdown()
has been added for outputting Markdown-formatted strings. - You can now get information about the user who’s running your script by using
session.currentUser
. -
fetch
is now recognized in the editor. - Stack traces now have accurate line numbers in Chrome and Firefox.
- New input methods for requesting Airtable models:
input.tableAsync()
,input.viewAsync()
,input.fieldAsync()
, andinput.recordAsync()
will prompt the user to choose a table, view, field, or record. - Added
record.name
for getting the primary cell value of a record.
Keep sharing your scripts, questions, and feedback with us — happy scripting!