This tutorial will be a step by step guide to setting up a Beekeeper Chatbot that can be used to retrieve files from Google Drive. While it will focus on Google Drive specifically, this functionality can be made possible with OneDrive, Box, DropBox and much, much more.
By the end of this tutorial you will know how to configure your Beekeeper tenant for seamless access to all of your most important documents and files through a simple Beekeeper Chat.
Initial Knowledge and Resources
This tutorial assumes that you have visited our Beekeeper Zapier page and have the following:
- An admin enabled, user visible Beekeeper Bot
- A Premium subscription to your Zapier Account (this chatbot requires Multi-Step Zaps)
- NOTE: If you are interested in trialing this functionality before subscribing to a Premium Zapier Account, they do offer a 14-day free trial of Premium features
- A Google Drive account that you use to store useful files
Chat Trigger Setup
1.) Open Zapier and begin creating a new Zap by clicking Make a Zap! in the upper right hand corner of the window. This will open the Zapier setup page and it will ask you to Choose App & Event.
For our Chatbot, we will want this Zap to be triggered when somebody sends the bot a message in Beekeeper. Thus, using the opening dialog, select the Beekeeper App and the (Instant) New Chat Message Trigger Event.
2.) Once you arrive at the Choose Account page, connect the Zap to your own Beekeeper tenant using your domain and Bot Token.
It's highly recommended to create a dedicated Beekeeper Bot as reusing existing bots can mess with existing functionality. In this example, we've created a dedicated bot called Google Drive Chatbot.
3.) Next you will be at the Find Data page. Before selecting either test option (if you do so now, with a brand new bot, the test will fail and return no data), open your Beekeeper tenant.
4.) In your Beekeeper tenant, create a new direct message with the bot you selected in step 2, and send the bot a message. For example, Hello Google Drive Chatbot:
5.) Return to Zapier and (if your message has not already populated,) select one of the two Test options. Once you see a message appear in the Find Data section, confirm the bot is registering new chats by checking the text field. As you can see the text in message A below is Hello Google Drive Chatbot.
6.) Click Done Editing and move on to setting up Google Drive!
Google Drive Connection
1.) With the next action you must choose another App and Action Event. For this select the Google Drive App and the Find a File option in the Search section.
This is also a good opportunity to scroll through the other Google Drive Action Events to see versatility that Google Drive's integration can offer! While this tutorial is a simple use case for retrieving a specific file, Zapier offers the power to upload files, create folders, edit permissions, and much more.
2.) In the Choose Account page, select the Google Drive account you wish to pull documents from or Add a New Account if the desired drive is not in the dropdown.
3.) In the Customize File page is where we begin to set up the core functionality of our file retriever. Of the four available fields only File Name is required. Use the insert a field button on the right side of the input field to see the data generated by the Beekeeper Chat.
4.) For this chatbot, we want a user to be able to request a file by simply typing the name of the file into a chat message with the bot. To build this functionality we want to select the Message Text field from the (Instant) New Chat Message in Beekeeper section.
NOTE: This bot is rather rigid in requiring that user must know the name of the file they are looking for. Thus, in this Zap I have used the Folder field to specify a folder in my Google Drive that contains just the files that, one, users know the name of, and two, users need to access. (In this example, we have named that folder Zapier Files)
5.) On the Send Data page, check to make sure that the initial test chat text is in the File Name field and any other customizations are reflected in the data. Here is a good opportunity to take an extra moment to enter Google Drive and create a file with a name exactly like the initial test message.
Unless a file with that name exists, either Test & Review and Test & Continue buttons are going to successfully query Google Drive, but neither will return an actual file.
6.) Once you create that file, retest the data and see if a file is returned.
NOTE: When searching for a file, Google ignores extensions if omitted (testFile will return testFile.pdf) and is case blind (TeStFiLe will return testFile.pdf).
7.) Now that a file has successfully been identified, finish editing the second step of the Zapier and add a final step by clicking the plus directly beneath the Find a File in Google Drive step.
Returning Data to Beekeeper
1.) Set up this step just like the Chat Trigger Setup, except for the Choose Action Event select Send Reply to Chat.
2.) Make sure that the Beekeeper account you select for Choose Account is the same bot that you created in the Chat Trigger Setup.
3.) Once the Customize Message template populates, the first thing to populate is the Chat Conversation field. Select the Use a Custom Value (advanced), option and in the new Custom Value for Chat Conversation ID field, select Conversation ID from the (Instant) New Chat Message in Beekeeper section.
4.) Mix and match your own text with available data fields from both the Beekeeper step and the Google Drive step. In my template, I've used the fields from Beekeeper's Sender's Display Name, Google Drive's Title, and Google Drive's Alternate Link.
5.) Move onto the Send Data step and test the bot.
6.) If successful, check the initial beekeeper chat for the response!
7.) Once Zapier has logged a successful test, a tab should appear at the bottom of the page with the option to turn the Zap on. Use this tab or the toggle in the upper right of the page to turn your Zap on and fully realize the power of Zapier based Chatbots!
NOTE: While the action name suggests that the chatbot will be immediate, for free Zapier accounts, delays up to 15 minutes may be experience.