Code, Tutorials and Hacks
Chatbots are programs that communicate some way with humans. They can be very basic, responding to keywords or phrases, or use something like Twilio Autopilot to take advantage of natural language understanding (NLU) to provide a richer experience and build out more complicated conversations.
In this tutorial we are going to see how easy it is to get started building chatbots for WhatsApp using the Twilio API for WhatsApp and the Ruby web framework Sinatra. Here's an example of the conversation we're going to build:
What you'll need
To build your own WhatsApp bot along with this tutorial, you will need the following:
- Ruby and Bundler installed
- ngrok so we can expose our local webhook endpoints to the world in style
- A WhatsApp account
- A Twilio account (if you don't have one, sign up for a new Twilio account here and receive $10 credit when you upgrade)
IVR stands for Interactive Voice Response system. It's a way for you to communicate with your users over the phone. IVR is operated by voice and by the DTMF tones that phones produce when pressing keys on the keypad.
Just like your web site, mobile app or chatbot, IVR is another way for you to interact with your users. IVR holds a unique set of features that makes it ideal under some circumstances:
- Visual impairments: Users that rely on screen readers to navigate websites and mobile apps are used to interact with voice based interfaces.
- No Internet access: Users in remote areas or in places where an Internet connection is not constantly available or very expensive.
- Technologically challenged: Users that have trouble dealing with websites and apps, like the elderly, often find IVR much easier to operate.
- No access to smartphones or a computer: Users that …
The mobile penetration rate in the world is currently estimated at 4.68 billion mobile phone users and according to a report by Statista, the number is projected to increase even further in 2020. This increase coupled with other factors, such as the advancement of Artificial intelligence, particularly Machine learning, and the underlying technologies such as natural language processing, has made chatbots become very popular and necessary.
What is a chatbot and why is it important?
A chatbot is a software or program that is designed to simulate conversation or chat with human users through text messages, virtual platforms integrated into websites, applications, and instant messengers.
Chatbots help to streamline and automate customer support by getting rid of tedious tasks, thereby enhancing customer experience. They also give companies room to implement new marketing ideas that can improve customer conversion rates.
In this tutorial, we are going to learn first hand …
In my last tutorial, I showed you how to add chat to a Laravel app using Twilio Chat. In this tutorial, I’ll be showing you how to enhance the app by adding media support to it using Twilio Programmable Chat. That is, allowing users to send media files as message.
In order to follow this tutorial, you will need the following:
- Composer installed on your local machine
- Basic knowledge of the Laravel Framework
- Basic knowledge of Vue.js
- A Twilio account
Getting Twilio Credentials
Login to your Twilio dashboard and copy both your ACCOUNT SID and AUTH TOKEN.
Before you can start using the Twilio Programmable Chat, you need to first create a chat service:
Take note of your SERVICE SID.
Lastly, you need to create an API key:
Also, take note of both your API SECRET and API SID.
To make …
Stripe is a payment gateway that provides developer APIs to help you receive payments from your application/website.
The Twilio API for WhatsApp provides a platform that helps you send any type of business message via WhatsApp through a streamlined API.
In this tutorial, we will be exploring how to send payment invoices and notifications to our users via WhatsApp when they make payments on our website.
To follow along with this post, you will need the following:
- A Twilio account (Sign up for a free account now)
- Composer, Ngrok and Laravel CLI installed on your machine
- Knowledge of the Laravel framework
- A Stripe account
To get started, create a new Laravel application and assign the folder name.
$ laravel new twilio-commerce && cd twilio-commerce
The Web Speech API has two functions, speech synthesis, otherwise known as text to speech, and speech recognition, or speech to text. We previously investigated text to speech so let's take a look at how browsers handle recognising and transcribing speech with the
Being able to take voice commands from users means you can create more immersive interfaces and users like using their voice. In 2018, Google reported that 27% of the global online population is using voice search on mobile. With speech recognition in the browser you can enable users to speak to your site across everything from a voice search to creating an interactive bot as part of the application.
Let's see how the API works and what we can build with it.
What you'll need
We're going to build an example app to experience the API, if you want to build along …
Packages primarily provide a way to add functionality to your Laravel applications and can serve as a great way of decoupling your application. The great thing about building packages is that they can easily be reused. In this tutorial, we’ll be looking at how to get started with building a Laravel package. We’ll be building a package that allows you to generate random fake data specifically in the first names, last names and email fields for a user; a simpler version of the popular Faker PHP Library. Interestingly, down the line we will make use of the same Faker Library to generate seed data.
To follow along, you’ll need the following:
- PHP Development Environment
- Composer globally installed
Setting up a New Package
To get started setting up a new Laravel package, we’ll be using Composer. From the terminal,
cd into your project’s directory and run the following …
A mailing list is a great way to share information with a group of people. Google Forms provides the tools needed to handle subscriptions to a mailing list. In this tutorial we will build a Google Form that is backed by a Google Spreadsheet. The spreadsheet will be used as a storage mechanism for a list of subscribers. Then we will create a Python script that reads the spreadsheet and finally we will use the Twilio SendGrid Python client to send emails to all subscribers.
Working through this tutorial will require access to the following items:
- Python 3.6 or newer. If your operating system does not provide a Python interpreter, you can go to python.org to download an installer.
- A Google account.
- A Twilio SendGrid account. A free SendGrid account allows you to send up to 100 emails per day forever. Sign-up here.
Create a Python …
AWS Lambda is a serverless computing platform that enables you to run programs in response to events without having to configure and administer servers. The code that runs on AWS Lambda in response to an event is called a Lambda function.
With AWS Lambda Layers you can separate your function code from its dependencies so you won't have to upload them on every change of your code. A Lambda Layer is a ZIP archive that contains libraries, a custom runtime, or other dependencies. With Layers, you can use libraries without needing to include them in your deployment package. You can share layers across multiple Lambda functions, and moving runtime dependencies into layers can drastically reduce the size of your deployment package.
The Twilio Node Helper Library lets you write Node.js code to make HTTP requests to the Twilio API. Including the Twilio Node Helper Library in the code you deploy …
The Internet of Things (IoT) has the potential to touch not only every industry, but also most everyday aspects of our lives. As a software developer, I’m excited about how low the barrier of entry is considering the low cost of IoT hardware and the wide availability of development tools in the open-source ecosystem.
In this article, I want to show you how to build an IoT doorbell that sends you an SMS instead of producing sound. This project should give you a good idea of the kinds of projects you can build on your own with cheap microcontroller hardware using MicroPython and the same Twilio APIs that many users know and love.
The project that we are going to build is an SMS doorbell using an ESP8266 microcontroller, a push button, MicroPython, and Twilio’s Programmable SMS service.
Building an SMS Doorbell
This is the perfect project if you are …