How Salesforge.ai Integrates Rich Prospecting Data With ChatGPT To Automatically Personalize Emails

Despite cold emailing being “dead” for years, it continues to be one of the most profitable channels for businesses to pursue. Our company, Proxycurl, included – we heavily used cold emailing to scale to our first $100k MRR.

However, the age-old challenge persists: how do you stand out in a world where everyone else is trying to stand out? Specifically, with the same medium (email).

The harsh truth about humanity is that people really only care when you benefit them. Further, they only give you a very small window of attention to prove that you can benefit them.

Realistically, the best way to catch attention is to personalize your emails – so that your prospect feels like you’re talking directly to them rather than just being another cold email.

Therefore, the answer to that question is simple, you devote resources to hiring the right people to personalize and pursue clients… but that takes time, money, and energy.

Your sales team members will have to research and come up with new angles to use. Every time they do this, they grow more tired – which leaves less energy for other productive tasks like actually closing deals instead of writing cold emails.

There’s only so much unique and valuable creative thought you can do in one day as a human.

That being said, since the answer to the challenge of getting your cold emails read is personalization, that presents a new challenge:

How do you personalize emails at scale?

In the modern era, the answer lies at the intersection of rich prospecting data and advanced Language Learning Models (LLMs) like ChatGPT, Claude, or LLaMA.

By harnessing the power of detailed B2B data and integrating it with the nuanced personalization capabilities of ChatGPT, businesses can craft emails that not only resonate but also engage, all at an unprecedented scale.

That way your sales team can work on closing deals, and you can outsource the grunt creative work to AI.

Welcome to the future of cold email: where data-driven insights meet linguistic finesse.

Some businesses, like Salesforge.ai, recognized the opportunity of combining rich and actionable prospecting data with ChatGPT and created solutions centered around just that:

Salesforge.ai's homepage and main sales argument

How did they do that?

Good question.

They use our API to enrich contracts uploaded or integrated with the platform, and then they use the data gained from the enrichment we provided, feed it to ChatGPT with sophisticated prompts, and generate personalized emails automatically from it.

It works quite beautifully, if I may say so myself.

Here’s an example of a personalized email made by Salesforce.ai to Nathan Barry, the founder of ConvertKit:

Cold email generated by Salesforge.ai

That information is all fetched using our API, and a lot of it comes from being scraped from LinkedIn (by us):

Part of the information Salesforge.ai was using to write that cold email

You can get even more sophisticated than that, too. That’s just an example.

I actually found them first on Product Hunt before I even knew they used our API. The growth is quite real and it’s deserved, Salesforge.ai is impressive.

That’s why I reached out to Frank Sondors, the founder of Salesforge.ai to get his perspective on:

  • The benefit of personalizing cold emails.
  • Why he created Salesforge.ai
  • How Salesforge.ai works
  • The future of sales & AI
  • More

Luckily for you, he responded to my email and was happy to oblige!

Without further ado...

How Frank Sondors built Salesforge.ai

Q: “Frank,

Are you using the Person Profile Endpoint instead of the Reverse Email Lookup Endpoint to enrich your data?

I noticed you require a LinkedIn URL as well when you could technically accomplish this with just email. Then, you use the enriched results to personalize emails?”

A: "Yes, we use the Person Profile Endpoint. We don't believe that any solution can do 100% reverse look up every email and we care about a 100% match rate, so it's best to ask users to fill out the LinkedIn URL that nearly all databases provide, but it's something we'll look into as we have some other ideas to use Reverse Email Lookup for inbound lead flow.

We use the Personal Profile Endpoint as one of the two datasets to fill the prospective buyer data to do AI computations at any scale.

The 2nd dataset is the seller data and that's the information we ask from the user in-app.”

Q: "Alrighty Frank, now I'm a bit curious -- is ChatGPT your choice of LLM?"

A: "We use GPT 3.5, GPT4, and Claude LLMs and a ton of fine-tuning on top of it, which is our secret sauce."

Who Salesforge.ai is built for

Q: "Gotcha' Frank,

Next, I'd like to ask a couple of problem/solution-fit questions:

  • Who are you targeting?
  • How are you benefiting them?
  • What makes your product stand out in comparison to your competitors (why should someone try you)?”

A: “We're targeting sales development agencies and tech companies where a sales rep typically sends more than 50 emails per day.

Salesforge drives significantly better sales results in email through a higher open rate by solving email deliverability problems and a better reply rate by personalizing each initial email of the sequence.

Unlike competitors who either send templates or do a low volume of personalized emails, we do a high volume of highly personalized emails.”

Why Frank created Salesforge.ai

Q: “Noted Frank,

Targeting large sales teams that want to use personalization at scale. We (Proxycurl) help fit the enrichment aspect that delivers some of the data for that personalization.

Three more questions for you:

First, do you come from a sales background? What gave you the idea to build Salesforge.ai?

Second, what are your plans for the future with Salesforge.ai?

Third and last but not least, how do you see rich B2B data and AI working together to make that happen? (Or if you don't, what do you see working?)”

A: “I've been in B2B sales for over a decade. Last year I led a sales team of 50 and saw a huge problem of how companies including my own engaged with prospects. The were two options, either send a huge volume of templated emails or a small amount of highly personalized emails. Around 99% of all cold emails are actually templated, which results in template fatigue leading to low reply rates of 1%-3%. None of the tools are able to deliver today a high volume of uniquely crafted emails to each individual. So that's why Salesforge was born.

Build out LinkedIn and a dialler as additional channels in the near term. In a year's time, we'll be powering sales organizations leveraging their first-party data and third-party data of similar companies to drive superior conversion rates at scale.

Talking from experience, in the world of marketing technology, big data + AI drives typically drive seven-figure bottom-line improvement per year for midsized companies. Companies are still gradually shifting from rules-based marketing to an AI-based approach, but it's very common to see big data + AI in marketing these days unlike in sales. Though a lot of that will be replicated in the world of sales very soon where machine learning models and generative AI models will come to light. You will have fewer salespeople who generate a lot more sales output at the top of the funnel and bottom of the funnel to drive a significantly better CAC efficiency (Thanks to big data + AI). It's inevitable.

Frank”

Neat. We agree with Frank here at Proxycurl, and we appreciate Salesforge.ai for their time.

If you’d like to give Salesforge.ai a spin, you can click here.

Now that you’ve seen an email personalization tool built that uses our API as a data foundation, I’d like to show you how to build your very own email personalization tool with our API and ChatGPT.

But first, we need to talk about:

What constitutes “rich” prospecting data in our context?

"Rich" prospecting data refers to detailed and actionable information about potential clients.

This includes not just basic contact details, but also insights into a company's industry, size, revenue, key decision-makers, and their pain points.

Rich data provides a holistic view of the prospect, allowing your business to tailor its approach based on specific needs and challenges.

It ensures that businesses say the right thing to the right target audience.

By understanding the pain points and needs of potential clients, we can feed this data to ChatGPT to process and write the solutions for those into our cold emails.

Furthermore, rich data allows for segmentation, enabling businesses to create tailored campaigns for different segments, leading to higher engagement and conversion rates.

It takes something bland and boring such as:

“Hey, is this Chad from AnotherSaaS.com? Are you guys having a problem hiring quality software engineers right now? I can help.”

And turns it into something more like:

“Hey Chad, I couldn’t help but notice the trajectory you guys are growing at over at AnotherSaas.com. I mean seriously, congrats on landing $10,000,000 in seed money. You guys are next up.

Though, I’d assume like many other growing remote SaaS companies you guys are having a bit of difficulty sourcing quality software engineers. That’s a bit of a roadblock I’d like to fix for you.

Do you have 15 minutes to talk by chance?

Thanks.

P.S. How’s the weather in NYC?”

Are you starting to see why a prospect is more likely to respond to the second one rather than the first?

The first could literally be sent to anyone. The second seems specified.

Most datasets, however, are not rich enough to fully take advantage of ChatGPT and feed it the data it needs to truly do its magic.

Thus, a need for enrichment first before it’s ready to be fed to an LLM like ChatGPT.

Building your own email personalization tool with Proxycurl and ChatGPT

Finally, the part you’ve been waiting for. I’m going to preface this section by saying there are several different ways to do this, and several different languages you could use.

For demonstration purposes, I’m going to keep it simple, but you could make this process infinitely more sophisticated (more premium, sexy, and polished) for you or your end user.

Alright, that being said, let’s dive in.

Step 1: Enriching your data

Our API can accomplish several different things, but one thing it certainly does very well is enrichment.

As Salesforge.ai mentioned, they use our Person Profile Endpoint. Using it we can feed it a given linkedin_profile_url and have the enriched result returned.

Salesforge.ai currently does this using .CSV or by manual entry:

Salesforge.ai contact import options

Here’s the information they ask for:

The information Salesforge.ai requests when adding contacts

Using our API, you can accomplish enrichment with only a LinkedIn profile URL and some Python (or your language of choice):


import json,requests

api_key = 'Your_API_Key_Here'

headers = {'Authorization': 'Bearer ' + api_key}

api_endpoint = 'https://nubela.co/proxycurl/api/v2/linkedin'

params = {

    'linkedin_profile_url': 'https://www.linkedin.com/in/williamhgates/',

    'extra': 'include',

    'github_profile_id': 'include',

    'facebook_profile_id': 'include',

    'twitter_profile_id': 'include',

    'personal_contact_number': 'include',

    'personal_email': 'include',

    'inferred_salary': 'include',

    'skills': 'include',

    'use_cache': 'if-present',

    'fallback_to_cache': 'on-error',

}

response = requests.get(api_endpoint, params=params, headers=headers)

result = response.json()

print(json.dumps(result, indent=2))

That returns the following result:

Bill Gates's LinkedIn profile URL enriched with Proxycurl

And more information such as personal email, and personal contact number. The full list of enrichment possibilities per LinkedIn profile URL is available here.

You could also enrich with solely an email, but Frank suggests using our Person Profile Endpoint, so I used that endpoint here.

The above example only shows you how to manually do one contact, though.

You could further automate this process so it could go line by line in a .CSV for instance to do thousands of contacts at once.

Here’s an example of that:


import json

import requests

import csv

# API setup

api_key = 'Your_API_Key_Here'

headers = {'Authorization': 'Bearer ' + api_key}

api_endpoint = 'https://nubela.co/proxycurl/api/v2/linkedin'

# Read the CSV file

input_filename = 'input.csv'

output_filename = 'enriched_data.csv'

enriched_data = []

with open(input_filename, mode='r', newline='', encoding='utf-8') as file:

    reader = csv.DictReader(file)

    for row in reader:

        linkedin_url = row['linkedin_profile_url']

        # Set the parameters for the API request

        params = {

            'linkedin_profile_url': linkedin_url,

            'extra': 'include',

            'github_profile_id': 'include',

            'facebook_profile_id': 'include',

            'twitter_profile_id': 'include',

            'personal_contact_number': 'include',

            'personal_email': 'include',

            'inferred_salary': 'include',

            'skills': 'include',

            'use_cache': 'if-present',

            'fallback_to_cache': 'on-error',

        }

        # Make the API request

        response = requests.get(api_endpoint, params=params, headers=headers)

        result = response.json()

        # Append the enriched data to the list

        enriched_data.append(result)

# Write the enriched data to a new CSV file

with open(output_filename, mode='w', newline='', encoding='utf-8') as file:

    writer = csv.DictWriter(file, fieldnames=enriched_data[0].keys())  # Using the keys from the first item as headers

    writer.writeheader()

    for data in enriched_data:

        writer.writerow(data)

print(f"Enriched data has been saved to {output_filename}")

It uses a .CSV in the same folder as the Python script named “input.csv” formatted like so:


linkedin_profile_url

[https://www.linkedin.com/in/williamhgates/](https://www.linkedin.com/in/williamhgates/)

next profile

The enriched results are then exported to “enriched_data.csv” within the same folder as the Python script.

Enriching data in bulk using some simple Python and the Proxycurl API

You could use Python (or your language of choice) to automate this entire process.

There are several different ways to enrich your data with Proxycurl, and several different formats to export and interpret that enriched data.

These are only two examples out of hundreds of possible options.

Step 2: Feeding your data to ChatGPT and automatically generating personalized emails at scale

Continuing on from our .CSV example, we could take the enriched data that we just exported to “enriched_data.csv” and feed it to ChatGPT through their ChatGPT 3.5 turbo endpoint.

You can see all of the ChatGPT models available via API here.

Here’s a Python example:


import openai
import requests
import json
import csv  # Import the csv module

# Initialize the OpenAI API with your key
openai.api_key = 'Your_OpenAI_API_Key_Here'

def generate_cold_email(data):
    # Extract relevant details
    first_name = data["first_name"]
    headline = data.get("headline", "")
    summary = data.get("summary", "")
    experiences = data.get("experiences", [])
    current_company = experiences[0]["company"] if experiences and isinstance(experiences, list) else "their current company"
    city = data.get("city", "your city")  # Extract city information from the data

    # Construct a chat prompt using the first name, headline, summary, and current company
    messages = [
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user",
         "content": f"My name is Colton, from Proxycurl. Compose a concise and impactful email to {first_name}, whose LinkedIn headline is '{headline}' and summary is '{summary}'. The email should start with a witty but professional joke to catch attention, and then quickly introduce Proxycurl, an API that offers rich data insights. Highlight its direct benefits for sales and marketing teams and explain its potential impact at {current_company}. Start the email subject with the prospect's first name before anything else and do not include my own name in the subject. It should be one paragraph or less to avoid being ignored."}
    ]

    # Call the OpenAI API using gpt-3.5-turbo with the chat interface
    response = openai.ChatCompletion.create(model="gpt-3.5-turbo", messages=messages)

    # Extract the content and format it
    email_content = response.choices[0].message['content'].strip()
    subject, body = email_content.split("\n", 1)  # Split the content into subject and body

    email_content = f"{subject}\n{body}\n\nP.S. What's the weather like out in {city} right now?\n"

    return email_content

def main():
    # Read the enriched_data.csv file
    with open('enriched_data.csv', mode='r', newline='', encoding='utf-8') as file:
        reader = csv.DictReader(file)
        for row in reader:
            # Convert the row (which is an OrderedDict) to a regular dictionary
            linkedin_data = dict(row)
            email_content = generate_cold_email(linkedin_data)
            print(email_content)
            print("--------------------------------------------------")  # Separator for better readability

if __name__ == "__main__":
    main()

That prints out an email using the data we received earlier, here’s an example of an email it printed out when I ran the script:


Subject: Bill, a witty joke and a game-changing API for your sales and marketing teams!

Hi Bill,

Why did the computer go to the doctor? Because it had a virus and needed an injection of "data" medicine! 😄

On a serious note, I hope this email finds you well. I wanted to introduce you to Proxycurl, an API that empowers sales and marketing teams with comprehensive data insights, supercharging their strategies. With Proxycurl, you can unlock accurate and up-to-date information on leads, customers, and competitors, enabling your teams to make smarter decisions and drive growth. Its potential impact at the Bill & Melinda Gates Foundation could be enormous, helping optimize your outreach efforts and enhancing your ability to make a positive difference worldwide. 

Let's connect sometime to explore how Proxycurl can revolutionize your sales and marketing initiatives!

Warm regards,

Colton

P.S. What's the weather like out in Seattle right now?

Plus, it’ll keep going down “enriched_data.csv” and print out emails for all the contacts. Not bad, huh?

Of course, you could improve my prompt and get it to write the paragraphs in a tonality and structure that makes more sense for you (i.e. condensing to one or two paragraphs instead of multiple, making it more conversational).

It should also be noted the part right here:


                  "content": f"My name is Colton, from Proxycurl. Compose a concise and impactful email to {first_name}, whose LinkedIn headline is '{headline}' and summary is '{summary}'. The email should start with a witty but professional joke to catch attention, and then quickly introduce Proxycurl, an API that offers rich data insights. Highlight its direct benefits for sales and marketing teams and explain its potential impact at {current_company}. Start the email subject with the prospect's first name before anything else and do not include my own name in the subject. It should be one paragraph or less to avoid being ignored."}

