For teams that make use of the Slack platform it can be useful to send notifications of eSign Signature events to Slack. This document describes how to set up eSign, Jira Automation and Slack to enable this type of notification. Microsoft Teams, Twilio, Email and other notification paths can be set up similarly using any of the Actions available in Jira Automation.
Process Overview
At a high level, this is how the notification will work once configured.
A User Executes a Signature in Jira using eSign.
The eSign Execute webhook calls a Jira Automation Rule.
The Jira Automation rule posts a message to a Slack channel.
Slack users will see the configured message that can contain Issue and eSign data.
Configuration
Part 1 - Enable Slack Incoming Webhook
As a Slack administrator, under Apps, click Add apps, Incoming WebHooks, and then Configuration.
In the next page, click Add to Slack and a screen with an option to Add integration will display. Choose a default channel to post to and then click “Add Incoming Webhooks Integration”.
The next page to display will contain the Slack Webhook URL (see below). Copy that URL as it will be needed in Jira Automation.
Part 2 - Setup Jira Automation Trigger
As a Jira Project Administrator, access Project Settings > Automation, then Create Rule to access the Rule builder.
Next, Enter the text “webhook” and click “Incoming Webhook” to add it to the rule.
In the webhook configuration panel, copy and save this new automation webhook URL; it will be needed in part 4. (https://automation.atlassian.com/pro/hooks/…).
Leave all other settings at default, scroll to the bottom and press Next to save the trigger.
Part 3 - Setup Jira Automation Action
Still in the Rule builder, click Add Component and “THEN: Add an action” to show the action search panel.
Enter “slack” and under Notifications > Send Slack Message.
In the Send Slack Message panel that appears, paste the Slack Inbound webhook URL saved from Part 1 (https://hooks.slack.com/...)
Enter the notification message to send to Slack. The message can be fully customized, including Issue data and eSign data. For the demo, suggest starting with something like the following and then modify as needed.
Note: replace the MYCLOUDSITE placeholder with your Jira site URL if you want a hyperlink back to the Jira issue inside the message
Issue: <https://MYCLOUDSITE.atlassian.net/browse/{{issue.key}}|{{issue.key}} {{issue.summary}}> Event: {{webhookData.eventText}} {{webhookData.pendingCount}} signatures waiting: {{ webhookData.pendingList}} Diagnostics (webhookData): {{webhookData}}
Issue: <https://MYCLOUDSITE.atlassian.net/browse/{{issue.key}}|{{issue.key}} {{issue.summary}}>
Event: {{webhookData.eventText}}
{{webhookData.pendingCount}} signatures waiting: {{ webhookData.pendingList}}
Diagnostics (webhookData): {{webhookData}}
‍
Leave the settings at default and scroll down to Next to save the action.
Finally, press Turn on Rule, give it a name (e.g. eSign to Slack Notification), and Turn on rule to save and exit the builder.
Part 4 - Setup eSign Execute Webhook
Final part is to enable eSign to trigger the new Jira Automation rule. To do that access the Project Settings > eSign Project Settings page.
Paste the Jira Automation webhook trigger from Part 2 into the Webhook on Execute field in eSign and press Save Settings.
Testing Integration
After Configuring as above, the integration should be operational. To test, execute a signature on any issue within the test project, and check Slack to see if the message arrives.
Additional Notes
Each eSign project has 3 webhooks events (Invite, Execute and Finalize). They can all be set to the same automation trigger webhook URL to call the same Jira automation rule. Similarly the same webhook URL could be shared for any number of projects that want the same notification rule.
Jira Automation can do conditional logic on eSign webhook data. For example it would be possible to add a condition step into the automation rule to only send notification if pending signatures is greater than zero. Condition would like like this: {{webhookData.pendingCount}} > 0.
Jira Automation could be used to send custom emails and notifications.