Submitting Octwilio to the Twilio x DEV Hackathon!

Ryan Rousseau - Apr 30 '20 - - Dev Community

What I built

Category Submission: Interesting Integrations

Octwilio combines the Octopus Deploy and Twilio APIs. Twilio sends messages when certain events in Octopus happen. Responses to those messages can invoke requests to the Octopus API.

For example, if a deployment requires approval, Octwilio uses the Twilio API to send an SMS to a chosen approver. The approver can then reply to the SMS with "Approve" or "Reject." Octwilio accepts the message from Twilio and uses the Octopus API to update the state of the deployment.

Screenshot

I do not have a publically available demo link, but please enjoy this screenshot of Octwilio in action.

You can see a message announcing the deployment has started. After that, there is a message letting me know that the deployment requires approval. I reply with a very official "looks good to me." I get a notification that the deployment was approved, and finally that it was successful.

Series of messages to and from Twilio

Link to Code

The code and configuration instructions are hosted on GitHub.

Octwilio

About

Octwilio is a project to combine the Octopus Deploy and Twilio APIs.

How it works

This project contains [Firebase] cloud functions for connecting Octopus Deploy and Twilio events. The functions handle Octopus Deploy subscription events as well as SMS messages to a Twilio phone number.

More details can be found in this blog series about building Octwilio.

Features

  • Send SMS alert when an Octopus Deploy deployment requires approval
  • Approve or reject a deployment via SMS
  • Send SMS alerts for deployment events
  • Endpoint for deployment notifications

How to use it

  1. Create a copy using GitHub's repository template functionality
  2. Update the README.md and .firebaserc with the respective values.
  3. Configure your Firebase, Octopus Deploy, and Twilio accounts
  4. Create your Firebase project
  5. Deploy the functions to Firebase
  6. Configure your Octopus Deploy subscriptions
  7. Configure your Twilio phone number webhook

Set up

Requirements

How I built it

I built Octwilio with Firebase Cloud Functions. Cloud Functions are Node-based serverless functions that fire on specific events. Octwilio uses functions that trigger on HTTP requests. These functions are the glue between the Twilio and Octopus Deploy APIs.

The details on how I built Octwilio are in earlier posts of this series. Start with the first one!

Additional Resources/Info

Twilio
Octopus Deploy
Firebase

Cover photo by Benjamin Davies on Unsplash.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .