Send a Slack Message Action

This page is about Easy Integrations for Jira Cloud. Using Jira On-Prem? Click the On-Prem button above.

The Send a Slack message action allows you to send a Slack message with the event data and previous action data. The only thing that you need to do is set the URL and the message text, and we will do the rest.

Prerequisites

Before you start configuring the action, ensure you have the following prerequisites in place:

  1. Slack installed on your instance.

  2. Verify that your Slack workspace allows incoming webhooks and that you have the appropriate permissions to set up webhooks for your desired Slack channel.

For more information, refer to Slack documentation.

How to Configure the Send a Slack Message Action

The Send a Slack Message action in Listeners can be accessed within Easy Integration's admin UI. Follow these steps to configure:

  1. Navigate to Jira's top menu, and click Apps.

  2. Select Manage your apps.

  3. In the sidebar, locate and click Easy Integrations configuration.

  4. Select Listeners from the app’s top menu.

  5. Configure the listener according to your requirements. For more information on that, refer to this documentation.

  6. In the Actions section of the listener configuration, click Send a Slack Message.

  7. Here's how to configure the Send a Slack Message action:

    • Action name – Provide a descriptive name for the action to easily identify it later.

    • Condition – Enable or disable the condition.

      When enabled, provide a JavaScript condition for the listener. The action will execute only if the script returns true. You can refer to Context variables, Scripts, and Events for more details. For example:

      return startsWith(data.event.issue.fields.summary, 'Sultans of Swing');

    • Slack URL – Enter the incoming Webhook URL for your Slack workspace.

    • Slack message script – Write a JavaScript script that returns the message text to be sent.

      return "New external ticked (" + data.apiData.api1.responseBody.issueId + ") is created by Jira issue (" + data.event.issue.key + ")";

That’s it! You have successfully configured the Send a Slack Message action in Easy Integrations. For further insights, please refer to the following example:

Example 1: Send a Slack message “A new confluence link is added”

Note: This is a sample use case and can be customized to suit your integration needs.