Help

Re: Scripting: Mail Merge with Lob.com

1292 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Bill_Carovano
6 - Interface Innovator
6 - Interface Innovator

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

4 Replies 4

Great solution; easy to understand and nice video.

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

Bill_Carovano
6 - Interface Innovator
6 - Interface Innovator

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

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.

Home_Now
4 - Data Explorer
4 - Data Explorer

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?