Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(templates): add volunteer-communication-center template #226

Open
wants to merge 86 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 74 commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
f08189e
new template
Feb 27, 2021
304f6d4
initial write up
Feb 28, 2021
1f3ca8e
Merge branch 'main' of github.com:twilio-labs/function-templates into…
Mar 2, 2021
fd4679b
add update
Mar 2, 2021
01dabf0
updating picture
Apr 1, 2021
f8968fa
Merge branch 'main' of github.com:twilio-labs/function-templates into…
Apr 2, 2021
c137bdc
change name
Apr 3, 2021
ff1d8d9
first draft instructuions
Apr 3, 2021
75c2990
delete wrong spelling directory
Apr 3, 2021
4b3c21d
add picture
Apr 4, 2021
451910f
change formatting
Apr 6, 2021
4f183fc
forgot changes
Apr 6, 2021
4612cf6
add new photos
Apr 6, 2021
7cdd5db
fix spacing
Apr 6, 2021
929da8a
test tesmplate
Apr 10, 2021
18ab4ae
change directory
Apr 10, 2021
c37a2f1
deploy studio flow
Apr 10, 2021
ecd0378
update
Apr 10, 2021
718a686
add template change
Apr 10, 2021
c1f9c69
remove env
Apr 10, 2021
dd0107b
remove env
Apr 10, 2021
a9f907f
Merge pull request #1 from OlinScopeTwilio/automate-flow
annagriffin Apr 10, 2021
6d34a0b
remove temp repo
Apr 10, 2021
1b5a4c0
Merge branch 'main' of github.com:twilio-labs/function-templates into…
Apr 10, 2021
e019639
autopilot deployed
Apr 13, 2021
34ac181
working
Apr 22, 2021
79c603b
separate set up flow and autopilot
Apr 22, 2021
e526315
modify index
Apr 23, 2021
5f09a66
configure studio flow flex component
Apr 23, 2021
7de8897
modify dependencies
Apr 23, 2021
58af432
change order of buttons
Apr 23, 2021
4f8d913
remove print statements
Apr 23, 2021
005a449
separate loader
Apr 23, 2021
58ae6ac
add combined studio
Apr 24, 2021
3f710e4
rename flex
Apr 24, 2021
73a8ee9
set task channel
Apr 24, 2021
38cc8f2
remove name
Apr 24, 2021
246a201
add samples function
Apr 24, 2021
7a29990
rename task and sample function
Apr 24, 2021
bb7ce2b
readme update
Apr 24, 2021
824d2d9
changing gitignore
Apr 24, 2021
7537e23
add blank env file
Apr 24, 2021
ee07131
update name
Apr 24, 2021
213eb70
set bot name
Apr 24, 2021
6af4914
removing old documentation
Apr 24, 2021
69eb646
add description
Apr 24, 2021
662c629
fix conflicts
Apr 24, 2021
918fe06
revert change
Apr 24, 2021
4eb5343
remove phone number
annagriffin Apr 24, 2021
de83493
add flow image
Apr 25, 2021
b67b0a8
break up tasks
Apr 29, 2021
0a676e6
update
Apr 29, 2021
a2fed31
remove creds
Apr 29, 2021
7f7e50c
new message
Apr 29, 2021
608e182
push
Apr 29, 2021
f6f0acb
editing autopilot descriptions for clarity
Luis-Zuniga Apr 29, 2021
8f9bca3
update docs
Apr 30, 2021
5dce9aa
add defaults
May 4, 2021
a9ed076
fix merge issues
May 4, 2021
77d7e8a
Update setup-autopilot.js
annagriffin May 4, 2021
a1c4d2b
Remove old instructions
May 4, 2021
08a7441
Merge branch 'main' of github.com:OlinScopeTwilio/function-templates …
May 4, 2021
3406a08
remove images
May 4, 2021
caaa896
add trouble shooting
May 4, 2021
ac58185
merge conflicts
May 6, 2021
97f3817
clean up
May 6, 2021
eac5b69
Merge branch 'main' of github.com:twilio-labs/function-templates into…
May 6, 2021
597b903
commit message
May 6, 2021
3426eb7
merge conflicts
May 6, 2021
18edeaf
Update package.json
annagriffin May 6, 2021
6ea23fe
reset package-lock file
May 6, 2021
6bd64ad
chore(env-manifest): update manifest file
twilio-labs-ci May 6, 2021
0fbdea8
add testing
May 6, 2021
f4cafde
Merge branch 'main' of github.com:OlinScopeTwilio/function-templates …
May 6, 2021
f122084
modifications
May 14, 2021
70e96f1
pr canges
May 14, 2021
8d477de
chore(env-manifest): update manifest file
twilio-labs-ci May 14, 2021
21c5ee9
Add a prerequisite step to the README about need to install a Flex pr…
jme783 May 21, 2021
18487a0
Add indications in the UI if the calls to return-config, check-existi…
jme783 May 21, 2021
511cc9e
Update index.html file to be more user friendly
jme783 May 21, 2021
825d004
Fix Studio Flow references to allow for successful deployment of the …
jme783 May 21, 2021
8792233
Fix CSS bug preventing the loading state from working properly
jme783 May 21, 2021
cf446ef
Fix indentation
jme783 May 21, 2021
e330440
Update readme
jme783 May 21, 2021
1d03013
Add voice URL to the webhook assignment
jme783 May 21, 2021
85d71e1
Trigger a build of the Autopilot bot after adding all of the tasks.
jme783 May 21, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,365 changes: 1,365 additions & 0 deletions FAQ_Chatbot.json

