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
Go to JEMHCloud > Messages > Message Outbounds. Confirm that you have created a mail server connection.
If not then you will need to create a Outbound Mail connection. See the following page for more info: Message Outbounds (Email)
Go to JEMHCloud > Messages > Incoming Webhooks
Enter a name and leave the Action to Send Notification and the Post method
Enter the Message you want to add to the email notification body.
Add the recipients. In this case the assignee.
Press Save. The created Incoming Webhook will appear on the list.
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.
Go to your project > Project Settings > Automation > Create Rule
Select the Scheduled trigger
Enter the Cron expression 0 0 7 ? * MON-FRI
Enter the JQL rule status = "In Progress"
Uncheck the last checkbox so all "In Progress" issues are reminded, not only the changed one
Add a "Send web request" action
Paste the JEMHCloud Incoming Webhook URL and enter the custom data template. The resolved issue key will be posted in the HTTP post request.
Enter the Rule name and Turn it on.
To test the rule and the JEMHCloud integration, click on the "Run Rule". Revisit the Audit Logs to see if there is any problem.
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.
Click on the Report icon to view the Report
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.