TL;DR

Zapier supports most activity triggers for Pivotal Tracker, but not enough types of actions. A little Python code to call Pivotal API helps me get past the limit.

Who is the post for?

Before using it, I found it hard to know the boundary of no-code tools like Zapier. You need to know what’s possible as is, and what it takes to extend the existing functionality.

This post documents our experience and the limitations. It helps you if:

  • you are new to Zapier or evaluating whether to use Zapier, and
  • your workflow involves Pivotal Tracker and you want to automate (parts of) the workflow

The use case

Our team uses Pivotal Tracker to keep track of the features or bugs we are working on. When a Pivotal ticket is accepted, we need to notify a group of reviewers (for auditing purposes).

Currently this is done manually. The goal is to set up Zapier to automate the workflow:

  • When a ticket is accepted, each reviewer receives an email
  • If any reviewer replies to the email, the reply is automatically posted as comment to the Pivotal ticket.

If the automation works well, everyone will be working with the tools they are most familiar with. It saves everyone time and effort of switching from tools.

Automating notifications

Zapier trigger

First, we want to listen to the Pivotal event. There are three types of trigger events:

  • New Story
  • New Activity
  • New Project

image

Since we want the zap to run when a ticket is accepted, and it should belong to the New Activity category.

Zapier filter

By default, any type of activity in Pivotal will trigger the zap to run. But we are only interested in the ticket accepted event, so we add a Zapier filter:

image

Send an email

Zapier has Gmail integration, so the next step is simple:

image

The story doesn’t end here

Because we use Pivotal is usually the place we look at our project progress, we add as much information there as possible. So the next requirement is:

  • If a reviewer replies the email, add the reply as a comment to the Pivotal ticket

In reality, the requirements usually kept growing when we automate the workflow partially..

To support this, we have to create another zap that listens to Gmail event:

image

We select the email matching a text pattern. That part is straight-forward.

We hit the wall of unsupported actions

Next, we want the zap to post the email text to Pivotal. That’s where we hit the wall:

image

In the action list, Zapier doesn’t have the option to post a comment.

Final solution? Code.

We look at Pivotal REST API V5 and found that it supports adding comments via API:

curl -X POST -H "X-TrackerToken: $TOKEN" -H "Content-Type: application/json" -d '{"text":"If this is a consular ship, then where is the ambassador 👅?"}' "https://www.pivotaltracker.com/services/v5/projects/$PROJECT_ID/stories/$STORY_ID/comments"

And Zapier supports adding Python code as a step:

image

So we write a Python script to post comments to the story:

headers = {'X-TrackerToken': 'xxxx'}
pivotal_url = f"https://www.pivotaltracker.com/services/v5/projects/{project_id}/stories/{story_id}/comments"
comment = input_data['gmail_content']
response = requests.post(pivotal_url, headers=headers, data={'text': comment})
response.raise_for_status()

And that solves our problem.

Closing thoughts

This post talks about how we use Zapier to automate some steps of the Pivotal Tracker workflow. Because of the limited actions supported by Zapier, we end up using Python code and call Pivotal REST API for posting comments.

The overal experience with Zapier is smooth. Zapier supports many apps and programming logic out of the box, like filter, text processing.

However, it can still run into a limit because some triggers or actions are not supported yet. If you are looking for completely no-code solution, you should bear this in mind.

Thanks for your read!

If you want to learn about Zapier or no-code, subscribe to my newsletter!


Email Newsletter

I write about code and entrepreneurship. Sign up and get my updates straight to your inbox!



Junji Zhi

Senior Software Engineer.