Large diffs are not rendered by default.

32 changes: 32 additions & 0 deletions env-variables.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -1168,6 +1168,38 @@
"configurable": false,
"contentKey": null
}
],
"volunteer-communication-center": [
{
"key": "TWILIO_PHONE_NUMBER",
"required": true,
"format": "phone_number",
"description": "Twilio Number for accepting messages and calls",
"link": null,
"default": null,
"configurable": true,
"contentKey": null
},
{
"key": "FLOW_SID",
"required": true,
"format": "sid",
"description": "SID of the Volunteer Communication Center Studio Flow",
"link": null,
"default": null,
"configurable": false,
"contentKey": null
},
{
"key": "AUTOPILOT_SID",
"required": true,
"format": "sid",
"description": "SID of the Autopilot Assistant",
"link": null,
"default": null,
"configurable": false,
"contentKey": null
}
]
}
}
11 changes: 11 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"googleapis": "^65.0.0",
"husky": "^4.2.5",
"inquirer": "^7.0.4",
"jest": "^26.6.3",
"jest-cli": "^26.6.3",
"listr": "^0.14.3",
"log-symbols": "^3.0.0",
Expand Down
7 changes: 6 additions & 1 deletion templates.json
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,11 @@
"id": "google-sheets",
"name": "Google Sheets SMS Log",
"description": "Logs incoming SMS numbers and messages into a Google Sheets table"
},
{
"id": "volunteer-communication-center",
"name": "Volunteer Communication Center",
"description": "Creates a studio flow to accept incoming messages and voice calls of disaster and crisis response volunteers. An autopilot assistant helps answer their questions and redirects them to Flex when it cannot. "
}
]
}
}
18 changes: 18 additions & 0 deletions volunteer-communication-center/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@



# description: Twilio Number for accepting messages and calls
# format: phone_number
# required: true
TWILIO_PHONE_NUMBER=


# description: SID of the Volunteer Communication Center Studio Flow
# configurable: false
# format: sid
FLOW_SID=

# description: SID of the Autopilot Assistant
# configurable: false
# format: sid
AUTOPILOT_SID=
50 changes: 50 additions & 0 deletions volunteer-communication-center/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Volunteer Communication Center

## Pre-requisites

### Environment variables

This project requires some environment variables to be set. To keep your tokens and secrets secure, make sure to not commit the `.env` file in git. When setting up the project with `twilio serverless:init ...` the Twilio CLI will create a `.gitignore` file that excludes `.env` from the version history.

In your `.env` file, set the following values:

| Variable | Description | Required |
| :---------------- | :------------------------------------------------- | :------- |
| `MY_PHONE_NUMBER` | Twilio Number for accepting messages and calls | Yes |
| `FLOW_SID` | SID of Studio Flow | No |
| `AUTOPILOT_SID` | SID of trained Autopilot Assistant | No |

## Create a new project with the template

1. Install the [Twilio CLI](https://www.twilio.com/docs/twilio-cli/quickstart#install-twilio-cli)
2. Install the [serverless toolkit](https://www.twilio.com/docs/labs/serverless-toolkit/getting-started)

```shell
twilio plugins:install @twilio-labs/plugin-serverless
```

3. Initiate a new project

```
twilio serverless:init example --template=volunteer-communication-center && cd example
```

4. Start the server with the [Twilio CLI](https://www.twilio.com/docs/twilio-cli/quickstart):

```
twilio serverless:start --load-local-env
```

5. Open the web page at https://localhost:3000/index.html and follow the steps to finish the configuration of your app. You will be prompted to deploy the Autopilot Assistant that is pre-trained on data and a Studio Flow that handles the incoming messages and calls and connects to Flex. This studio flow will automatically be associated with the phone number set as the `TWILIO_PHONE_NUMBER` environment variable and the Autopilot and Send to Flex widgets will be configured accordingly.

ℹ️ Check the developer console and terminal for any errors, make sure you've set your environment variables.

## Deploying

Deploy your functions and assets with either of the following commands. Note: you must run these commands from inside your project folder. [More details in the docs.](https://www.twilio.com/docs/labs/serverless-toolkit)

With the [Twilio CLI](https://www.twilio.com/docs/twilio-cli/quickstart):

```
twilio serverless:deploy
```
Loading