Creating a Workflow

In this example, we will create a Slack workflow that starts when you add an emoji to any Slack message and converts that message into a Jira issue.

Read the Getting Started page for information about Troopr's Slack workflow steps and how to get them setup in your Slack workspace.

If you do not see Troopr's workflow steps in your Slack Workflow, please make sure you update to the latest version of Troopr by clicking on "Try Troopr" on our website

Create a new Slack workflow

To create a workflow, go to Slack and click on your Slack workspace name on the top left to see the drop down menu. Choose Tools -> "Workflow Builder".

Document image

This will launch the Slack Workflow Builder. Create your own workflow by clicking on the ‘Create’ button. 

Document image

Give your workflow a name and click next. 

Document image

Choose a way to start

Slack workflow supports the following ways to start it.

Document image

In our example, we want the workflow to start when someone adds an emoji to a Slack message. So lets select ‘Emoji reaction’ and select the channel and the emoji to use.

Document image

The 1st step of the workflow is now created.  

Document image

Get the message text

Now we need to get the text corresponding to the message where the emoji was added. For this purpose we will use Troopr's "Extract Message" step. Click on ‘Add step’ and add ‘Extract Message’. 

Document image

Now we can configure the "Extract Message" step by providing the link to the message. Click on ‘Insert a variable’ and select ‘link to a message reacted on’ from the trigger step and save the step. 

Document image

Create Jira issue

Now we proceed to create a new Jira issue using the extracted message text as summary.

Click on ‘Add step’ and choose Troopr's ‘Create Jira Issue’ step.

Specify the project where you want the Jira issue to be created, the issue type and summary of the Jira issue. For the summary, we want to use the extracted message from the previous step. Click on "Insert a variable" and choose "Message Content" from the previous "Extract Message" step.

You can also set values for other fields of the Jira issue you want to create. The list of issue fields will depend on the issue type you choose. Once you have filled in the details, click save. 

Document image

Send response to Slack

Next, we want to send the response to the Slack user who added the emoji with the details of the Jira issue that we created. Click on ‘Add step’ and add ‘Send a message’ step. You can choose to send this message to a channel, person or message thread. For this example, lets choose "Person who sent original message". For the message text that we want to send, insert the Jira issue details by clicking on "Insert a variable" and choose "Issue Url" and "Issue Key" from the previous "Create Jira issue" step.

Document image

This is how your final workflow would look like.

Document image

Publish the workflow

Click on publish button on the top right to publish this workflow. Publishing a workflow makes it available in the channel that you specified during set-up. As soon as a workflow has been published, it will launch each time it’s triggered. Read more about publishing workflow here.

Next read about Testing the Workflow you just created.