How to generate dynamic galleries inside ManyChat and manage content from Google Sheets

Eugene Smirnov
Chatbots Life
Published in
5 min readApr 16, 2020

--

Restaurants are closing but the ones that switch to takeout and delivery won’t go out of business. Having a Messenger bot will be a real game-changer for restaurants, bars, pizzerias or grocery stores in today’s circumstances.

But sometimes, managing bot content is not as easy as it looks, especially if content changes frequently, e.g. restaurant or pizzeria menu. And adding, removing or changing menu items every day, manually, can be time-consuming. Using a ManyChat bot with Botsheets will make content management much easier.

Let’s do it with the pizza ordering and delivery bot template and set it all up in your ManyChat. The template dynamically generates items using data and pictures added/changed in Google Sheets.

Step 1.

Get this Google Sheets template and make a copy so you can edit it for personal purposes. This 👇 short videocast may help.

Step 2.

Paste the link of your Google Sheets template into your ManyChat bot.

👉 Manychat/Settings/Custom Fields/Bot Fields/PizzaDelivery_Sheet_URL

Step 3.

Get a Botsheets key and paste it into the Bot_Sheets_Key field. You’ll need to generate your free key using Botsheets Facebook Messenger chatbot.

Step 4.

Set up the native Google Sheets integration and connect your account.

Now is the time to check out the connection between ManyChat and Google Sheets template.

Step 5.

Find the flow under the number 3 — ‘Vegetarian pizza’ flow and click ‘Edit’ at one of them. In the dynamic content block, you’ll need to have values as on screenshots below ⤵️

and add Full Subscriber Data in the ‘Body’ tab.

When it is done you can test your request by clicking on ‘Test the request’ button. If everything is done correctly you will get a response like that 👇👇

Step 6.

Repeat Step 5 with the ‘Non-Vegetarian pizza’ flow:

Step 7. Almost Done!

Now the only thing is left 🚀 — customize your Google Sheets template and adapt menu items for your pizzeria, bar, restaurant…

  • Column ‘active’ is responsible to make a current item active or not active
  • Column ‘title’ is an item of your menu in a ManyChat gallery
  • Column ‘subtitle’ is an item description
  • Column ‘image’ is a picture of an appropriate item
  • Columns ‘addButton1’, ‘addButton2’, ‘addButton3’ connect 3 buttons to each card of the gallery
  • Columns ‘button1Caption’, ‘button2Caption’, ‘button3Caption’ display button titles
  • Columns ‘button1Target’, ‘button2Target’, ‘button3Target’ link to a specific ManyChat flow. You can get a flow ID in your Manychat dashboard by navigating to the specific flow and then viewing the URL.

Here is an example:

  • Columns ‘button1Action’, ‘button2Action’, ‘button3Action’ set up custom field values. Choose ‘set_field_value’ and add it twice, separated by commas. These will save values for ‘button1ActionName’, ‘button2ActionName’, ‘button3ActionName’ custom fields.
  • Columns ‘button1ActionName’, ‘button2ActionName’, ‘button3ActionName’ set the values for custom fields Pizza, Pizza price, Pizza size when clicking on the appropriate button in the gallery.
  • Columns ‘button1ActionValue’, ‘button2ActionValue’, ‘button3ActionValue’ are the actual values for these custom fields.

Trending Chatbot Tutorials

1. How to create an intelligent chatbot in Python

2. Building a Weather Chatbot with RASA NLU and RASA Core

3. Building an Instagram Bot with Python and Selenium to Gain More Followers

4. Chatbot Conference 2020

💡 Example: When clicking on Pepperoni mid-size pizza for $15.99, the ‘button2ActionValue’ — Pepperoni, mid-size, 15.99 will set up values for Pizza, Pizza size, Pizza price custom fields for the ‘button2ActionName’ column and send data back to the ManyChat.

Also, you can get more information on how Botsheets works here.

❗ Please note, if you rename sheets, you will need to add an appropriate title to the ‘sheetName’ key.

All these customizations you will only need to check once, after installing and connecting the template. 🔄 Then you just activate or deactivate items available on today’s menu and change the price if necessary.

The information is updated on your ManyChat bot real-time!

Don’t forget to give us your 👏 !

About the author

Eugene Smirnov is the Head of Templates Production at Botmakers with 3 years of experience in the business and Customer Success at https://driverjobs4u.com/.

Contributor at Chatbots Magazine, Chatbots Life, Chatbot Tutorials chatbot media.

Eugene eventually reads every response on Medium. You can chat him up on LinkedIn or email at eugene@botmakers.net if you have any related questions.

--

--