Incoming Webhooks

Summary

It is possible to have JEMHCloud send notification when a webhook has been sent to JEMHC. This allows you to integrate JEMHCloud with a third-party system.

Webhook requests

The webhook must contain the security token (which is provided within the URL that is created by JEMHCloud) and a query parameter. The Query parameter must contain the Issue key and the AccountId of the user that performed the action in order to send the notification to the correct users.

You can use Issue data (Jira format) within the Jira Automation as this will contain the relevant information.

The issue key can be provided by using one of the following formats:

  • ?issueKey=ABC-123

  • {"issue": {"key":"ABC-123"}}

  • {"issueKey": "ABC-123"}

  • {"key":"ABC-123"}

The accountId can be provided by using one of the following formats:

  • ?accountId=a-b-c-d

  • {"user": {"accountId":"a-b-c-d"}

  • {"accountId": "a-b-c-d"}

Example use case - sending a reminder email notification every morning to the assignee of "In Progress" issues.

Within this example we use the Jira Automation feature to send a Webhook every morning for issue that have a status of “In Progress”.

For more info about Jira Automation see: https://docs.automationforjira.com/getting-started/concepts.html

Create the Incoming Webhook action in JEMHCloud

  1. Go to JEMHCloud > Messages > Message Outbounds. Confirm that you have created a mail server connection.

    1. If not then you will need to create a Outbound Mail connection. See the following page for more info: https://thepluginpeople.atlassian.net/wiki/spaces/JEMHC/pages/3764453379

  2. Go to JEMHCloud > Messages > Incoming Webhooks

  3. Enter a name and leave the Action to Send Notification and the Post method

  4. Enter the Message you want to add to the email notification body.

  5. Add the recipients. In this case the assignee.

  6. Press Save. The created Incoming Webhook will appear on the list.

  7. Click on "Show URL" and select and copy the full URL. Automation for Jira will call that URL when executing an Automation Webhook action.

You have created the JEMHCloud Incoming Webhook. If you call that URL providing the right Issue Key, JEMHCloud will send the notification to the configured recipients. The URL caller can be Automation for Jira or any other system, program or script that can hit an URL.

Create the Automation Rule

Now let's create the automation Rule. This rule will run every weekday at 7 AM and it will call the JEMHCloud Incoming Webhook URL we have just created.

  1. Go to your project > Project Settings > Automation > Create Rule 

  2. Select the Scheduled trigger

  3. Enter the Cron expression 0 0 7 ? * MON-FRI

  4. Enter the JQL rule status = "In Progress"

  5. Uncheck the last checkbox so all "In Progress" issues are reminded, not only the changed one

  6. Add a "Send web request" action

  7. Paste the JEMHCloud Incoming Webhook URL and enter the custom data template. The resolved issue key will be posted in the HTTP post request.

  8. Enter the Rule name and Turn it on.

  9. To test the rule and the JEMHCloud integration, click on the "Run Rule". Revisit the Audit Logs to see if there is any problem.

  10. Go back to JEMHCloud  > Auditing > Event. The Incoming Webhook will be processed like any other issue and post function event. The email notification configuration is the one entered in the Incoming Webhook.

  11. Click on the Report icon to view the Report

  12. The email notifications configured in Incoming Webhook should have been sent. This is how the email looks:

Now assignee's will get notifications every morning about their current work. There is a big list of possible triggers you can use in the Jira Automation so you can customize when you want to notify your users.