Could be replaced with variables (outside of the variables we’re pulling from “enriched_data.csv” -- like city name). Common variables used are things like investment figures, education, and beyond.

You could also further enhance this by integrating other APIs, such as a weather API so that you can tell the exact weather in a given city on a given date.

I've skipped this for the sake of avoiding fluff, but you can integrate pretty much all of the variables you'd like to make your emails more personalized and seem very much like it was written by a human.

Things like weather may seem very small, but do add a lot to the legitimacy of a cold email and actually getting it read.

Continuing on, Salesforge.ai also collects this information for their prompts:

How Salesforge.ai collects further information to give its prompt context

That data also goes towards giving your LLM of choice context in your prompt, so that it understands the full scope of what it needs to write.

Step 3: Sending cold emails

This step is a bit outside our area of expertise, but the simplest solution could be something like the following:


import requests
import json
import csv  # Import the csv module
import openai

# Initialize the OpenAI API with your key
openai.api_key = 'Your_OpenAI_API_Key_Here'

def generate_cold_email(data):
    # Extract relevant details
    first_name = data["first_name"]
    headline = data.get("headline", "")
    summary = data.get("summary", "")
    experiences = data.get("experiences", [])
    current_company = experiences[0]["company"] if experiences and isinstance(experiences, list) else "their current company"
    city = data.get("city", "your city")  # Extract city information from the data

    # Construct a chat prompt using the first name, headline, summary, and current company
    messages = [
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user",
         "content": f"My name is Colton, from Proxycurl. Compose a concise and impactful email to {first_name}, whose LinkedIn headline is '{headline}' and summary is '{summary}'. The email should start with a witty but professional joke to catch attention, and then quickly introduce Proxycurl, an API that offers rich data insights. Highlight its direct benefits for sales and marketing teams and explain its potential impact at {current_company}. Start the email subject with the prospect's first name before anything else and do not include my own name in the subject. It should be one paragraph or less to avoid being ignored."}
    ]

    # Call the OpenAI API using gpt-3.5-turbo with the chat interface
    response = openai.ChatCompletion.create(model="gpt-3.5-turbo", messages=messages)

    # Extract the content and format it
    email_content = response.choices[0].message['content'].strip()
    subject, body = email_content.split("\n", 1)  # Split the content into subject and body

    # Append the P.S. line with the city information
    email_content = f"{subject}\n{body}\n\nP.S. What's the weather like out in {city} right now?\n"

    return email_content

def main():
    # Create or overwrite the output.tsv file to store the generated emails
    with open('output.tsv', mode='w', newline='', encoding='utf-8') as outfile:
        fieldnames = ['email_address', 'subject', 'email_body']
        writer = csv.DictWriter(outfile, fieldnames=fieldnames, delimiter='\t')
        writer.writeheader()

        # Read the enriched_data.csv file
        with open('enriched_data.csv', mode='r', newline='', encoding='utf-8') as infile:
            reader = csv.DictReader(infile)
            for row in reader:
                linkedin_data = dict(row)
                email_content = generate_cold_email(linkedin_data)

                # Split the email content into subject and body
                subject, body = email_content.split("\n\n", 1)
                subject = subject.replace("Subject: ", "")
                email_address = linkedin_data.get('personal_emails', 'N/A')

                # Write the email address, subject, and body to the output.tsv file
                writer.writerow({'email_address': email_address, 'subject': subject, 'email_body': body})

    print("Emails have been saved to output.tsv")

if __name__ == "__main__":
    main()

That exports the OpenAI ChatGPT 3.5 turbo responses to a file named “output.tsv” in the following format:


email_address	subject	email_body
['bill.gates@gatesfoundation.org']	Bill, here's how Proxycurl can amplify your Foundation's impact	"Hey Bill,

Here's a little joke to brighten up your day: Why don't scientists trust atoms? Because they make up everything! 😄 

Now that I have your attention, let me introduce you to Proxycurl. We're an API that provides rich data insights on people and companies. Imagine easily identifying potential partners, donors, and influencers, while also gaining key market intelligence. With Proxycurl, your foundation can leverage actionable data to amplify impact and drive positive change. 

Let's schedule a quick call to discuss how Proxycurl can revolutionize your decision-making process and open up new opportunities for the Bill & Melinda Gates Foundation's incredible work. 

Looking forward to connecting with you, Bill!

Best regards,
Colton

P.S. What's the weather like out in Seattle right now?

It’ll automatically keep filling that up as it goes down the “enriched_data.csv” list, and then you could take those emails yourself and load them up in your cold emailing tool of choice.

That’s the simple way.

The way someone like Salesforge.ai does it is by storing specified sequences in a database of their choice and using crontabs to automatically send emails based on time intervals and events.

They call their automated cold emailing process “Sequences”:

Salesforge.ai sequences

In terms of actually sending the emails, I’d suggest using a simple solution like Amazon SES to relay your emails and keep yourself out of the spam folder.

Our personal cold emailing solution here at Proxycurl is using Sendy in combination with Amazon SES – Sendy costs less than $100 one-time, and SES costs $0.10/1000 emails.

We published a full guide on using that stack to cold email here.

But of course, Sendy is only relevant if you’re using cold email for internal purposes, not building a user-facing product.

The recap:

Salesforge.ai is awesome. You can build your own version of Salesforge.ai (specifically, a ChatGPT-powered email personalization tool) with Proxycurl in only three steps.

  1. Enriching your data

In order for LLMs like ChatGPT to be able to personalize our emails we need to feed it a sufficient amount of data for it to do its job.

We can accomplish that with the Proxycurl API.

  1. Feeding your data to ChatGPT and automatically generating personalized emails at scale

Once you’ve taken your prospect list and enriched it, you’ll feed it to ChatGPT through their API.

You can accomplish this in several different ways.

Then using a smart prompt, have ChatGPT write your cold emails and output them in your desired format.

  1. Sending cold emails

Once you’ve outputted the cold emails from ChatGPT you simply need to send it via your desired method.

This may be creating an entirely new front-end with a sequence tool like Salesforce.ai, or, if this is for in-house use it could be as simple as loading the cold emails into Sendy.

The next steps:

If you’re just looking for a simple email personalization tool to use that’s powered by Proxycurl and ChatGPT (plus Claude, and a bit of special sauce), Salesforge.ai is a great tool to check out.

However, if you’re interested in building your own email personalization tool, you’ll want to go directly to the source (us).

To get started, you can create your account for free right here.

Our credit-based pricing system for our API is also available for viewing here.

There’s no other API that compares to ours when it comes to the enrichment of data

The only con really is it takes a software engineer or someone very technically inclined to be able to integrate it with your systems, but that's true for any API.

The added complexity also adds control and power -- there are always trade-offs.

To overly simplify things: Salesforge.ai focuses on powering sales teams, and we focus on powering the applications that power sales teams (and beyond, any applications that require rich data on people and companies).

You can view our API documentation here.

If you'd like the power to build and control your own email personalization tool created exactly to your liking, with us in the background feeding you the rich data you need, the link below is calling your name...

You can click here to create your account now.

Thanks for reading – and here’s to many more personalized emails!

P.S. If you have any questions, please feel free to reach out to us at “hello@nubela.co” and we’ll get you taken care of ASAP.