Save the date! Join us on October 16 for our Product Ops launch event. Register here.
Mar 01, 2020 07:54 PM
I created a script that takes data from a table to perform a mail merge using the Lob.com service.
The share on Airtable Universe includes the scripting block code as well as an instructional video.
-Bill
Mar 02, 2020 07:18 AM
Great solution; easy to understand and nice video.
Just curious - why use the field IDs instead of the field names?
Mar 02, 2020 07:41 AM
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.
-Bill
Mar 02, 2020 09:29 AM
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. :winking_face: The upcoming release with new field-level security will defend against chaos.
Cool solution - simple, elegant.
Mar 25, 2022 03:16 PM
Hi @Bill_Carovano. I was wondering if you thought it was possible to have a script within airtable be able to send out different lob templates based on what you wrote in an airtable row. For example. Lets say I added in the address like your script suggets. But that in addition, there was a column for Lob template ID # (assume there are 7 Lob templates). Do you think its possible for the script to be updated with if statements to have the script look for which module # it should send and then send only that one?