Templates for Launching Your Twilio Functions Faster

September 05, 2017
Written by

templates-for-twilio-functions

When we released Twilio Functions in May, our goal was to help you get to production faster by eliminating the burden of dealing with the servers and infrastructure typically required for building applications. Since then, we’ve seen a ton of you build some amazing things—from Resistbot, a political advocacy service that turns your text message into a formal letter for your elected officials, to VictorOps’ Live Call Routing feature that dynamically connects inbound support calls with the right response teams in real-time, we continue to gain inspiration from the things you’re designing and deploying every single day :)

To keep making that journey of deploying your next application even easier, we took a look at the most common design patterns that Twilio Functions was being used for and created templates—pre-written code and configuration that help you build a Twilio-powered application faster. Starting today, the following quickstart templates are now available in the Console:

  • Hello Voice: A simple Voice responder using .
  • Hello SMS: A simple SMS responder using .
  • Call Forward: A voice call forwarder that allows you to forward a call from a Twilio call to anything supported by .
  • Conference: An out-of-the-box conference call line.
  • Simple Menu: A basic interactive voice response (IVR) system that can be extended to connect customers to your business.
  • Sync Access Token: Allows developers to create access tokens for Sync. Killer for mobile and IoT developers that don’t want to stand up a server to use Sync.
  • Contact Us Form: A turn-key click-to-call solution that can be easily customized by developers.

How to Use Templates

You can now create and deploy a function in just a few clicks! For example, let’s set up a phone tree using the Simple Menu template:

  1. Start by creating a new Function in the Console.
  2. Select a template based on what you’re trying to build. This will auto-generate code and configuration to get you started faster. Alternatively, you can select the “Blank” template to start from scratch.
  3. On the configuration screen, give your new Function a friendly name. Also name its path to avoid any possible HTTP retrival errors. The code box at the bottom of the screen is where you can start customizing your Function.

Building an IVR using Simple Menu template
  1. Next, all that’s left is to attach our new “Simple Menu” function to a Twilio phone number in the Manage Numbers section of Console.

Connecting Twilio Functions with a phone number

And voila—our phone tree is live! Templates made the process a whole lot easier.

Now get started building that next application with Twilio Functions. We can’t wait to see what you build!