Prioritization is everything, so lead qualification is critical for sales and marketing.
But lead scoring systems can often leave out qualitative information—such as open-ended responses—that would give a more accurate analysis of a prospect's potential value.
With Zapier and OpenAI (makers of ChatGPT), you can analyze and prioritize prospects based on numbers and insights without slowing down your sales pipeline. Our automated workflows called Zaps let you connect your essential apps to AI and thousands of other tools.
In this tutorial, you'll learn how to connect OpenAI to your existing lead management tools so you can better prioritize your prospects.
Looking for GPT-4? GPT-4 may be available with our OpenAI integration in the future. In the meantime, users with a paid subscription to ChatGPT Plus—or users are Pay-As-You-Go customers—can access GPT-4 via our ChatGPT integration now—allowing you to add ChatGPT-powered conversations into apps like Slack. Discover popular ways to use the ChatGPT Zapier integration.
Before you begin
For this tutorial, I'll be using Typeform for incoming leads. Be sure your form includes criteria that you use to prioritize leads. For example, you may ask leads to provide an estimated budget, select a specific service, or describe their request in an open-ended response.
I'm also using OpenAI's GPT-3 to analyze each submission and Google Sheets to store my lead data—along with OpenAI's priority notes.
If you use different apps, don't worry—you can still follow along because the same concepts will apply. Make sure your form (or another lead source) has at least one submission and your spreadsheet or database is already set up with named columns.
You'll also need an OpenAI account and an API key. If you don't have an OpenAI account yet, creating one is free. Once you create your API key, make sure to save it in a password manager because you won't be able to retrieve it again.
How to analyze leads with OpenAI's GPT and Zapier
You can create your own Zap from scratch with our point-and-click editor, but we also have quick templates to get you started.
To get started with a Zap template—what we call our pre-made workflows—just click on the button. It only takes a few minutes to set up. You can read more about setting up Zaps here.
Here's how to set it up:
Set up your form trigger
First, set up your trigger—the event that starts a Zap.
If you're creating a Zap from scratch, select the form app and event you want to use. The event will usually be something like New Entry or New Submission. Click Continue.
Next, connect your form app to Zapier. If you haven't connected it to Zapier before, click on the dropdown, and select + Connect a new account. Otherwise, select your account from the dropdown and click Continue.
For each app you connect, Zapier will ask for a general set of permissions which allows you to be flexible with your Zaps. The only actions Zapier takes on your app accounts are those a given Zap needs to accomplish what you've set up.
Then, select the form you'd like to use and click Continue. We'll need an existing form submission to set up the rest of this Zap, so click Test trigger.
If your test is successful, you'll see the contents of your form submission. Click Continue.
Connect to OpenAI and customize your prompt
Next, add your OpenAI action, which is the event your Zap performs once it's triggered.
If you're using our Zap template, the action and event will be selected for you already. If you're building a Zap from scratch, search for and select OpenAI as the app, Send Prompt as the event, and click Continue.
Connect your OpenAI account to Zapier if you haven't before. The editor will prompt you to provide an API key, which you created and saved earlier.
Once you've connected your account, click Continue.
Now for the most important part: we need to give OpenAI instructions, or a prompt, for what we want it to do.
This prompt will consist of three parts:
The specific piece of instruction we want GPT-3 to accomplish. In the example below, we want GPT-3 to analyze the submission and return a priority level.
Examples to teach GPT-3 what we consider "high," "medium," and "low" priority. In the example below, I didn't use specific selection options. Instead, I'm giving the AI context for what I consider high priority.
Data from the form submission we want OpenAI to analyze. You don't need to include every selection option from your form, just the data that you want OpenAI to make a judgment on.
Note: I included an instruction for GPT-3 to remove periods when returning a priority. While I can applaud AI's use of grammar, it might mess with dropdowns or selection items in your spreadsheet or database.
Notice that the example and submission parts of the prompt have headings. This will help the AI differentiate between a real submission and an example.
Learn more: How to write an effective GPT-3 prompt
Beneath the submission, make sure to map values from your form trigger. This is how you'll send form submissions to OpenAI to analyze. Just click inside the Prompt field and select values from your trigger to use.
In the example below, I mapped the service my lead requested and the open-ended response requesting more details about their request urgency.
A dynamic value is any data from a previous Zap step that you've mapped to a field in the Zap editor. When you map a dynamic value—such as a contact name—what you see in the editor is a placeholder. Field mapping dynamic values are how you pass data from one app to another. Once your Zap is turned on, Zapier will send the information that the field contains every time your Zap runs.
By default, the Maximum Length for the prompt is set to 256. If you anticipate that your prompt and the results OpenAI generates will exceed this, you can increase this.
Tokens help OpenAI's GPT-3 (Generative Pre-trained Transformer 3) language models assign meaning and predict the next likely text. Tokens are about four characters long, on average. You can use OpenAI's Tokenizer tool to see how many tokens your prompt uses.
Once you're done customizing your prompt, click Continue and test your action.
If it's successful, be sure to look closely at the results. You want to make sure that OpenAI made an accurate analysis based on your instructions. I also recommend checking beneath Usage to see how many tokens your prompt used to make sure nothing was cut off.
If you feel OpenAI's analysis was a little off, you can go back to the previous step, adjust your prompt, and retest it until you're happy with the outcome. Then click Continue.
Set up your spreadsheet action
Now let's set up the final step of this workflow, which will create a new spreadsheet row with the form submission details and OpenAI's priority analysis.
If you're using a Zap template, Google Sheets will already be pre-selected for you. If you're creating a Zap from scratch, click the plus-button in the editor to add another step to your Zap.
Then, search for and select Google Sheets as the app, Create Spreadsheet Row as the event, and click Continue.
Connect your Google account to Zapier (or select an existing account) and click Continue.
Once you select the specific Google Drive, spreadsheet, and worksheet you'd like to use in your Zap, the Zap editor will expand to show fields that correspond to the named columns in your Google Sheet.
Start mapping values from your form trigger to the corresponding spreadsheet columns by clicking in each field and selecting the appropriate value from the data dropdown.
Note: Choices Text has now changed to Response in the dropdown menu.
Don't forget to map the results from your OpenAI prompt too. In the example below, I have a priority column in my sheet, so I want to map the AI result there.
When you're finished customizing your action, click Continue.
Then, test your action. Zapier will create a new row in your spreadsheet, according to how you set it up. You'll see a success message if the test is successful.
Check your spreadsheet to make sure everything looks correct.
If not, tweak any steps in your Zap to get the desired result, and then make sure your Zap is on!
Qualify and prioritize leads with OpenAI and Zapier
Let AI and automation do the lead analysis so you can focus on closing sales. With Zapier, you can connect OpenAI to the essential processes that keep your business running.