Mailerlite > GoogleSheets (or Airtable)

  • 16 November 2022
  • 3 replies

Hello Everyone,

Hoping we can get some guidance on where to start.

In short, we are offering a free personality assessment through our website. Our intention is that people can use a Mailerlite form to enter their name + email address which will trigger a workflow/automation with an email that gives them a personalized code (which the master list can be housed either in GoogleSheets or Airtable, as we use both) - this code is then used to enter the personality assessment and is unique to only them.

The integration we are looking for is that everytime a new name+email is entered, that the first email they receive from Mailerlite pulls from the GoogleSheet/Airtable master list and assigns a unique code with each email sent. 

We are unsure of how to start integration and where the unique code could “live” in the email workflow/template (perhaps a custom field?).

Our first attempt was to create a WooCommerce product with variables, but that didn’t work.

Any guidance would be greatly appreciated.


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

3 replies

Userlevel 7
Badge +12

Hi @JanBonhoeffer!

There are a couple of ways that I can think to create a unique code for each person. The place to start is this article: Different ways to create a unique random string in your Zap


In the article, @jesse explains how to use the Formatter by Zapier app to create a randomly generated number. Although it’s statistically unlikely that the same number will come up twice, if you wanted to be certain, you could perhaps take some part of the persons name (eg the first three letters) and add that to the randomly generated number. A comment on that article provides code that you can use in Code by Zapier  to generate a unique ID, that would do exactly what you’re looking for, but the ID would be a long string and if you’d like to change anything in the code, that’s not something that Zapier would be able to support you with. 


Once you’ve decided how to generate the code in the Zap, you can add an action that will add that ID into Airtable (or whichever app you choose). 


For the Mailerlite side of things, are you using MailerLite or MailerLite classic? It sounds like you will need to add the ID as a custom variable in an email that sends as part of an automation. 


I hope that helps, let us know if you have any questions!

Thank you so much for your reply.

I’m afraid my request may not have been clear enough.

We have a list of codes already. The part we are struggling with is how to get the code (which already lives in the Google Sheet - as outlined from another helpful article in this community) into an automated email using Mailerlite (reg, not classic version)

So, if we are to understand correctly, we take the first 2 steps from the article “Sending Unique Coupon Codes to your customers”, but then for Action 3 to send coupon code, we need to figure out the Mailerlite option that updates subscriber info (custom id field)? And then how to get the GoogleSheet (or Airtable) to update the code from “NO” (under USED) to say there a way to replace it with the name+email of the subscriber?


Thanks again for your reply, just trying to narrow this down properly.


Userlevel 7
Badge +11

Hi @JanBonhoeffer!

I don’t have a Mailerlite account to test this with at the moment, but here’s the general idea:

Trigger: Mailerlite — New Subscriber
Action: Airtable — Find Record (search within a view that contains available codes, by a “used?” field, making sure it’s empty or says no)
Action: Mailerlite — Create/Update Subscriber (update a custom field with this code)
Action: Airtable — Update Record (use the record ID from the search above, update the field that specifies whether it’s used and maybe include a separate field for “used by” to add name+email)

In Mailerlite, you’d want some sort of delay before the email gets sent, to make sure themZap has enough time to update that custom field with the personalized code.

Without being able to test it out, that’s my best guess at how you could pull this off. Hope that helps!