Skip to content

mark-marshall/twilio-flex-twitter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to add Twitter Direct Messages into Twilio Flex

This repo contains a proof of concept Express app for adding Twitter Direct Messages into Twilio Flex. The associated blog post can be found here: https://www.twilio.com/blog/add-twitter-direct-messages-twilio-flex.

Image of Direct Message flow

Provision

  1. Install dependencies
yarn install
  1. Run the provision script
node provision.js

The provision script will request:

  • A Twilio Account SID (make sure this relates to an account containing your Flex project)
  • A Twilio Auth Token

The provision script will:

  • Create a Studio Flow that passes incoming messages onto Flex
  • Creates a Flex Flow using the new Studio Flow and the Chat Service that is provisioned with your Flex project by default (comments signal where you can override these defaults if you prefer)
  • Populates a .env file in the flex-twitter directory with necessary Twilio credentials and SIDs

Start Application

  1. Navigate to the application file
cd flex-twitter
  1. Install dependencies
yarn install
  1. Complete the .env file (use the env.example file for guidance):
  • A url that the application will be deployed on
  • Twitter consumer key and secret
  • Twitter access key and secret
  • Twitter handle of the account that will be receiving support messages
  1. Run the application
node server.js

Deploy Plugin (Optional)

  1. Install the Flex Plugins CLI
  1. Navigate to the plugin folder
cd flex-twitter-plugin
  1. Install dependencies
npm install
  1. Deploy plugin
twilio flex:plugins:deploy --major --changelog "Adding Twitter Channel UI" --description "Adding Twitter Channel UI"
  1. Enable plugin
twilio flex:plugins:release --name "Twitter Channel UI" --description "Enabling Twitter Channel UI" --plugin plugin-sample@1.0.0

About

No description, website, or topics provided.

Resources

License

Stars

0 stars

Watchers

2 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors