Level up your Twilio API skills in TwilioQuest, an educational game for Mac, Windows, and Linux. Download Now
Build the future of communications.
Start building for free
  • By Lizzie Siegle
    Image Recognition with ImageAI and Twilio MMS in Python image-recog-imageai

    Can a computer identify what's in an image? Development libraries like ImageAI make normally-complex Machine Learning tasks including object detection easier. This blog post will show how to build an image classification application using Python, Flask, and ImageAI. The application will receive inbound images with Twilio MMS and respond with a modified image segmented into detected objects and the model's detection confidence percentages.

    MMS identifying person and dog


    Read More
  • By Lizzie Siegle
    How Positive was Your Year with TensorFlow.js and Twilio positive-was-your-year with fireworks

    As 2019 (and the decade) come to an end, it's interesting to reflect on the time spent. What do our text messages say about how positive or negative our time was? This post uses TensorFlow.js to analyze the sentiment of your Twilio text messages for the year.



    How does TensorFlow.js help with sentiment analysis?

    TensorFlow makes it easier to perform machine learning (you can read 10 things you need to know before getting started with it here) and for this post we will use one of their pre-trained models and training data. Let's go over some high-level definitions:

    • Convolutional Neural Network (CNN): a neural network often used to classify images and video that takes input and returns output of a …
    Read More
  • By Lizzie Siegle
    Detect Toxic Language with Twilio Chat and Tensorflow.js toxiclanguagechat.png

    Rude or offensive comments can run rampant in today's online communication landscape; however with the power of machine learning, we can start to combat this.

    This blog post will show how to classify text as obscene or toxic on the client-side using a pre-trained TensorFlow model and TensorFlow.js. We'll then apply this classification to messages sent in a chat room using Twilio Programmable Chat.

    chat demo with toxic language

    Google provides a number of pre-trained TensorFlow models which we can use in our applications. One of those models was trained on a labeled dataset of Wikipedia comments available on Kaggle. Google has a live demo of the pre-trained TensorFlow.js toxicity model on which you can test phrases.

    Google demo

    Before reading ahead you can also see 10 Things You Need to Know before Getting Started with TensorFlow on the Twilio blog.


    1. Before you get started, you'll first need to clone the …

    Read More
  • By Lizzie Siegle
    10 Things You Need to Know Before Getting Started with TensorFlow 10 things you need to know before getting started with tensorflow

    Though I took two college electives related to artificial intelligence (AI) and have used quite a few machine learning (ML) libraries, I am by no means a ML developer. However, like many developers nowadays, I am extremely curious about ML and TensorFlow, a popular library brought up in many conversations surrounding ML. What exactly is it?

     tf ml engineer meme

    What is TensorFlow?

    TensorFlow is an open source library released by Google Brain (now Google AI) in 2015 to make it easier for developers to build, train, and generally work with deep learning models and data to make different types of predictions. You can solve tasks like image classification, natural language processing, generate music as in this Twilio post, and more.

    tensorflow logo

    I began playing around with TensorFlow a few weeks ago and though it's been fun and I've learned a lot, here are ten things I wish I'd known before using it.

    10 …

    Read More
  • By Lizzie Siegle
    Top 5 Things to Consider for Building Better Bots top 5 things to consider for building better bots

    There's a lot of conflicting information on best practices when building bots, so we set out to make your chatbot-building life easier in our new comprehensive guide to Intelligent Chatbots.

    That massive resource provides developers, builders, and DOers with an intelligent bot guide, covering bot use cases, descriptions of how bots work, instructions on building and deploying bots, intelligent bot best practices, and more.

    In this post, I’ll summarize some of that guide and tell you what you need to consider to build better bots.

    1. Pick your use case and type of chatbots

    Baymax GIF saying an impersonal greeting

    The purpose of most bots is often to automate tasks, save time, or just to generally make life easier – just like with most other tools and automation. So first, you’ll need to consider your bot’s use case.

    Various industries use chatbots in different ways. Here’s a list …

    Read More
  • By Lizzie Siegle
    Save User Input via Slackbot with Twilio Autopilot, Functions, and MongoDB Copy of Product Template - Autopilot.png

    This step-by-step tutorial will go over how to build a Slackbot using Twilio Autopilot and Twilio Functions, saving the user's answers to a MongoDB Atlas database. If you haven't seen part one of this two-part blog series yet, check it out here and make sure you have your Autopilot Slackbot and Function set up before continuing below.

    Setup MongoDB

    Let's receive and save the data the user gave us. On the MongoDB Cloud Atlas homepage, make a free account. Once logged in, make a new cluster. 

    Under Cloud Provider & Region, select a cloud provider. For this post, I decided to use Azure. Then select a region (one with a free tier may be preferable.)

    For Cluster Tier, you can then select "M0 Sandbox"--your account will only be able to have one cluster at this level. Now you can scroll to the bottom and click the green …

    Read More
  • By Lizzie Siegle
    Call Twilio Functions from iOS in Swift callfuncsfromios.jpg

    There are many things you can do from iOS but sometimes, for example, you may need to make a web request to fetch information. With Twilio Functions you can focus on writing the code that matters without having to maintain a server. This tutorial will show you how to set up a Twilio Function that returns a Pokemon joke or two and then call that Function from an iOS application.



    Before you get started, you'll need

    • a Twilio account to create a Twilio Function 
    • Xcode installed to make a rudimentary iOS app to call the Function
    • A little JavaScript (for Twilio Functions) and Swift knowledge

    Make a Twilio Function 

    The Twilio Function in this tutorial will return a simple hard-coded Pikachu joke. To make that Function, from your Functions page, click the red "+" button to make a new Function.redplusfunc.png

    If this is your first Function, you'll click …

    Read More
  • By Lizzie Siegle
    Build a Slackbot with Twilio Autopilot slackbotpost1.jpg

    This step-by-step tutorial will go over how to build such a Slackbot with Twilio Autopilot


    Before you get started, you'll need a Twilio account to make a Twilio Autopilot bot. Once you have that, first make an Autopilot Assistant.

    1. Go to the Autopilot Console and click "Create a new Assistant."

    2. Give it a name and click "Create". In this case, I wanted to make a Slackbot to handle event sponsorships so I put "Dev-conf-bot".

    To make your Autopilot Assistant a Slackbot, you must do three things.

    1. Make a new public Slack channel. First click the plus button next to Channels on the left-hand side bar of your Slack client.

    Plus button next to channels


    Then, name the channel. Make sure it is public as shown below, and click "Create Channel".2. Create a new outgoing webhook integration in Slack to send a POST request containing message details to a URL …

    Read More
  • By Lizzie Siegle
    Build a Facebook Messenger bot with Twilio Autopilot, Functions, and SendGrid in Node.js sendgridspectraautopilot

    For event-organizers and business-owners, providing quick 24/7 customer service can be tough. I help run a hackathon for women and non-binary people and our Facebook page has to respond to so many questions, like when the event is happening, if we're looking for new organizing team members, when hacker applications open, and more! Answering these can get repetitive and tedious--if only there was a way for us developers to automate the process!

    Never fear, this step-by-step tutorial will show you how to build an intelligent Facebook Messenger bot with Twilio Autopilot, Functions, and SendGrid in Node.js. If the Autopilot assistant gets stuck and the user wants to speak to a human, the assistant will hand off the conversation to the business, connecting them with a human via Email for a seamless customer experience.


    Before you get started, you will need to have a Facebook Page for your brand or …

    Read More
  • By Lizzie Siegle
    Generate Songs with Markov Models using Server-Side Swift, Perfect, and Twilio SMS generate-music-with-swift-twilio

    I like music and coding and one way to make music with code is by predicting words and generating a new song. You can do this with Markov models, as introduced in this last Twilio blog post. Now let's learn how to train a model on a .txt file to generate a song and then generate another song or text via Twilio SMS with server-side Swift and Perfect.

    Set Up

    To code along with this post you should have the following:

    1. A Twilio account to buy a phone number
    2. ngrok, a tool for putting the app running on your local machine on the web
    3. Xcode

    First, make a new Single View project in Xcode and run pod init on the command line in the directory where your Xcode project exists to create a Podfile in order to install the Markov Model library via CocoaPods, as further …

    Read More
  • Newer
    Sign up and start building
    Not ready yet? Talk to an expert.