Build a Q+A Bot Using a Spreadsheet

All Tutorials


When you finish this tutorial, you'll be able to:

  • Set up a Slack bot command that answers natural queries, using only a spreadsheet.
  • Use Google Sheet functions and =BLOCKSPRING() to build dynamic functionality into your command.

Build a Q+A Bot Using a Spreadsheet

In this tutorial, we're going to use a Google Sheet to program a bot that responds to natural language queries. There is no coding required. As long as you know how to use a spreadsheet, you're golden. For this specific example, let's create a bot command that answers customer support questions.


Program bot

First copy this spreadsheet to your Google Drive account.


Raw data

Next go to the VLookup block. Make sure to sign in with Blockspring, and then sign in with Google, and select Slack as your tool of choice in Step 2.


Vlookup

Now click the Create Slack Command button.


Create vlookup

Give your command a name. Pro-tip: you're not allowed to have spaces in the command name.


Name vlookup

Grab your spreadsheet ID from Google Sheets. It's in the spreadsheet URL.


Url id

Paste the URL ID into Blockspring. Then click on the second input, and choose the sheet ID where we have our support data. In this case it's Sheet 1.


Sheet id

Enter a sample search question and click Run. If you see the answer you want, then you've selected set up your bot to get data from Google Sheets.


Run vlookup

Now you need to set up how you'll use your command. Since you just want to ask a question, under Lookup, choose User. This means this input will be user defined in the command.


Choose inputs vlookup

The command preview should look like this. If so, click Add to Slack.


Preview vlookup

Next, you can enable the command from one of the Slack teams you're already in. Remember, this doesn't add more than 1 /blockspring integration. You're just adding a new command to an existing slash integration.


Add permissions

Go wild! Paste /blockspring support supported languages into your Slack team and you'll get the result of your new natural language command! Easy right?


Test vlookup



That's a Wrap

Thanks for using this tutorial. We'd love to hear your feedback!

  • Did something not make sense at all or think you have a better way to explain a concept?
  • Maybe you want some more information about how to make Blockspring work for you?

Let us know in the chat window below or on Blockspring-Community Slack in the #slack-bot channel.
(Email us for a Slack invitation)