This repository implements a Twilio Frontline integration service using Twilio Serverless with Airtable as the contact databse.
We recommend following the setup outlined Frontline node.js quickstart, which shows you how to do the following:
- A Twilio Account. Don't have one? Sign up for free!
- An SMS enabled phone number.
- A Twilio Frontline instance.
- Twilio Conversations configured to use the Frontline Conversations service as it's default conversation service.
- Additionally, you'll need to copy this Airtable Base template and have your Airtable API key along with your Base ID.
Once you reach the step to "Configure the Frontline Integration Service" you are ready to deploy this app.
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
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 this Serverless app with one command:
twilio serverless:deploy
If your deploy is successful, you should see an output that looks like this:
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.
Copy and paste the callback URLs (uncluding your unique subdomain) into your Frontline configuration in the console.
In the Twilio Console, go to Frontline > Manage > Routing and add [your_app_url]/callbacks/routing
under Custom routing:
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