image
452
blog

At BotSailor, we have listened to your feedback and introduced a simple but very useful and powerful feature that allows you to fetch Google Sheet data and use them in Chatbot replies. This feature can be used in all our messaging channels, including Webchat.

For example, if you run a business offering services like plumbing, electrical work, and other household solutions, you can seamlessly provide relevant contact information through your WhatsApp chatbot. When a customer inquires about a plumber, the chatbot can automatically collect relevant data like the contact person's name and phone number, ensuring a smooth and efficient user experience. Google Sheet data fetch is available for WhatsApp, Facebook Messenger, Instagram DM, Telegram, and native Webchat. This means the feature is compatible with all messaging channels supported by BotSailor.

 

In this article, I will show you how to fetch data instantly from the Google Sheet and store it in the custom fields that are used in the reply.

 

Step 1: (Creating Custom Fields)

First, you need to create custom fields to store the data fetched from Google Sheets.

  1. From the BotSailor’s dashboard, go to Subscriber Manager and then select Manage Custom Fields from the Manage option.
  2. Click on the Create button, give a name to the Custom field, and select the type of the custom field.

You can create as many custom fields as you need.

 

 

Step 2: (Connecting Google account to BotSailor)

Before we access the Google Sheets data fetch for chatbot replies, we must connect a Google account and link up the Google Sheet to BotSailor.

  1. Go to Settings from the BotSailor’s dashboard. 
  2. Click on the Google Sheet Integration and then click on “Sign in with Google” and then just log in to your Google account.
  3. Then add the existing sheet that you want to use to fetch data. Or you can create a new one. Click on the Create New Sheet or Add Existing Sheet to create a new sheet and add any existing sheets.

 

To learn more about how to create or import a Google Sheet, you can read the given blog.

How to connect a Google account and import Sheets to BotSailor



Step 3: (Create a campaign for fetching data)

Now that we have connected the Google account and imported the Google Sheets from where we want to fetch data for chatbot replies, we need to create a campaign to fetch data.

I will do this with an example sheet to help you better understand. I have a list of service providers for different kinds of services. If a customer is asking for a plumber, the bot will look at the Google Sheet to search for the word “plumber” and fetch the plumber’s name and contact numbers from that row to use in the bot replies.



  1. From the Settings, go to Google Sheet Fetch Data and select WhatsApp Data Fetch Campaign.
  2. Click on the Create button, then give a name to the API and select the Google Sheet from which you want to fetch data.
  3. Now you have to Map Data. The first one is for Search Data, the campaign will search for a row with data to find the row, and then it will fetch data from that particular row and store them to custom fields. We can search using the Subscriber ID/WhatsApp Phone number or by using the message of the subscriber. In this case we are going to find the row with a message from the customer. Select the file header (Google sheet column name) and on the data field let’s select “Subscriber Message”.
  4. Now, go to the Assign part, select the file header as Plumber Name, and on the “Data Field,” select the custom field where you want to save the data. Later, we will use this custom filed in the message body.
  5. Let’s click on a the “Map Data” button to get one more mapping field. Select the “Plumber Phone number” from the file header, and on the “Data Field” select the custom field where you want to save the data.
  6. On this instance we only need these 2 data, you can add as many data as you need.
  7. Finally, click on the Verify Connection button.



 

Step 4: (Create a chatbot and use Google Sheet Data Fetch Campaign)

Now that we have created the campaign for fetching Google Sheet data, we can use it to fetch data from the sheet and incorporate it into bot replies. Let’s see how to do that. In the bot flow, we will use an interactive element, add three buttons, and specify button texts that will be used to search the sheet and select a row. We will add “Plumber,” “Electrician,” and “Cleaner” as the button options. As we already know, button text functions as a message from the subscribers. The campaign will search for the message in the sheet, and if it finds a matching row, it will fetch the data and save it to custom fields. And the custom field data will be used in the reply.

 

  1. Go to WhatsApp Bot Manager from the BotSailor’s dashboard and select Bot Reply and click on the Create button.  
  2.  Provide keywords and assign a name to the bot. Add a Text Reply to the bot, in the reply ask your subscribers to provide the service name that they are looking for from your available services. Ask users to mention the services they are looking for like, Plumber, electrician, household, cleaner.
  3.  Now, you need to create another bot including those services as keywords. And add the Google Sheet Data Fetch element to this bot. 
  4. Double click on the Google Sheet Data Fetch and select the campaign that we have just created.
  5. Now, let’s add a text reply and use custom fields in the text reply, the custom fields will receive the data from the google sheet and use them in the reply as variables






This is an example of how we can use the Google Sheets data fetch feature on BotSailor. The feature can be used in many different ways, depending on your needs. If you need to change the data, you can do so directly in the Google Sheet without altering the bot's replies.

 

BotSailor can really make things easy and straightforward for everyone wanting to integrate Google Sheets data into chatbot responses. It is a very powerful feature that allows you to streamline communication across all messaging channels including WhatsApp, Messenger, Instagram DM, Telegram and Webchat.

From managing service providers to product inventories and personalized interactions with customers, this feature will ensure efficiency and flexibility for a better user experience as well as operational productivity. Sign up and start using BotSailor's Google Sheet integration right away to increase the way you manage chatbot communications!


Related Blogs:

How to Import WhatsApp Contacts from a Google Sheet to BotSailor

 

 

image

Kamrul Hasan

23 Dec 2024
  • Categories :

  • How to

(0) Comments

Related Articles

Stay ahead of the curve with BotSailor`s latest articles. Dive into expert analyses, industry trends, and actionable tips to optimize your experience. Explore our articles now and unlock the full potential of your business.

blog

How to set up the WhatsApp Cloud API with BotSailor

BotSailor is a complete WhatsApp marketing automation; it has chatbot, live chat, broadcasting, Shopify & WooCommerc...

READ MORE
blog

Send WooCommerce Order Notifications to WhatsApp by BotSailor Webhook Workflow

You can send Woocommerce Order Notifications to customers via WhatsApp by BotSailor in a very easy and straightforward w...

READ MORE
blog

Launch Your SaaS with BotSailor White Label Chatbot Marketing

What is BotSailor? Basically, BotSailor is a comprehensive AI chatbot marketing platform for instant messaging apps lik...

READ MORE