Categories
Blogg

A Jira filter to Slack bot using Google Sheets

How to create a workflow to send messages in Slack based on Google Sheets or Jira content

I wanted to have a weekly notification in our team Slack channel based on the status of our Jira tickets. We already get messages when a particular watched Jira issue is changed but I was rather looking for aggregated information I could use as metrics and so on.

Long story short; by connecting Jira cloud for Google sheets and Google Sheets for workflow builder I managed to pull information from a Jira filter and present the result in Slack weekly.

The long story

Step 1

Get Jira cloud for Google sheets and install it using these instructions:

Step 2

Populate your sheet from Jira by going to the menu Add-ons -> Jira Cloud for Sheets -> Open…

In the Jira add-on you then connect to your Jira instance and then chose “Get Jira issues”. You can set a number of parameters, such as using an existing filter or type JQL and you can set which fields to import as well as a schedule for how often the sheet should be populated.

Step 3

Install Google Sheets Slack app for workflow builder and then create a workflow using to these instructions.

Step 4

Structure your data in the Sheet so that the Slack app can read them – this is the hard part.
The app assumes you have your data structured in named columns and variable names identifying each row as such

The structure the Slack app is assuming

This means that if you don’t have this structure already you need to add variable names and column headers.

You can also add a small table somewhere with just the results you are interested in:

Example: table with a sum of days for all open tickets

Step 5

Add a workflow step that searches for a row in your sheet and

edit the step so that the row you are looking for is selected

How to use the “select spreadsheet row” with the Example above

Step 6

Choose “Send a message to..” and insert a variable with a column which contains the value you want in your row (See example)

Message with variable from Example above

That’s it! now you can choose when you want your workflow to run etc and you should be able to get all information you want directly in your Slack Channel

Leave a Reply

Your email address will not be published.