Send an Email for a Jira Issue Action

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

The Send an Email for a Jira Issue action allows you to an email about a Jira issue to selected recipients. This documentation provides step-by-step instructions on how to configure this action within Easy Integration.

How to Configure the Send an Email for a Jira Issue Action

The Send an Email for a Jira Issue 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 an Email for a Jira Issue.

Here's how to set up the Send an Email for a Jira Issue action:

  1. Action name – Give a descriptive name to easily identify this action.

  2. 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');

  3. Custom issue key – When unchecked, the event’s issue will be used. When checked, a custom issue will be used.

  4. Issue ID or Key script – Write a JavaScript script that returns an Issue ID or key. You can use event data or previous action data in the script. For example:
    return data.apiData.api1.responseBody.issueId;

  5. Subject – Write a JavaScript script that returns the subject of the email. Event data or previous action data can be used in the script. For example:
    return data.event.issue.fields.summary;

  6. Message – Write a JavaScript script that returns the content of the email. Event data or previous action data can be used in the script For example:
    return data.event.issue.fields.summary;

  7. Default recipients – Select the default recipients to whom this email will be sent.

    • Assignee: Enable to send the email to the issue's assignee.

    • Reporter: Enable to send the email to the issue's reporter.

    • Voters: Enable to send the email to the issue's voters.

    • Watchers: Enable to send the email to the issue's watchers.

  8. Custom recipients: Add custom recipients.

    • Jira Users: Add Jira users to the email's send list.

    • Group: Add groups to the email's send list.

    • User Field: Add user fields to the email's send list.

    • Group Field: Add group fields to the email's send list.

  9. Click Save, and then save your listener configuration as well.

That’s it! You have successfully configured the Send an Email for a Jira Issue action in Easy Integrations. To gain more insights, check out the following example:

Example 1: Send an email

The following example sends an email to the assignee about an issue, in which its issue key is fetched from the second action response, and the subject and message are retrieved from the first action.

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