How to create an AI chatbot for HR payroll analysis

Josh Barkin
Botsheets

--

It’s no secret that you can leverage AI to streamline HR processes and significantly enhance productivity. One area where AI can make a substantial impact is payroll analysis.

In this tutorial, we’ll walk you through building an AI chatbot tailored for HR payroll analysis using a Google Sheets dataset connected to Botsheets.

If you have an existing database and can sync, or manually import a CSV to Google Sheets, or you simply manage a spreadsheet with employee data natively in Google Sheets, that’s all you need to create an AI chatbot for yourself, or to share with your team.

What You’ll Need

  • A Google Sheets dataset with employee payroll information. You can use this free example dataset.
  • A free Botsheets account.

Step-by-Step Guide

You don’t need any technical knowledge, or chatbot design experience to create an AI analysis chatbot. Once you have a dataset, you can simply connect it to a chatbot in a few simple steps.

1. Prepare Your Dataset

Start by creating your dataset in Google Sheets. A dataset is a collection of data that is organized into columns and rows. Column headers are data points and any rows of data below the headers are corresponding values. It provides structure to data that is easy for AI to understand, but also easy for you to manage.

You could have a small handlful of data rows, or several thousand rows of data in a single Google Sheet. When you connect a dataset in Google Sheets, your chatbot uses Google Sheets as a no-code database. There are a number of use cases for AI data analysis and where you could use a Google Sheet as a data source, but an employee dataset is a perfect example.

2. Set up a free account with Botsheets

Sign in with your Google Account with Botsheets. If you’re an agency, or plan for a team to access the Botsheets dashboard, you’ll want to create or use a Google Account that you can share with others, unless you feel comfortable providing someone else login access to your own Google account.

You first provide basic access to your Google profile, but then Botsheets will request additional permissions.

Botsheets needs full permissions so it can not only read your data, but also write data to Google Sheets. Your organization’s data is private and secure so Botsheets will never access or use any file on your Google Drive unless you explicitly share it with Botsheets. All requested permissions are required and must be selected for Botsheets to work.

If you don’t select it and proceed, you’ll be prompted to provide permissions again. Once you provide the necessary permissions, you’ll be taken to our dashboard where you can create new chatbots, or access ones you have already created.

3. Connect Your Google Sheet to Botsheets

You’ll need to get a link to your Google Sheet so you can paste it into Botsheets and create the chatbot, so in Google Sheets, just click the Share button in the top right corner and click Copy Link. Note that if the Google Sheet was created with a different Google Account and stored on a different Google Drive than the one you signed into Botsheets with, you’ll need to change the share settings so that Anyone with the link can access it. Don’t worry, only Botsheets will access the sheet and your data is secure providing you don’t share the link publicly.

Now, while there are two types of chatbots you can create with Botsheets, choose the Data Analysis bot.

When you click the Create Chatbot button select Add Your Own from the dropdown menu and paste in the link to the Google Sheet. Then click the green Create Chatbot button.

That’s it! Your chatbot is ready to test out with payroll analysis queries. Think of some example questions to guide your chatbot’s responses.

  • “What is the tax code of John Doe?”
  • “How many hours did Emily Davis work last period?”
  • “What are the year-to-date earnings for Linda Clark?”
  • “What is the gross salary of James Taylor for the current pay period?”
  • “What is the PAYE liability for Sarah Wilson this month?”

You can see here I just sent a message to rank employees by salary and the chatbot output a table:

Here you can see that I asked it to plot the data from the table in a pie graph, but I only asked for the the top 10 otherwise the visualization would be quite messy.

Botsheets will even give you easy access to the image so you can dowload it, or paste into a document such as a presentation. Just click the little arrow in the bottom right corner of the visualization and the image will open in a new browser window.

If you want to change the visualization, just ask it to change it. Here I told the bot I wanted a bar graph and only to use blue bars.

Before deploying, or sharing your chatbot, thoroughly test it to ensure it accurately responds to queries based on the dataset. Use various test cases and scenarios to validate its functionality.

While the chatbot has a default greeting message, if you plan to share it with others, just customize the greeting message in Bot Settings > Rules

Here you can see that I added some example questions people accessing the chatbot might want to ask in order to get a response.

When you’re ready to share it, just click Share Bot in the left navigation and you’ll be presented with options to share a direct link, add a widget to the bottom right corner a webpage, or you can embed it directly in the middle of a page. You just copy the code snippet and share it, or paste it into your HTML if you’re publishing it within an existing website.

Utilizing our AI-powered chatbot to analyze payroll information for employees you’ll get valuable insights into your workforce. Our sample dataset includes detailed information on employees, such as:

  • Employee ID: A unique identifier for each employee.
  • Name: The full name of the employee.
  • Job Title: The job title or position of the employee.
  • Department: The department where the employee works.
  • Tax Code: The tax code assigned to the employee.
  • Hours Worked (Last Period): The number of hours the employee worked in the last pay period.
  • YTD Earnings: Year-to-date earnings for the employee.
  • PAYE Liability (Current Month): The Pay As You Earn (PAYE) liability for the current month.
  • Gross Salary: The gross salary for the current pay period.
  • Deductions: Total deductions for the current pay period.
  • Net Salary: The net salary after deductions for the current pay period.

You can add your own datapoints as well. Remember though, just make sure that you have a row of column headers and at least one row of data. Avoid blank rows of data too.

Want to try it out? You can play around with our example here.

Conclusion

Building an AI chatbot for HR payroll analysis can greatly improve your HR department’s efficiency. By following these steps and utilizing the provided dataset, you can create a powerful tool for analyzing and managing payroll information.

Feel free to reach out if you have any questions or need further assistance in setting up your AI chatbot! As you can see though, it’s quite easy so get started free at Botsheets.com

--

--