Can OpenAI be connected to Hubspot? Yes! (3-step tutorial)
Quick and easy step-by-step tutorial on how to create lead generation OpenAI assistant and integrate it into your Hubspot CRM using Zapier.
by It's AI Thomas
Saturday, 16 March 2024
In this guide, I'll walk you through a simple 3-step process of creating a custom AI property (new column) in HubSpot, setting up an OpenAI assistant, and connecting these two using Zapier.
For those who enjoy watching videos rather than reading, I’ve also made a short video explaining and showing you everything that you need to know:
Feel free to share this tutorial with your colleagues.
Let's get started.
Step 1 — Create a Custom AI Property in HubSpot CRM
The first step is to create a new column/property in Hubspot, including the AI summary you will generate with OpenAI.
a) Access HubSpot Settings
- Log into your HubSpot account and navigate to the settings icon in the top right corner.
b) Navigate to Properties
- Under settings, find and click on “Data Management,” then select “Properties.”
- Click the “Create a property” button.
c) Create New Property
- For “Object type,” select “Contact.”
- Choose “Contact Information” as your group.
- Label/name your property (e.g., AI Property, AI Assistant, AI Summary) and provide a description.
- This property will store the lead summaries generated by the OpenAI assistant.
- Add a description to explain what this property will include.
- Click “Next”.
e) Select Field Type
- Choose “Rich text” as the field type to allow for extensive text storage, ideal for AI-generated content.
f) Finalize and Create
- Review your settings and click “Create” to finalize the custom AI property.
- If you don’t see the new custom property in your “Contacts” overview on Hubspot, you can add it in the overview by clicking on the “Edit columns”.
- Search for the property you have created and add it to the overview by clicking on the checkbox.
- Click on “Apply” in the bottom left corner.
- Good, you are done!
Step 2 — Create Your OpenAI Assistant
In the second step, you will learn how to create your first OpenAI assistant! You will need the assistant to generate the AI summaries in your Hubspot CRM.
a) Log into OpenAI
- Visit the OpenAI platform and sign in.
- In the dashboard, locate and click on “Assistants.”
b) Create an Assistant
- Click to create a new assistant.
- Name it (e.g., HubSpot AI Property Assistant) and focus on crafting clear, detailed instructions for your assistant.
Here are the instructions for this specific AI assistant summarizing leads:
Context: (You are a helpful assistant. You write down summaries in our CRM system from the data that the leads leave on our website, including the message, name, industry, company name, company size, and country/region of the lead. You write down summaries that help the sales team to be more efficient and uncover important insights.)
Your database inlcuding all the information about the company: (Use only the data from the files uploaded to your knowledge base.)
Style: (Straightforward.)
The target audience of the summary: (Sales team.)
Details: (Don't reference the sources from your knowledge base. The result is the shortest possible summary that retains all of the original meaning and context of the paragraph.)
It’s a little different to write effective instructions for your OpenAI assistant, so if you want to know how to write them and leverage different parameters like prompt engineers do, get my totally FREE no-junk 3P framework here that will save you time and money.
c) Choose a Model
- Select the newer AI model you wish to use.
- You can identify newly launched and tested models by looking at the numbers after the name of the model (for example gpt-3.5-turbo-0125, was tested and launched on the 1st of January).
- However, in this case, I recommend going with the GPT4 “Turbo” model (gpt-4-turbo-preview). You will also not run into problems when the model with the numbers at the end is suddenly depreciated which happens.
Note that you must choose a model that enables you to upload files to your assistant. This is, for example, the “gpt-4-turbo-preview”. Most of the older versions are not going to enable you to upload files which in this automation would lead to worse summaries in Hubspot.
d) Enable Tools
- Activate tools like “Code Interpreter” and “Retrieval” to enhance functionality, such as file uploads.
- The “Retrieval” function enables the assistant to read files you upload.
- Once a file is uploaded, the assistant automatically decides when to retrieve content based on user requests.
Thus, if you want to upload information about your company, features, FAQ, description, pricing and so on, you MUST enable this tool, otherwise, the AI lead summary in Hubspot will not be really helpful.
e) Upload Files and Create The Knowledge Base
- Create a file that will include an overview of your business, including descriptions, FAQs, and more, to help the assistant generate tailored responses.
- After you've activated the “Retrieval” function (I recommend activating both, even the “Code interpreter” function), you should attach a file as your last step by clicking on the “Add” icon.
f) Save and Test
- After configuring, save your assistant.
- Use the “Test” feature to ensure it operates as expected.
- Done! You've successfully created your OpenAI assistant that will summarize your leads in Hubspot for you! The assistant will know all the information about your business too which will enhance its answers.
Step 3 — Automate Workflow with Zapier
Now, you can connect your OpenAI assistant to Hubspot using Zapier.
a) Set Trigger
- Log into Zapier and create a new Zap. This automation will connect your OpenAI assistant with HubSpot CRM.
- Choose “New Form Submission” in HubSpot as the trigger. This initiates the workflow whenever a new lead is captured.
b) Connect Hubspot And Specify The Lead Form
- Link your HubSpot account to Zapier.
- Then select the specific form submissions to monitor.
c) Test Trigger
- Submit a test lead on your website to verify the trigger works correctly.
- Continue with the selected record.
d) Find The New Contact in Hubspot
- Important step, as without this, you won't have the “ID” dynamic variable that will be needed for updating the lead information with the AI summary from OpenAI.
- Choose the “Find Contact” event in your action.
- In the “First property search name”, select the email of the lead as the unique identifier by choosing “Contact information: Email”.
- In the “First search property value”, insert the dynamic variable that contains the email address from your trigger.
e) Retrieve Your OpenAI Assistant
- Choose ChatGPT as your app and select “Conversation with Assistant” as your event.
- In the “Message” write down the prompt inlcuding all the information you have collected through your Hubsopt form on your website.
- The more parameters you include the better the lead summary will be in Hubspot. You can just copy this prompt I've created for you:
Lead Inquiry/Message: {1. Insert the message from your trigger}
Lead name: {2. Insert the firstname from your trigger}
Lead company: {3. Insert the company name from your trigger}
Lead region: {4. Insert the region/country from your trigger}
Lead industry: {5. Insert the industry from your trigger}
Details: (Format the output with HTML breaks and new lines.)
Based on the mentioned parameters, summarize the lead information and provide insights with tips for our sales team.
It’s a little different to write effective instructions for your AI automations in Zapier, so if you want to know how to write them and leverage different parameters like prompt engineers do, get my totally FREE no-junk 3P framework here that will save you time and money.
- Secondly, in the “Assistant” field, select the name of your assistant that you have created on OpenAI before.
- You can leave all the other fields empty, as they are there to create new assistants directly inside Zapier. But as you have already created one on OpenAI's website, you don't need to fill them out.
- The only field I would recommend you fill out is the “Conversation ID” which if provided, this unique value will allow the assistant to continue a conversation from previous messages.
- Use something that won’t change over the course of a conversation, for example, the dynamic variable including lead “Email” address.
f) Update the Contact in Hubspot Using OpenAI Assistant Output
- Choose Hubspot as your app.
- Select “Update Contact” as your event.
- In the “Action” section, firstly, scroll down and retrieve additional properties in Hubspot.
- This is important as the property you have created in the first step is a custom one, so we need to retrieve it as Zapier does not automatically retrieve it.
- Click on “Additional properties to retrieve” and search for the name of your property.
- Lastly, here is where we will use the “ID dynamic variable which we had to retrieve in our first action.
- As the “Object ID” field is required, insert the “ID” dynamic variable from your first action.
You will see that the “ID” dynamic variable from your trigger is actually empty. And that is exactly why we needed to use the “Find Contact” action before.
- In the “Contact Information: AI Property” field (which is the additional custom property that appears after you have retrieved it in Zapier) insert the “Full Response” dynamic variable from your Conversation with Assistant event.
g) Test Your Automation
- Test whether the automation works and see whether the AI property column you have used now includes the OpenAI response.
- Click on the text under the AI property to view the full “Rich text” nicely formatted results.
- Here is the full lead summary text that was generated by the OpenAI assistant:
Lead Information Summary:
- Name: Thomas
- Company: It’s AI Thomas
- Region: United States
- Industry: Apparel & Fashion
- Inquiry/Message: Interested in integrating Popupsland on their e-commerce site, seeking to understand how Popupsland can assist in their particular context.Insights and Sales Team Tips:
1. Customization is Key: Emphasize the customization options of Popupsland, highlighting the importance of catered experiences in the Apparel & Fashion sector which values uniqueness and personal touch.
2. Highlight Success Stories: Share instances where Popupsland has notably benefited fashion and apparel companies, focusing on ROI, increased engagement, and sales uplifts.
3. Engagement & Conversion Features: Detail features such as exit-intent popups, targeted offers, and seasonal campaign capabilities that can specifically benefit It’s AI Thomas in capturing the interest of their user base and driving conversions.
4. Integration Capabilities: Discuss how seamlessly Popupsland can be integrated with existing tools and platforms used by It’s AI Thomas, ensuring a smooth implementation process.
5. Data-Driven Strategies: Highlight the analytics and insights component of Popupsland, which can empower It’s AI Thomas with data to make informed decisions and tailor their customer engagement strategies more effectively.The sales team should approach Thomas with an understanding of the specific challenges and opportunities within the Apparel & Fashion industry and tailor the conversation to show how Popupsland’s features can directly address those points, ensuring a clear value proposition is presented.
- And just like that, you are DONE!
I hope this was helpful, and if it was, please follow and clap for more AI automation tutorials.
You can get this whole automation template with my 53+ other AI automation templates here.
😉➡️ My resources that will help you save time, money, and headaches: https://bit.ly/itsaithomas