Skip to content

A serverless middleware to connect Twilio Frontline with Airtable.

Notifications You must be signed in to change notification settings

florantara/frontline-quick-deploy

 
 

Repository files navigation

Twilio Serverless Frontline Integration Service

Twilio Frontline Integrations Service

This repository implements a Twilio Frontline integration service using Twilio Serverless with Airtable as the contact databse.

Prerequisites

We recommend following the setup outlined Frontline node.js quickstart, which shows you how to do the following:

Once you reach the step to "Configure the Frontline Integration Service" you are ready to deploy this app.

Project Setup

Follow these steps to clone the repository, install dependencies, and set environment variables:

# Clone the repository:
git clone

# Change to the project directory:
cd frontline-quick-deploy

# Install dependencies:
npm install

# Copy the sample environment variables file to .env:
cp .env.example .env

Environment Variables Reference

Here are the environment variables that must be configured for the app to run:

ACCOUNT_SID= # Your twilio account SID, found in the console.
AUTH_TOKEN= # Your auth token, found in the console.

SSO_REALM_SID= # Go to console > Frontline > Manage > SSO/Log in

TWILIO_SMS_NUMBER= # SMS enabled phone number in e164 format (e.g. +14135551234)
TWILIO_WHATSAPP_NUMBER= # A Twilio WhatsApp sender, if you have one.

AIRTABLE_API_KEY= # Your Airtable API key
AIRTABLE_BASE_ID= # Your Airtable Base ID

Deploy

Deploy this Serverless app with one command:

twilio serverless:deploy

If your deploy is successful, you should see an output that looks like this: Screen Shot 2022-03-02 at 4 32 36 PM

The app provides five callback URLs:

  • /callbacks/crm: called when Frontline loads the contact list or a user detail page.
  • /callbacks/outgoing-conversation: called when a user initiates an outbound conversation.
  • /callbacks/routing: called when a messages is sent inbound that does not match an open conversation.
  • /callbacks/templates: called when a user opens the templates menu.
  • /callbacks/twilio-conversations: called after a conversation is created or a participant is added to the conversation.

Configure Callbacks

Copy and paste the callback URLs (uncluding your unique subdomain) into your Frontline configuration in the console.

Routing configuration

In the Twilio Console, go to Frontline > Manage > Routing and add [your_app_url]/callbacks/routing under Custom routing: Screen Shot 2022-02-28 at 11 43 02 PM

General callbacks

In the Twilio Console, go to Frontline > Manage > Callbacks and copy / paste the following callback URLs from your Frontline integration service:

  • CRM Callback URL: [your_app_url]/callbacks/crm
  • Outgoing Conversations Callback URL: [your_app_url]/callbacks/outgoing-conversation
  • Templates Callback URL: [your_app_url]/callbacks/templates

Screen Shot 2022-02-28 at 11 42 24 PM

About

A serverless middleware to connect Twilio Frontline with Airtable.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 88.8%
  • HTML 5.3%
  • CSS 5.2%
  • Shell 0.7%