How to Make a Scalable SMS Chatbot Using Twilio, Python, and Google Sheets (with Free Code)
Once you see your phone number listed, make a note of it.
Step 3: Create your Studio Flow
Studio is Twilio’s drag-and-drop editor that lets you create the structure of your conversation. A studio “flow” is just the name of a specific conversation you’ve constructed.
You can get to Twilio Studio by clicking on the Twilio menu again and clicking on “Studio” under “Runtime”.
Create a new flow by clicking “Create a flow”.
When you create a new flow, you’ll be given the option to start from scratch or use one of the built-in options to build your flow for you (although they won’t be as in-depth as the template I’m sharing here).
Posted by R0bin_L0rd
Many of us are helping businesses that are facing hard times, or we’re facing hard times ourselves. If you’re working for a company (or client) that’s in trouble, the use of SMS chatbots could be a way for you to look outside your normal list of solutions and help them succeed in a completely different way. If you’re a marketer looking for work, adding this to your list of skills could mean you keep things ticking along while many of the usual doors are closed — or that you open new doors.
What you’ll get
In this post, I give you instructions and code to produce not just one, but a series of text-based chatbots that can be managed by Google Sheets.
The example here is set up to work with restaurants, but could be adapted to work with any business that needs to receive orders, check them against inventory/menus, and note them down to be fulfilled.
Once the system is set up, there will be no coding necessary to create a new SMS-based chatbot for a new business. Plus, that business will be able to manage key details (like incoming orders and a menu) by simply updating a Google Sheet, making all of this far more accessible than most other options.
But first, some context.
In September 2017, as one of my first big passion projects at Distilled, I wrote a Moz blog post telling people how to make a chatbot and giving away some example code.
This April, I got an email from a man named Alexandre Silvestre. Alex had launched “a non-profit effort to help the local small business owners navigate these challenging times, save as many jobs as possible, and continue to serve our community while helping to flatten the curve.”
This effort began by focusing on restaurants. Alex had found my 2017 post (holy moly, content marketing works!) and asked if I could help his team build a chatbot. We agreed on some basic requirements for the bot:
- It had to work entirely within text message (and if the order was super complicated it had to be able to set up a call directly with the restaurant).
- Running it had to be as close to free as possible.
- Restaurants had to be able to check on orders, update menus, etc., without setting up special accounts.
The solution we agreed on had three parts:
- Twilio (paid): supplies the phone number and handles most of the conversational back-and-forth.
- Google Cloud Functions (semi-free): when a URL is called it runs code (including updating our database for the restaurant) and returns a response.
- Google Sheets (free): our database platform. We have a sheet which lists all of the businesses using our chatbot, and linking off to the individual Google Sheets for each business.
I’ll take you through each of these components in turn and tell you how to work with them.
If you’re coming back to this post, or just need help with one area, feel free to jump to the specific part you’re interested …read more
Source:: Moz Blog