Pages

Archives

Recent Tweets

  • No tweets available at the moment.

Follow Me on Twitter

Teaching API workflow integration using Tray.io

I’ve been watching a great tool for integrating services through a visual workflow editor develop over the past 2-3 years. You have likely heard of Zapier, and IFTTT – well now, meet Tray.io.

As a professor, the topic I enjoy teaching the most is how to use APIs. Using APIs for the first time is like magic. Nothing I have taught or had my students do has brought more excitement into the classroom.

While using a single API to retrieve stock prices, the weather forecast, or star wars info is exciting enough your first time. Weaving APIs together to make an ‘app’ is even more empowering.

Over the years I have taught my students API basics and utilized different platforms to take the outputs from one API as the inputs for another. I stumbled upon Tray.io two years ago and was fell in love with it. Not only is it a great platform to teach my students how to use APIs, but it is a great platform to teach how to string many APIs together.

If you are curious, here is the approach I have taken in the classroom: After the students have logged into Tray.io, we build a workflow with a single connector. The Twilio API.  The students learn about the basics of APIs, authentication, the base URL, the resource URL, the request body, and parameters. All really basic things! If everything goes well their first API experience they are rewarded with an SMS (text message) they have sent themselves. Some students figure out how to send images along with their text message.

From here we branch out into other APIs. An API to check the weather (Weather Underground), send emails (Sendgrid), get info about nearby restaurants (Yelp), save basic data to a google sheet (Google Drive). Again, all of them quite easy to understand. After using each API individually they are ready to string them together to make an App. Perhaps an app that emails or texts you the weather forecast every evening? Not bad for someone who does not know how to code, and just barely learned what an API is!

Now the students are thinking… We can run the APIs by clicking “Run” in Tray, or we can set up timers so they run every hour… How can we have the app run when someone fills out a form, or in response to another event? Then I introduce webhooks, and we use Instapage to make a beautiful landing page with a simple form that when submitted submits the data to the webhook for our Tray.io workflow.

After this point, the students have learned the basics and are prepared to be creative and make their own apps.

I found that simple Alert systems were popular with the students. These systems are enabled by two Workflows. One workflow involves storing information of interested people, generally using Instapage and Google Sheets. The other workflow involves sending out an alert to everybody who has signed up. Some examples: Alerts when the gym was running at low capacity (a good time to go!), Alerts when there was free pizza available on campus (cleverly called Vulture Alert!), and weather alerts.

One fun alert stemmed from the way students received tickets for basketball games. Students are often seen running on campus to get in line for tickets when the distribution place is announced.  The app created allowed the ticket distributors to press buttons on their phones to notify student how long the lines were, send the location of the ticket distribution, and when the distribution would occur. This system never went into ‘production’, but the students were pleased to hear that the ticket distribution team would gladly pay for what they had built.

Many powerful functions are made available through APIs, but all of these are useless unless you know about them, and integrate them into your work. Tray makes the integration part easy, it is up to the students to be creative by imagining which APIs they can string together.

Without coding or any knowledge of code, my students were able to string APIs together to create a useful app. This was all possible through the Tray.io platform. While I have used a few other platforms like Tray, Tray.io was by far the easiest to use and the most well-loved by my students.

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>