Introducing Replit Teams: How modern teams build software. Read the announcement
Replit AI
Collaboration
CDE
Deployments
TeamsPricingGuidesBlogCareers
Contact salesLog inStart building
  • Teams
  • Pricing
  • Guides
  • Blog
  • Careers
Contact salesLog in
Start building
GuidesHow to Build an AI Sales Development Representative (SDR) in Slack - Part 2: Email Enrichment

How to Build an AI Sales Development Representative (SDR) in Slack - Part 2: Email Enrichment

A guide by
Image of Horacio LopezHoracio Lopez
Cover page with title "Build an AI SDR - Part 2" Sales character with Apollo.io and Clay.com icons
Get a demoTry for free
Table of ContentsIntroductionGetting StartedBreaking Down the AI Sales Assistant CodeDeploying Your AI SDRWhat's Next for Your AI Sales Assistant
Recent Posts
Slackbot Quickstart Guide
How to Build Your Own Simple Poll Slack App
AI Support Specialist With Groq - Part I
Get Availability from Google Calendar

Introduction #

In this second part of our AI SDR series, we'll enhance our AI sales assistant with email enrichment capabilities. This powerful feature transforms our free AI tool for lead generation into a comprehensive AI-powered lead qualification system. By the end of this guide, your AI SDR will not only find potential leads but also verify and enrich their email addresses.

This guide is Part 2 of a six-part series for how to build your own AI SDR (Sales Development Representative) in Slack. This template includes the code from Part 1 and the subsequent guides are linked at the bottom of this post.

Getting Started #

To begin enhancing your AI sales assistant, fork this template by clicking "Use Template" below:

Use the template

Deploy a Clay Table as an API

For this enhanced version of our AI for lead generation, if you want to use Clay for your enrichment flow, you'll need to follow this Guide to learn how to turn a Clay table into a hosted API.

Once you adapt the table to return email addresses from LinkedIn profiles, add this key to your Replit Secrets as INTERNAL_CLAY_API_KEY. This should be the Authorization key used in your Clay API.

Also, your deployment URL to your Replit Secrets as CLAY_LINKEDIN_TO_EMAIL_API_URL. This is the URL that you get after deploying your Clay API.

Breaking Down the AI Sales Assistant Code #

Let's explore the key components that make our AI SDR a more powerful tool for lead generation and qualification:

Email Enrichment Process

The enrich_leads function in utils.py is the core of our email enrichment process:

This function takes the initial leads data and enriches it with verified email addresses, a crucial step in qualifying leads for your sales team.

Handling Enrichment Requests

In main.py, we've added a new function to handle lead enrichment requests:

This function allows users to initiate the email enrichment process directly from Slack, making our AI sales assistant more interactive and user-friendly.

Improved Lead Generation Flow

We've updated the main lead generation function to include an option for email enrichment:

This updated flow allows the AI sales assistant to not only generate leads but also offer immediate email enrichment, enhancing the lead qualification process.

Deploying Your AI SDR #

In order to keep your AI SDR running 24/7 and receive requests whenever someone mentions it in Slack, you'll need to deploy it on a hosted server.

Open a new tab in the Workspace and search for “Deployments” or open the control console by typing ⌘ + K (or Ctrl + K) and type "deploy". You should find a screen like this.

Replit Deployments selection UI

For bots like this that need always need to be up listening to requests, we recommend using a Reserved VM. On the next screen, click Approve and configure build settings most internal bots work fine with the default machine settings but if you need more power later, you can always come back and change these settings later. You can monitor your usage and billing at any time at: replit.com/usage.

On the next screen, you’ll be able to set your primary domain and edit the Secrets that will be in your production deployment. Usually, we keep these settings as they are.

Finally, click Deploy and watch your bot go live!

What's Next for Your AI Sales Assistant #

In the next part of this series, we'll be adding the ability for the assistant to create and draft an email campaign for your generated lead list using OpenAI. The other parts of the series include:

  • AI SDR - Part 1 - Lead List Creation
  • AI SDR - Part 2 (this guide) - Lead Enrichment
  • AI SDR - Part 3 - Draft Email Copy
  • AI SDR - Part 4 - Create Smartlead campaign
  • AI SDR - Part 5 - Add Leads to HubSpot
  • AI SDR - Part 6 (Final) - Agent Mode

If you'd like to discuss how to enable your team to build and implement tools like these, feel free to schedule some time with the Replit team for a quick demo of our product.

Happy coding and selling!

Replit

  • Mobile App
  • Desktop App
  • Blog
  • Careers
  • About
  • Pricing
  • Guides

Features

  • Replit AI
  • Collaboration
  • CDE
  • Deployments
  • Teams

Legal

  • Terms of service
  • Teams agreement
  • Privacy
  • Subprocessors
  • DPA
  • US Student DPA
  • Student privacy
  • Report abuse

Connect

  • X / Twitter
  • Tiktok
  • Facebook
  • Instagram
  • Linkedin

Languages

  • Python
  • Javascript
  • TypeScript
  • Node.js
  • Nix (Beta)
  • HTML, CSS, JS
  • C++
  • GoLang

Handy Links

  • Languages
  • Docs
  • Help
  • Forum
  • Status
  • Import from Glitch
  • Import from Heroku
  • Copilot alternative
  • Brand kit
  • Partnerships
All rights reserved. Copyright © 2024 Replit, Inc.