Build an AI-powered lead qualification system


Ready to try this workflow? Click on the Zap template below to get started.

Let’s build a lead qualification system together

 Greetings! Welcome to Zapier’s AI Showcase. This is the build-along session where we’re going to go step by step through how to actually leverage AI in your own automated workflows. 

My name is Ryan Richards. I’m on Zapier’s User Education team, and the thing I love about Zapier is it gives me superpowers. I can literally solve problems that are really big and interesting that otherwise I wouldn’t be able to solve without Zapier. And the thing that I love about my job is that I get to share this superpower with others. So thank you for being here. Welcome. Let’s dig into this.  

New to Zapier? It’s workflow automation software that lets you focus on what matters. Combine user interfaces, data tables, and logic with 6,000+ apps to build and automate anything you can imagine. Sign up for free.

What you’ll learn

So, last week you attended the AI Showcase and you heard from nine different Zapier users about how they’re integrating AI into their own work, getting AI to work for them. Today, it’s your turn. You are going to learn how to build your own automated workflows using Zapier and AI. 

During this build-along in particular, we are going to build an AI chatbot inspired by Sam Ogborn and an AI-powered lead management system inspired by Siqi Chen. The whole thing is going to be just half an hour. 

Before we begin

A few housekeeping items before we go any further.

  1. The first is that this webinar is being recorded. Yes, we will send you the recording when it’s over. You are probably going to ask multiple times, and that’s fine. But yes, this webinar is being recorded and we will send you a copy of the recording when it’s over.

  2. The second is please ask questions. We are here for you. There are a bunch of Zapiens in the chat area down below, waiting with bated breath for your questions. So ask them. If you ask them in the chat area, you may or may not get a response, but in the questions area, that’s where we’re responding. So find us there, ask your questions.  

  3. And finally, if you run into any technical issues with watching this webinar, we recommend Google Chrome. And if you do get any hangups with that, just refresh your page. That should take care of things just fine.  

What we’re going to build

The problem

With that out of the way, let’s look at what we’re going to build today. The scenario is that you have a hot business that’s getting dozens of new signups every hour, hundreds of new signups every day. And that’s a great problem to have. But it’s also a problem because your sales team cannot personally respond to every new lead. And even if they could, they shouldn’t be because not all those leads are even qualified.

So the question is, how might you effectively follow up with these new potential customers at scale?

Our solution

Our solution is to build an automated lead management system, one that captures, qualifies, and nurtures your leads. It’s a pretty elegant system, and AI is woven through and through to make it possible.

So this is what we’re going to build together.

  1. First, we’re going to create a chatbot that captures new leads. We’re going to train it on your company data and brand voice, so the chatbot answers questions correctly, using your brand. And we’re going to enable the chatbot to collect customer contact information and store it in a table

  2. Second—this is where a Zap comes in—every time there’s a new lead in the table that triggers the ZAP,  we’re going to qualify the leads. We’ll have ChatGPT determine if the lead is qualified based upon the type of email address they have. And then we’re going to use a filter step so that the Zap only continues if the lead is qualified. 

  3. Third, we’re going to nurture the qualified leads with a personalized email. You know, a lot of lead nurturing has multiple steps, but this is one of those steps. It’s a very powerful, important step, which is the initial touch point, and it’s going to be a personalized email. And by that, I mean deeply tailored based upon the lead’s company information.

So to do this, we’re going to look up information about the lead using Clearbit, and that’s going to give us their company information. Then we’re going to feed that to ChatGPT and ask it to compose a very personal email. We’re then going to add that email as a draft in Gmail, so it’s ready for a sales team to review and send. 

So this is a pretty elegant system and, at the end of the day, it’s going to allow us to follow up with those leads at scale in a way that’s high quality.  

Let’s get building

All right, so enough prep, let’s just dig in and keep building, all right? 

Step 1: Capture

So our first step is to build the chatbot that’s going to capture new leads and store them in a table.

So I’m going over to my zapier.com website—this is your home—and under Create, we are going to create a chatbot. So we’re going to name this chatbot “Runway assistant.” 

And this is going to  bring us into the chatbot editor. So, we see on the left-hand side, this is where we edit different aspects of the settings of our chatbot. On the right side, we get a preview of what this chatbot is going to look like. Now, we could also go to a live version of the chatbot at this link. Or, if we want to share it or embed it on our website, those are the buttons where we’d go for that.

