Automating tasks using Zapier

Note

This feature is currently in Beta and only applies to our Rails service for now. Please contact us via our support channels if you run into any issues.

Overview

Zapier is a SaaS platform that connects different services to each other and allows users of those services to build their own automated workflows to save on manual work and improve their reaction time. It’s essentially a kind of middleware-as-a-service but with no additional coding required by either users or platforms.

Zapier has over 2,000 apps in its library including many of the largest cloud providers, and most of the major monitoring and reporting tools. This doc will explain the underlying principles of Zapier and walk you through setting up your own workflows.

Zaps, triggers and actions

The building blocks of Zapier are called Zaps - simple workflows based on triggers and actions.

Triggers are conditions that, when met, cause a workflow to start. These are most commonly notifications and alerts. Cloud 66 currently has one trigger event: New application created. You can use this to make Zaps that fire each time you create a new application.

Actions are the changes made to other systems as a result of a workflow being triggered. Cloud 66 currently has three actions available on Zapier:

These actions would allow you to, for example, scale up your application whenever your (Zapier-supported) monitoring tool reported 80% resource usage for a period longer than 10 mins, and then scale down again when resource usage dropped below 40% for 30 mins.

Making a simple Zap

The best way to get going with Zapier is to create a simple Zap. This will allow you to:

In our example we’re going to use a post in a private Slack channel as the trigger to redeploy our application.

Step 1: Set up the trigger

Set up a trigger

Choose a Slack channel

Step 2: Set up the action

Set up a Cloud 66 Action

Step 3: Trigger your Zap

We can now trigger our app to deploy by posting anything in our private channel. To see this in action:

Scaling up or down via Zapier

You can use Zapier to automatically trigger your applications to scale up or down based on inputs from any of the applications it supports. A great example would be connecting a monitoring service like Datadog to a Zap that scales your application up when it breaches a usage threshold.

If you’re planning to use this feature for an application please be sure of the following: