Crew Scheduling: Set Up Twilio to Send Crew Change Notifications by Text
You can send real-time crew change notifications by text message. Helm CONNECT uses a webhook to send each text to Twilio, an SMS (text message) provider. Twilio then sends the text to the crew member's cell phone. The same webhook sends texts for automatic crew change notifications and for the crew change notifications you send yourself. To learn more about automatic and manual crew change notifications, see "Crew Scheduling: Send Manual Crew Change Notifications."
To set up crew change notifications by text message, you'll do the following:
- Sign up for a Twilio account
- Create your callback URL
- Set up a webhook in Helm CONNECT
- Set your crew to receive crew change notifications by text
Sign Up for a Twilio Account
To sign up, go to the Twilio website or call (844) 814-4627. When you sign up, choose Twilio's SMS messaging product. Your account needs it to send text messages.
You'll need three things from your Twilio account to set up the webhook:
- Account SID: The ID of your Twilio account.
- Auth Token: A code that works like a password for your Twilio account.
- Twilio phone number: The SMS-enabled phone number that sends your text messages.
You'll find your Account SID and Auth Token on the home page of your Twilio Console. To find your Twilio phone number, click Phone numbers at the top of the home page.
Create Your Callback URL
The callback URL tells Helm CONNECT where to send your text messages. It includes your Account SID and Auth Token, which tell Twilio the messages come from your account.
To create your callback URL
- Copy this URL into a text editor, such as Notepad:
https://AccountSID:AuthToken@api.twilio.com/2010-04-01/Accounts/AccountSID/Messages.json - Replace AccountSID with your Account SID. It appears twice.
- Replace AuthToken with your Auth Token.
- Check that the URL is on one line, with no spaces.
ExampleWhen you're done, your callback URL will look similar to this:
https://AC1234567890abcdef1234567890abcdef:abcdef1234567890abcdef1234567890@api.twilio.com/2010-04-01/Accounts/AC1234567890abcdef1234567890abcdef/Messages.json
NoteKeep your callback URL private. Anyone who has it can send text messages from your Twilio account.
Set Up a Webhook in Helm CONNECT
Once you have your callback URL and Twilio phone number, you'll set up a webhook on the Setup > Webhooks > Webhooks tab. The webhook has three JSON payloads, called From, To, and Body. They tell Twilio which number the text comes from, who it goes to, and what it says.
To set up the webhook
- Go to the Setup > Webhooks > Webhooks tab.
- Click Add Webhook.
- In the field at the top of the tab, enter a name for the webhook, such as Crew Change Notification.
- From the Entity list, select Crew Changes.
- Paste your callback URL into the Callback Url field.
- Add the From payload:
- Click Add JSON Payloads. The Set JSON Payload window opens.
- In the Key field, enter From.
- In the Value field, enter your Twilio phone number.
- Click Save.
- Add the To payload:
- Click Add JSON Payloads.
- In the Key field, enter To.
- Click the plus sign (+) on Crew Cell Phone to add it to the Value field.
- Click Save.
- Add the Body payload:
- Click Add JSON Payloads.
- In the Key field, enter Body.
- Click the plus sign (+) on Message Body to add it to the Value field. Message Body adds the default crew change text and links.
- (Optional) Add your own text before or after Message Body.
- Click Save.
- Click Save.
Set Your Crew to Receive Crew Change Notifications by Text
To receive crew change notifications by text message, each crew member needs a cell phone number on their profile, and their Crew Change Notifications setting needs to be Text Message or Email + Text Message. To learn how, see "Crew Scheduling: Set Up Crew Change Notifications."