In setting up our chatbot, the first thing it asks is your name, but also what kind of greeting do you want? Do you want a static greeting, the same message every time? Or a dynamically-generated message every time? Let’s go with dynamically generated. I tend to be really pleased with the copy that that generates. So the greeting prompt, it’s going to greet us and tell us what it can do.

In terms of Model, ChatGPT-3.5 is faster, so we have really quick responses. I prefer ChatGPT-4 because I find that the writing has a little bit more pizzazz and nuance, so that’s what we’re going to choose for this one.

And then Creativity between predictable and random 0.7 seems to be the sweet spot. So we’re going to save these changes.  

Now, we’re going to get into the instructions, and this is where we have the Directive. And, so we’ve got some directive advice here. We’re just going to delete that out and we’re going to paste in our own directive. 

So the Role. You’re a sales chatbot that engages with prospective customers for Runway finance. Your objective is to help customers discover fit, answer customer questions using the attached FAQ data. 

We’ve got information about the brand and the fact that we want styling, like bolding and headers, that just makes it more readable and a little more fun.

And then other role rules, don’t engage on topics not related to runway finance.  It’s just don’t go too far off topic. And then if an answer isn’t found in the FAQ, instead of making them up, direct them to contact our success email address. 

All right, so that’s our prompt. We’re going to save those changes and we’re going to connect to a knowledge source. You can use for your knowledge source a file. It could be a CSV file or a text file. You can also connect, I think, to Microsoft and some other sources of data. I’m going to connect to a Zapier table. I really like Zapier Tables for a knowledge source because we can update dynamically as our FAQ changes. And that’s going to just try and keep our chatbot up to date on our latest content information. 

So to create this data table, I just created a new table and I just copy and pasted for five minutes Runway finances help documentation. So we’ve got article title, article, URL, article, copy, and that’s our table.

So we’re going to connect it to this table, the runway FAQ.  And it takes just a couple of seconds to pay attention there. So now our chatbot is running off of the runway FAQ information, which is super fun as a knowledge source.  

The next thing. So this chatbot is going to do a good job now of interacting with customers, helping them, answering questions, and assess fit.

It’s not yet set up to collect the leads’ contact information. And so that’s what we’re going to do under Actions

So the action type is to collect leads and we want it to collect the name and email address. So we’re going to save those changes. And what it automatically does is create a new Zapier table for us with fields for name and email addresses. So as the chatbot collects contact info, that’s going to just populate with records right there.  

If we wanted to do additional actions, we could. They’re pretty cool, but, at this point, we’re not going to. If we wanted to change the look and feel of our chatbot, we could do that. 

If we wanted to see the history of communications with the chatbot, this is where you do it. And I’ve honestly found this is a really valuable source of customer information, like what questions are customers asking when they don’t think anyone’s looking. You get really valuable insights, almost as valuable as those expensive, labor-intensive customer interviews.

Let’s say you’ve got 20 conversations and you go through and you analyze. You’re like, oh, okay, there’s definitely themes here that we can be improving our documentation or our marketing to help answer those questions for customers. 

All right, so we have set up our chatbot. Now let’s test it here. We could also go to the live version and test it. So let’s see what this looks like.  “Hello there. I’m your friendly Runway Finance chatbot.” It’s dynamically generating this. I love it. “Here’s what I can help you with. Answer questions, help you discover if it’s a good fit. Collect your contact info if you’re interested.”

And so I’m going to say, okay, “I run a small design firm in London. We’re a team of 10. We run our finances on zero. Would Runway be a good fit?”

Let’s see what it says. I don’t know what it’s going to say. “Great to hear from you. Based on your description, Runway could be a fantastic fit with your design firm. Here’s why.” 

And it’s tailored, and it’s got like, tailored teams of all sizes and integration with Xero, custom integrations. All this makes Runway a powerful tool. “Before we continue, may I ask for your name and email address? This will help us follow up with you later.”  

“Sure. Ryan Richards. ryan.richards@zapier.com.”

Now the assistant is thinking for a little bit. It says, thank you. The conversation continues, and we go to this table and it is populated with the lead’s contact information, name, and email. Super cool. Super exciting.  

Alright, so we have successfully set up the capture part of our automated lead management system, a chatbot trained on company data with the company brand voice. We can blast it right on our website that then takes that lead contact information and stores it in a table. 

