Cold Email Personalization with AI
Tags: ai, lowcode, marketing, automation
Published: 2023-11-09 23:48:22



Hi! In this article, I will explain how the AI framework LangChain can significantly enhance the quality of your cold email outreach by making it unique and personalized. I will also discuss how to automate this entire process with minimal costs using a low-code platform and share ready-made templates for a quick start.

## Personalization vs Automation 

There's a natural tension between personalization and automation. Non-personalized, generic emails are easy to automate but often result in low engagement and conversion rates. In contrast, highly personalized emails increase engagement but are difficult to automate.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jqr1qmzhj3638ya9vj8d.png)



Cold email platforms now help solve this issue with dynamic variables that add a personalized touch to automated emails. These variables act as placeholders for inserting personalized words, lines, or paragraphs.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2pc5q5yvtmt5nmu6u1zv.png)



Dynamic variables allow companies to balance personalization and automation efficiently. Today, we'll create a LangChain scenario on the low-code platform Latenode to generate a customized cold email icebreaker for each contact in our outreach database using the following tools:

  - The free data enrichment tool ClearBit 
  - The free low-code platform Latenode 
  - OpenAI's extremely cheap API.

##  Step 1: enrich emails w/ ClearBit

Let's start with a Google Sheet containing basic email addresses. I've included some of my work emails as real examples (please refrain from sending me personalized cold emails after reading this! :) )
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4gsfuh7ibqtjavu33by3.png)



First, we need to enrich these emails with data about the recipients. For our outreach, we need to know:

  - The first name 
  - The company name 
  - The company description 

You could manually visit each email domain to gather this information, but if you have hundreds or thousands of emails in your database, that's not practical. Instead, we can automate this task using the low-code platform Latenode. We link our Google Sheet there and use the ClearBit API to fill in the missing information. Here's how it works:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yn03k833fr4u45d2e9tj.png)
Don't worry! You don't have to create everything from the beginning. Simply copy the scenario I provide at the end of this article. The basic steps of this automation are:
- Identify the rows that need enrichment.
- Extract the email from each row.
- Send the email to ClearBit and receive all the related information.
- Enter the required information back into the Google Sheet.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a21ccnsnknb30egqc4tr.gif)
That's it. We've enriched our emails with essential details like the company description. Now, let's craft a personalized icebreaker to kick off our cold emails and establish a personal connection right from the start.



## Step 2: generate personalized icebreaker w/ ChatGPT 

Giving a compliment about what your recipient does at their workplace is the very least you can do. Additionally, you could tailor your outreach reason based on the company's profile. You can do this with another Latenode scenario, which you'll be able to copy later.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rweaf315hx8ruxw7zuaq.png)



Its main steps are:

  - Retrieve the company description from your Google Sheet.
  - Send this description to ChatGPT using the OpenAI API with a custom prompt tailored to your needs.
  - Refine the AI-generated output with another request and a different prompt.
  - Place the final result in the row corresponding to the person you're reaching out to.

By doing this, we attach a personalized icebreaker to each individual, creating another custom variable in addition to their first name and company name. This trio should suffice for a start. Let's look at how this functions:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0svmh482rce1vbhke95u.gif)



## Step 3: upload spreadsheet to cold email platform w/ Apollo 

First, download your spreadsheet as a CSV file. Then, upload it to your email platform as a new list. I'll demonstrate using Apollo, but the process is similar in other tools.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dps95mcjxuur60rbxm4p.png)



The next steps are pretty standard – map the fields and assign a variable to each. The key variable for us is the custom "icebreaker" field.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sitvv1kju732gnmjm5h4.png)
Now, when composing an email for a prospect, it works like this:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nnisuquvrsr5jxq7j7os.png)




That's all for now. You can adjust the prompts sent to GPT in your Latenode scenario to achieve any level of cold email customization. These Latenode templates are versatile for any cold outreach scenario, including personalized LinkedIn messages.

⭐ As promised, here is the link to Discord server where you can copy my scenarios: [Template Library](https://discord.gg/mcZRPHN9eb)

You just need to paste them into [app.latenode.com](app.latenode.com) and input your API keys for ClearBit (which is free) and OpenAI (which is very affordable). Latenode itself is also free and has a supportive community where the team is always ready to help with your automation journey.