How to create a stock price AI Chatbot using Google Sheet

 · 

 · 

3 min read

notion-image
 
 

Create an AI Chatbot that provides up-to-date stock prices

 
Userdesk is a modern AI Chatbot solution. Creating Chatbots with real-time data has been a challenge, but thanks to the latest improvements we made to the platform it is now a reality. If you are looking to feed your AI Chatbot responses with stock prices, analytics data, metrics, revenues, and so on, you are in the right place. In this guide, you will learn how to create an AI Chatbot trained on a Google Sheet, that contains stock prices retrieved from a website.
 

Google Sheet IMPORT functions

 
Surprisingly, Google Sheet contains some powerful functions, like IMPORTHTML IMPORTDATA IMPORTFEED IMPORTXML IMPORTRANGE that allows you to get data from an external source.
 
In our case, we use IMPORTHTML
We simply create a new Google Sheet document (tip, visit sheet.new with your browser), and we add this formula to the first cell.
 
Bash
=IMPORTHTML("https://www.n-tv.de/boersenkurse/Auf_einen_Blick/","Table",1)
 
This formula visits a website page, and extracts the first table.
This is the result:
 
notion image
This table is updated every hour by Google, automatically. We don’t need to do anything. Name the file Stock prices.
 
Now, we need to do three things, connect Google Drive to Userdesk, create a Chatbot and train it on the Google Sheet.
 

Connect Google Drive to Userdesk

Access to Userdesk and click on Google Drive in the left menu.
Click on Connect Google Drive, select your Google Account and approve the Userdesk app to access your Google Drive files.
At this point, you can add your Google Drive files to the files that Userdesk can use to train a Chatbot.
 
 

Train the AI Chatbot on the Google Sheet

It’s time to train your Chatbot on the Google Drive file.
Create a new AI Chatbot or select a previously created one.
Go to the Training data tab, scroll down to the Google Drive section. Select the file and click on Train.
Your AI Chatbot is now ready to reply with stocks prices! 🥳
 

Conclusion

Creating an AI Chatbot the replies with fresh data is a breeze with Userdesk.
You can train the chatbot with your knowledge base, your website, or even PDF files.
The AI Chatbot will use all that information, combined with real-time data, to provide a complete and useful experience to your user.
 
💡
 
LR

Luca Restagno

View Profile