Step 2: Qualify

So the next thing that we’re going to do is add the qualification step. And with this, our Zap is going to trigger off of each new record that’s added to our table. And then our action is going to be ChatGPT. That is going to classify whether or not the email address that was entered is a business email address or a personal free email address.

And then if it’s a business email address, it’s going to continue the Zap. So that’s going to be our way of qualifying the leads.  

So at this point, I’m going to close our chatbot. We’ve closed those and we’re just going to go to Zapier.com, and we’re going to start building that Zap. So click Create Zap.

Now our trigger is going to be the Zapier table. So if you see it right here, and the event is going to be when there’s a new record that’s added to our table. 

So click Continue, and it’s going to ask which table and it is the collected data Runway, assistant-collected data. That’s our table. 

I’m going to click Continue, and there should be a test record in there because I did fill it out, which gives us a test record.

And so if I click Test, it should have two fields, name and email address. Yes, it does. And the name Ryan Richards in our test record and my email address. All right. So when a new record is added to our table, it will trigger our Zap. Great!  

Next, it’s going to say, okay, what action do you want to do when the Zap triggers? And the first action of our Zap is ChatGPT.  And ChatGPT, you know, you can get all sorts of very powerful things out of just the conversation module where you can have very broad possibilities of like, send it a prompt, it’ll send some sort of response based on what you describe. But there’s these other tools that are more precise, much more specific, and they’re pretty useful too.

So what we want to do is classify. So the classification we want to make, we’re connecting our account. We’re wanting to classify the email address that came from our lead. And we want to classify it as either free email or business email. 

And again, we could compose a prompt that gets it to classify emails as free email versus business email. But the classified text module within ChatGPT or action will do a lot of that thinking for us. And it’s a light lift. So GPT 3.5 turbo should work just fine as our model.

So let’s test it. And since this email address is at zapier.com, this should be categorized as a business email. So we’re testing it and we go down to the category and it says, yes, it’s a business email. Fantastic. That was just what we hoped we would see. 

And the last thing we’re going to do in this lead qualification step is we’re going to add a filter.

And it’s saying, hey, if this step produced the category of business email, then yeah, we want this app to continue. We’ll add that filter and we’re going to say, if this category field contains  business email, then continue.  And it does what we would want it to do, which is this app should continue because the data produced by this ChatGPT step was saying, yeah, it’s a business email.

All right. So that brings us through our lead qualification step.  

Step 3: Nurture

It’s now time to nurture these leads with a personalized email. And, as I said earlier, with lead nurturing, you can have this touch point and then a delay and then this other touch point. Or maybe you have SMS or all sorts of possibilities for lead nurturing.

But for this, it’s just the touch point of reaching out. Hey, saw that you interacted with our chatbot, that you were interested in what we offer. Would love to set up a conversation since it’s a qualified lead. 

So what we’re going to do here is we’re going to look up information about the lead’s company using Clearbit. Clearbit is a business intelligence enrichment tool.  

We’re then going to ask ChatGPT to compose a tailored message. This is forming a bridge between that, that the leads company and what they’re about and what our company is about. 

And finally, we’re going to add that message as a draft email, so our sales team can just go in, review it, make sure everything looks fine. Click send.  

So that is what we are going to be building in this final chunk of our system. We’re going to go back to our Zap, and our next action is going to be Clearbit. And let’s get that set up. 

The event is going to be Find Person or Company. And we’ve got the account set up, and what it needs is an email address. And based on this email address, it’s going to look up the person and the company associated with this email address. And should this be considered a success when nothing is found? I’m going to say No.  

So let’s test this stuff and see what it’s able to find based on my email address. It’s getting information about my name, city, employer. We get things like role and role category. We also get all sorts of information about the company itself. So you can get things like what URLs they own, the sector and industry group, the employee size.

And the field that we’re going to use is company description because that gives a nice summary that will then feed to ChatGPT.  Great. So this gave us what we were hoping for, which is enriching information about our lead who filled out our chatbot. 

After this, we’re gonna just feed this information into ChatGPT and ask ChatGPT to create an email based off of it. 

So that step is going to be ChatGPT and the event is going to be Conversation. So we want to just give a robust prompt. We’re giving you this information, so this with it. So the user message, this is where we’re going to paste in the prompt that I’ve already composed  And then we’ll talk through it.

