Announcement

Zapier for DevOps: Use Pipes to unlock 5,000+ no-code automations

Bring DevOps data into your Zaps, and enrich it with any of the thousands of sources available in the Zapier catalog.

Turbot Team
5 min. read - Oct 05, 2023
Bring DevOps data into your Zaps, and enrich it with any of the thousands of sources available in the Zapier catalog.

The Turbot Pipes app for Zapier, announced today, opens the world of DevOps data to Zap developers. If you're a DevOps pro, this new integration means you can enrich operational data with anything available from Zapier's vast catalog of connectors. Pipes' complementary connectors and data-wrangling superpowers kick Zap workflows into a whole new gear. Let's look at simple examples of two basic patterns: Pipes triggers a Zapier workflow, and Pipes runs as an intermediate step.

Pipes as a Zap trigger: Notify when new AWS IAM access keys are created

In this scenario we want to be notified when a new AWS IAM access key is created. Here's the Pipes query we'll use.

select
*
from
aws_iam_access_key
where
create_date > now() - interval '1 day'

To use the query in a Zap, log in to Zapier, click CreateNew Zap, name it New access key, and click Trigger. In the Change Trigger dialog box, search for Turbot Pipes, and select the app. You're then prompted to login to Pipes; do that.

There's only one choice for the trigger event, New Row (Custom Query), choose that and click Continue.

Choose your workspace in the Trigger section, then enter your query, and click Continue.

In the Test section, click Test Trigger. Zapier will display up to three query results. If nothing is found, you probably don't have any fresh access keys so create one and then try again. When successful, Zapier will show you the results and invite you to select a record to continue building your Zap. Click Continue with selected record.

Now you're invited to choose the next app in the pipeline. We'll use Gmail to send the notification so search for it, select it, choose the Send Email action, and fill in To and From with your email address. You can customize the Subject with the User Name field of the sample record, and likewise customize the body to include User Name and Create Date. (Columns you asked for in the query are available in both contexts.) Then click Test step. You should soon receive an email like this:

If you want to actually use this Zap, click Publish to activate it.

Note that each action performed by a Zap costs you one task, and if you send a lot of emails this way you'll soon exhaust your plan's quota. SQL to the rescue! Your Pipes query can use Postgres functions (concat, string_agg) to combine multiple records into a single text value delimited by HTML tags. Then you can toggle the body type of the Zapier Gmail app from plain to html to send an HTML email.

Pipes as a Zap action: Enrich a Jira issue

Now let's kick off a Zap with a Jira trigger. In Zapier's Jira app, set up a trigger on the New issue event. We'll pretend there's a convention for titling new issues: if the title contains an IP address (e.g. Please investigate 10.84.1.0), then Pipes will query aws_vpc for a match and, if there is one, will build a notification that enriches the bare IP address with data from aws_vpc and aws_vpc_security_group.

The setup for the trigger is similar to what we've already seen: start a new Zap, choose Jira, log in, choose the New issue event, choose your Jira project, and test to verify that Zapier can find a sample issue record.

Now we'll add a Pipes step and, this time, we'll write the query in the action instead of the trigger. The query starts by listing VPC ids and hosts, then looks for an IP addresses in the issue's Summary field. If there is one, the query uses the vpc_id to join with aws_vpc_security_group and report details from both. If there isn't one, the Zap ends here.

Finally we create a Jira step that adds a comment to the issue that triggered the workflow.

When you test the Zap, you should find a new comment on the Jira issue.

If your query returns multiple rows, you'll again burn one task for each. If you want to combine the rows there isn't an HTML option in this case, but you can use Postgres functions (row_to_json, json_agg) to convert the result set into a single value.

See it in action

Get started with Turbot Pipes + Zapier

We've shown that, as a Zap developer, you can use Pipes to trigger a Zap with data that's otherwise unavailable, including from a vast collection of tables drawn from the major clouds (AWS, Azure, GCP) and others of interest to DevSecOps pros including IPinfo, GitHub, Net, Shodan, and many more. The Pipes queries you use in your Zap can query these Pipes-provided sources individually and also, to powerful effect, join across them.

We've also shown that you can use Pipes in the middle of a workflow to receive results from another app's trigger, enrich them with data from a Pipes query, and pass the enriched results along to a next step.

But these are just the simplest possible examples of some basic patterns. The sky's the limit, so go build some workflows with Pipes + Zapier and let us know how it goes!