Hey there! If you’re looking to automate your lead scoring process by analyzing email content, you’re in the right place. In this guide, I’ll walk you through setting up an AI-powered lead scoring system using Make, OpenAI’s Embeddings API, and Airtable. We’ll break it down step by step, so you can have this up and running in about 1.5 hours. Let’s dive in!
Introduction
Manually scoring leads can be time-consuming and inconsistent. By leveraging AI, we can automate this process, ensuring that every lead is evaluated based on the content of their emails. This not only saves time but also ensures a standardized approach to lead qualification.
Step-by-Step Guide
1. Set Up Your Airtable Base
First, we’ll create an Airtable base to store incoming leads and their scores.
- Fields to Include:
Email_Content
(Long Text): To store the content of the lead’s email.Lead_Score
(Number): To store the AI-generated score.Qualified_Status
(Single Select): Options like “Qualified,” “Unqualified,” or “Needs Review.”
Ensure your Airtable base is set up with these fields to capture and process lead information effectively.
2. Connect Airtable to Make
Next, we’ll set up a trigger in Make to monitor new records in Airtable.
- Module: Airtable – “Watch Records”
- Configuration:
- Base: Select your Airtable base.
- Table: Choose the table where leads are stored.
- Trigger: Set to monitor when a new record is created.
This setup ensures that every new lead added to Airtable triggers the automation process.
3. Extract Email Content
Once a new lead is detected, we’ll extract the email content for processing.
- Module: Text Parser – “Extract Text”
- Configuration:
- Input: Map the
Email_Content
field from Airtable. - Output: Store the extracted text for the next step.
This module ensures that the email content is ready for analysis.
4. Generate Embeddings with OpenAI
Now, we’ll use OpenAI’s Embeddings API to convert the email content into numerical vectors.
- Module: HTTP – “Make an API Call”
- Configuration:
- URL:
https://api.openai.com/v1/embeddings
- Method: POST
- Headers:
Authorization
:Bearer YOUR_OPENAI_API_KEY
Content-Type
:application/json
- Body:
{ "input": "{{Extracted_Text}}", "model": "text-embedding-ada-002" }
Replace YOUR_OPENAI_API_KEY
with your actual OpenAI API key. This call will return the embeddings for the email content.
5. Calculate Lead Score
With the embeddings, we can now calculate a lead score. This step involves comparing the email’s embeddings to a predefined ideal lead profile.
- Module: Math – “Calculate Expression”
- Configuration:
- Expression: Use a cosine similarity formula to compare the email embeddings to your ideal lead profile embeddings.
- Variables: Map the embeddings from the previous step and your ideal profile embeddings.
The result will be a numerical score indicating how closely the lead’s email matches your ideal profile.
6. Update Airtable with Lead Score
Finally, we’ll update the Airtable record with the calculated lead score.
- Module: Airtable – “Update Record”
- Configuration:
- Base: Select your Airtable base.
- Table: Choose the table where leads are stored.
- Record ID: Map the Record ID from the trigger module.
- Fields to Update:
Lead_Score
: Map the calculated score.Qualified_Status
: Set based on score thresholds (e.g., “Qualified” if score > 0.8).
This step ensures that your Airtable base reflects the AI-generated lead scores and statuses.
Optional Enhancements
- Automate Follow-Up Actions: Based on the
Qualified_Status
, trigger automated emails or assign tasks to sales reps. - Integrate with CRM: Sync qualified leads to your CRM system for seamless sales processes.
- Continuous Learning: Periodically update your ideal lead profile embeddings based on successful conversions to improve scoring accuracy.
By following these steps, you’ll have an automated system that evaluates and scores leads based on their email content, allowing your sales team to focus on the most promising prospects. Happy automating!