Scripting: Mail Merge with

I created a script that takes data from a table to perform a mail merge using the service.

The share on Airtable Universe includes the scripting block code as well as an instructional video.



Great solution; easy to understand and nice video.

Just curious - why use the field IDs instead of the field names?

Hi Bill - I decided to use field ID’s because I wanted to make the script resilient to future changes to the table’s field names.

For example, if someone changes the “First Name” field name to “Contact First Name” later, then the script will keep working fine if I’ve coded it to use field IDs. However, if I hard-coded the “First Name” field in the script, then a change in the field name will break the script.


Got it. I guess I was thinking short term when I watched the video.

I was envisioning the process as a one-off for a given mail-merge project, but this is not the case for most users - once they set this up and make the necessary script edits, it’s a sustainable block going forward and impervious to field name changes unless, of course, the field itself is changed in a way that wholly abandons the original intent of the field in the first place. Some users will do this at some point and chaos will ensue. :wink: The upcoming release with new field-level security will defend against chaos.

Cool solution - simple, elegant.

1 Like