In this page
Sending a Twilio SMS about a new changeset
Twilio is a communications platform geared mostly towards software developers. Twilio is used to programmatically make and receive phone calls, send and receive text messages, and perform other communication functions.
This automation sends a notification SMS message to a phone number about the changeset after that has been accepted by the repository:
The SMS content can be freely customized, allowing you to post anything from short summaries to longer details.
Configuration
- Login to your Twilio account and go to your Dashboard.
- Setup a phone number that Twilio can use to send SMS.
- You will find your Account SID and Auth token here. These will be needed later.
- Login to Jira as admin, go to Administration → System → Automation rules.
- Click Create rule.
- Select the trigger Changeset accepted (from the DevOps category).
- Click Save.
- Click Add component and select New condition.
- Select the condition Advanced compare condition.
- Enter {{devops.changeset.commits.size}} to the First value field.
- Choose the does not equal option from the Condition dropdown.
- Enter "0" to the Second value field.
- Click Save.
- Click New action.
- Select the action Send Twilio notification.
- Fill the Account SID, Auth token and From fields based on your Twilio account details.
- Enter the phone number Twilio generated for you in the From field. (You can find it in the Active Numbers list.)
- Enter a valid phone number or multiple numbers separated by commas in the To field.
-
Compose the SMS message in the Message body field:
[DEVOPS] {{devops.changeset.commits.size}} new commit{{#devops.changeset.commits}}{{^first}}{{#last}}s{{/}}{{/}}{{/}}{{^devops.changeset.commits}}s{{/}}{{^issues.size}}.{{/}}{{#issues.size}} linked to the issue{{#issues}}{{^first}}{{#last}}s{{/}}{{/}}{{/}}{{^issues}}s{{/}}: {{#issues}} {{key}} - {{summary}} {{/}} {{/}}
Notes:- You should keep the body relatively short, as longer bodies may be split to multiple SMS messages depending on the SMS character limit.
- Click Save.
- Name your automation rule intuitively, and click Turn it on.
Usage
- Create a commit in your repository with this message:
Implement the FOO-1 feature.
- Then another with this:
Fix the FOO-2 and FOO-3 bugs.
- An SMS message will be sent to the selected phone number with the change summary and the linked issue list.
Troubleshooting
If you don't get the expected results:
- See the general troubleshooting steps.
Questions?
Ask us any time.