So, your role ChatGPT is you are a copywriter and your objective is to personalize this template based upon customer information we provide. The result needs to combine the specifics of this person and their business with what we do. 

We got some stuff about tone and then this customer data. We’re going to pull in the customer’s name and this will allow the email template to then say “Dear so and so.”

So we got the name from our table. And then the customer description. We’d probably want to pull in lots of things. So it’d be company description, you know, and maybe we’d want to pull in also the employer, employee’s role, some more things like that. But at this point, just those fields we find, and then we have information about the template that ChatGPT is supposed to tailor, so it gives them just a high-level overview.

We want the extra, extra sizzle of ChatGPT-4, so that’s the model we’re going to use for this step. And the rest of this stuff all looks fine. 

So we’re going to click Continue and this should hopefully produce a pretty good email template that the sales team can then leverage.

All right. So we’re going to go in and see what that message looks like. “Hey Ryan, caught sight of your signup and boy, am I excited.” Yeah, I would probably, if I was a salesperson, I’d probably remove “and boy am I excited.” But like, hey, I’m excited. 

“We had adored the chance to introduce you to Runway and find out how we can pump up the workflow game for Zapier with over 6,000 app integrations under your belt. You guys are basically the superheroes of automation.” 

Why do they use the term superheroes? Awesome. And “we, well, we got a knack for turning these sorts of chores into a total breeze. No capes needed.” 

You know, that’s like some, that’s some decent copy with some decent hooks there. So then, hey, here’s my calendar, let’s set up a meeting. 

Yeah, I think that’s pretty good email copy. All right. 

So the very last thing. We’re going to take this output from ChatGPT and feed it into an email. So it’s a draft email. So we’re going to, our company and our scenario uses Gmail and the event, we’re just going to create a draft. And so the subject line is going to be “Runway demo.” 

And who’s it going to go to? It’s going to go to the person whose email was in this message. And then who, the person who filled out our form. And then, in terms of the body of the email, this is where we’re going to take the output from our most recent ChatGPT step, and that’s going to populate in right there. 

You’d probably want to finetune some of these other things, you know, do some testing to make sure it’s the right email signature to look good. But this is basically it, right?  

So now we’re going to test this, and it should create a draft email. And it says, yep, we created a draft email. I’m actually going to go into my drafts folder and see if it’s there, and there it is.  

“Hey Ryan, got your signup. and boy, am I excited!” So the sales team, they can just go in,  give it a quick skim, maybe make some tweaks, maybe not, hit send. Boom. They followed up with their qualified lead. I think it’s super cool. Okay, so all of this is looking just as we’d want it.

So we’re going to go ahead and publish this Zap. And I’m going to actually rename it as well. It’s always, when you have lots of Zaps, the more you automate, the more you continue to automate. I’ll change it to “Chatbot follow up with leads.” 

Alright, so we’ve done it. In less than half an hour, we have built a lead management system that truly allows you to follow up with a high volume of leads at scale, which is really exciting. 

What you can do next

Now, this is also just the foundation of a much richer Zap and Zap system that one might build. 

So, if you want to build on this, maybe you’d want to add an additional qualification step based on. Let’s say from Clearbit, you get, let’s say you really care about company size and industry. You’re like, we only work with big enterprise companies in tech and finance. Well, you could add another qualification step here that then further limits down to whether or not the lead is qualified. 

I’d probably also add a table step here to update the root lead record, because once you get down to this step, you have pulled in a lot of information about this lead and you’d want to store that somewhere. So why not just add that to the lead record as additional columns? 

And then lastly, I would add a Slack step to notify my sales team. Like, Hey, this lead just came in, here’s a link to the drafts folder for our company for the team email outbox. Go in, review, send, and that just would allow them to have a more timely followup. 

But yeah, it’s a great foundation for building, ultimately, your own customized lead management system. 

Start building unstoppable workflows

So that was a lot. We built a lead management system and, more importantly, you learned concrete ways that you can be leveraging AI in your work today, building automated workflows that are unbreakable and unstoppable.

Automation with AI truly is a superpower and I cannot wait to see what you build next. All right, y’all, that is it. Thanks again for being here. Happy automating. Keep learning. See you later. 

Leave a Reply

Your email address will not be published. Required fields are marked *