Use Twilio & EasyCSV Together
Import entire spreadsheets as Tasks and more for Twilio.
How to import Twilio Tasks from a CSV file or Google Sheet
Step-by-step
- Create an EasyCSV account
- Create your first import page using the CSV file or Google Sheet that contains your Twilio Task data
- For you EasyCSV import page, specify the webhook as: https://taskrouter.twilio.com/v1/Workspaces/WSXXXXXXXXXX/Tasks (replace WSXXXX... with the ID of your workspace)
- Select the radio button for: POST to webhook as FORM data
- Click Save
- At the top of you EasyCSV import page, when you are logged in, click the link labeled "Customize JSON to Post"
- Specify some custom JSON like this (replace the Attributes key/value pairs with spreadsheet column names or hard-coded value):
{ "Attributes": { "email": "{{ EMAIL }}", "language": "en", "sport": "baseball" } }
- Click Save
- At the top of you EasyCSV import page, when you are logged in, click the link labeled "Request Headers". We will be adding a Basic Auth Header
- Create a header with the key text "Authorization"
- For the value we will need to Base64 encode
Your_Twilio_Account_SID:Your_Auth_Token
- Our example looked like thisAC9889685647c40097a22fac:e9ae50fa116fcd14a4d66b61
. - To get your Twilio Account SID and auth_token, go to the TaskRouter Dashboard and click the "Show Api Credentials" link in the upper-right.
- Next we need to Base64 endcode the string
Your_Twilio_Account_SID:Your_Auth_Token
. To do this in the Google Chrome Browser, right-click anywhere on the page you are viewing in Chrome. Click "Inspect". In the inspector, click "Console". In the console window type this and hit ENTER:btoa("Your_Twilio_Account_SID:Your_Auth_Token")
(replace "Your_Twilio_Account_SID" and "Your_Auth_Token") - Copy the result from the btoa command in the console.
- Back in EasyCSV, for the header value type:
Basic result_string_from_btoa_command
(replace "result_string_from_btoa_command" with what you copied) - Click Save
- That's it! Now you can go back to the main import view and upload your CSV file or Google Sheet and each row of you file will become a Twilio Task.