Build the future of communications.
Start Building for Free

JavaScript posts

  • By Ashley Boucher
    Build an Emergency Contact Notification System with Twilio SMS Copy of C04 Blog Text

    September is National Disaster Preparedness Month. To help yourself stay prepared, you’ll learn how to build an app that will send an SMS to all of your emergency contacts with just one text message. If you find yourself in a difficult or emergent situation, having the ability to notify multiple people with one quick message might be able to get you help faster or reunite your family sooner.

    Prerequisites

    To get started with this tutorial, you’ll need the following:

    Build your app with Twilio Functions

    Your app will run on Twilio Functions. Twilio Functions is a serverless environment that lets you deploy backend services without the overhead of setting up a server. With Twilio Functions, you can develop locally and deploy to production through the Twilio …

    Read More
  • By Hayden Powers
    How to Make Charts in Notion using Database Data and Node JS Header image for Notion charts tutorial

    The popular productivity tool Notion is so versatile that if you longed for some non-native functionality, you don’t always have to wait for their team to include an implementation, you can build your own implementation integrated directly into their platform!

    One such component that is not currently supported at the time of writing is the ability to make charts from database data in Notion. Many no-code services available online will offer their own integrations to provide charts, but if you ever wanted to know how to make your own charts for free using Notion’s API and SDK, along with a couple of other API’s to help render the charts and host the images, then read on to discover one way of accomplishing this task.

    Prerequisites

    To follow along with this tutorial, you will need the following:

    Read More
  • By Dhruv Patel
    Build a Song Identifier Phone Service with Twilio Voice and JavaScript Song identifier phone service header

    We’ve all had moments where we’ve listened to a song, but just couldn’t remember the name of it or it was on the tip of our tongues. In times like these, Shazam is the way to go; open up the app, have it listen to some audio and it’ll immediately output the song title and artist.

    When Shazam first launched, it was initially a phone service only in the UK where you dialed “2580” to identify a song. Once you called the number, you would hold your phone near the audio and it would then hang up after 30 seconds while sending you an SMS of the song title and artist.

    After finding out about their “2580” service, the inner engineer in me came out. I was curious to see how this can be built with Twilio Programmable Voice and SMS so I challenged myself to create a clone of …

    Read More
  • By Miguel Grinberg
    A Privacy-First Web Analytics Solution with Twilio Segment A Privacy-First Web Analytics Solution with Twilio Segment

    If you own or manage a website, you likely spend a decent amount of time trying to identify the patterns and trends in how visitors interact and engage with your site. This information is invaluable when trying to improve user experience and attract more visitors. Web analytics services such as the popular Google Analytics make it easy for website administrators to collect large amounts of information about visitors in real time, just by adding a <script> tag to the site’s HTML.

    The problem is that in their quest to provide more and more information, analytics tools have become too invasive, installing their cookies on users’ devices with the purpose of tracking browsing habits and preferences, and even following users as they move through different websites. This has become such a problem that in many parts of the world there are now regulations to protect the online privacy of users. In …

    Read More
  • By Miguel Grinberg
    A Great Looking Star Ratings Chart for your React Application A Great Looking Star Ratings Chart for your React Application

    Every blog post and documentation page on the Twilio website lets readers rate the content with a 1 to 5 star rating. But what do we do with these ratings? We actually track them using an in-house tool, along with other content-related metrics. Initially, this tool showed the average rating for each page as a decimal number, but we soon realized that showing just a number is not sufficient. Our documentation pages, for example, are constantly being expanded and improved, so it is useful to see how the more recent ratings fare against the older ones.

    I hoped to find a star ratings chart component for React that can show star ratings in greater detail, but sadly I could not find any. In fact, I could not even find good examples of sites that visualize their star ratings categorized by their age. In the end, I designed and built my …

    Read More
  • By Zach Snoek
    How to create a habit tracker with Twilio Functions and Notion Create a habit tracker with Twilio Functions and Notion

    Notion is a productivity tool that lets you create documents and build systems such as to-do lists and project management boards. It allows you to create databases, which makes it a good choice for building a habit tracker.

    However, it can be hard to interact with Notion databases quickly, especially through their mobile app. One solution is to host a habit tracker in Notion and interact with it via SMS.

    In this post, you’ll learn how to build a habit tracker with Twilio Functions and the Notion JavaScript SDK. You’ll mark habits as complete, add new habits, and get a daily summary of your habits by texting a Twilio phone number. Here’s what the finished project will look like:

    Demonstrating texting commands, such as "log exercise" and "summary", and seeing the Notion database updated.

    Prerequisites

    Before you begin this tutorial, you will need:

    Read More
  • By Ashley Boucher
    Build a Virtual Whiteboard for Back to School: Save Incoming SMS, MMS, and Voice Calls to Airtable with JavaScript Copy of C03 Blog Text (5)

    It’s back to school time and for college students in a remote environment, what better way to recreate the dorm experience than with a virtual whiteboard. Your friends can send a text or MMS to your Twilio phone number and it will appear on your web app.

    In learning how to build a virtual whiteboard, you’ll master two concepts: saving incoming SMS and MMS messages to an Airtable database, and displaying these messages on a web app. That second part – displaying the messages on a web app – will be covered in a second post.

    Prerequisites

    To get started with this tutorial, you’ll need the following:

    Create your Airtable base

    Login to …

    Read More
  • By Hayden Powers
    How to Create, Update, and Delete Data in a Notion Database using Node JS Header image for notion database tutorial post

    Notion is a popular productivity tool used widely in both professional and personal settings. As of May 2021, Notion released their very own public beta JavaScript SDK to use with their API. At the time of writing, it is installable via npm and makes the process of working with Notion much more straightforward than it was before.

    This tutorial explores the basics of manipulating data in a Notion database using their API and SDK with NodeJS. This tutorial aims to be beginner-friendly and will have explanations of every step. So without further ado, let’s get started!

    Prerequisites

    Before beginning, ensure you have the following:

    • The latest version of NodeJS installed on your computer
    • A Notion account – this tutorial assumes a free personal account
    • An IDE – I will be using VSCode

    Initial setup

    There are two things that need to be set up in order to follow along …

    Read More
  • By Dhruv Patel
    Send and Receive SMS Messages via Discord with Twilio and Node.js Send and Receive SMS messages via discord header

    In recent years, Discord has become the central messaging platform for communities especially with the help of Discord bots. Through Discord’s extensive API, developers are able to build robust bots that are capable of various actions such as automating tasks and chatting with users.

    With the gaining traction of Discord bots, I decided to think of ways that Twilio can be used alongside it. A fitting integration would be to use Twilio Programmable Messaging; you can communicate with those who don’t have Discord or SMS, or even be notified on important events such as if you’ve been mentioned or if members have left or joined your server.

    In this article, you’ll learn how to build a Discord bot that’s able to notify you on important events on your server and allow you to send messages to your server all through SMS.

    Phone screenshots of discord app and SMS app showing notification of new user joining and two way messaging

    Prerequisites

    Here’s what you’ll need for this …

    Read More
  • By Hayden Powers
    Learn How to Use Twilio Functions by Building an SMS Measurement Converter for JavaScript Beginners How to use Twilio Functions JavaScript Beginners Header image

    There I was, in a desolate cabin with nothing except my maladaptive daydreams, 2G coverage, and ingredients for the only dish I had ever managed to write down splayed out on the countertops. There was just one problem. After desperately rummaging through the rental’s kitchen cabinets, I found only a single tablespoon hanging lonesomely on an otherwise empty ring.

    The proportions of ingredients were important in this dish, but I hadn’t actually sat down and memorized all the conversion rates before. Without internet service, not even Google could save me, but I did my best to eyeball it and make due.

    Someone about to eat but being disgusted by the smell of the food

    It turned out terrible, and I vowed to never be in such a predicament again.

    With some beginner-friendly JavaScript and hosting by Twilio Functions, we could make a measurement converter that can be used anywhere with cell service. In this tutorial, we will do just that! May our recipes …

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