Atlassian Team members are employees working across the company in a wide variety of roles.
August 14, 2024 edited
@Eric Sebian Power Automate and flows should be automatically added if you have a license for Office 365 products (i.e. Teams). And you will need some additional PA license in order to use Premium triggers and actions in you flows, but it not the case for this tutorial.
One more point that should be checked - the webhook URL from the first step should be encoded as it will not work in Jira (please check Jira logs for the errors. com.atlassian.webhooks should be enabled in Logging and Profiling):
HTTP POST URL should be decoded or all ‘%2F' should be replaced with the '/’, otherwise Jira Webhook will throw 403 error code
The domain for the webhook should be added to the Allow list in order to send data to the webhook. otherwise, it could be blocked.
For what I can see "Flow '' is not installed can happen when the flow is misconfiguration".
Atlassian Team members are employees working across the company in a wide variety of roles.
August 14, 2024 edited
@Eric Sebian we are not using PREMIUM actions for this flow, so your license should work properly.
As for the error you can see while trying to run the flow manually - it seems that is related to how Parse Json test run is working, as we should put the test data there (type - "object", attachments - JSON with Jira event). I can see this error as well even with using valid data that should be parsed.
If you are not seeing any data in run history for your flow I can assume the trigger is not working and you have never received any messages to that endpoint. And the reason for that can be - Jira Webhook is not sending data due to wrong URL, as it should be encoded (see my previous comment). Jira is blocking requests to the workflow generated domain (webhook URL domain from "When a Teams webhook request is received").
as far as I can see those endpoints doesn't require any authentication at all. Please check Authorization tab in your Postman as it can take some auth headers from previous requests you have done (at least on your screenshot there is some data).
Atlassian Team members are employees working across the company in a wide variety of roles.
August 15, 2024 edited
@Eric Sebian on the latest screenshot I can see the different set of steps from what you have shared before and it doesn't much the steps from the guide above. Please follow the guide and add the exact steps as:
Atlassian Team members are employees working across the company in a wide variety of roles.
August 15, 2024 edited
@Eric Sebian on the latest screenshot I can the the different set of steps than was provided in the guide. Please follow the guide and fill in all the required fields. In the end you should receive the flow like:
Please make sure you are sending exactly the same POST requests with test data as in my previous comments to test the flow. The error "Unable to process template..." can happen only if you send POST request with no data:
you are using one of the predefined flows in Power Automate, not the one described in the guide. We are sending JSON to the flow that is expecting Adaptive card. The failure can send in the latest comment is expected.
The flow, you can perform Postman test against, is: "When a Teams webhook request is received" -> "Parse JSON" -> "Post card in a chat or channel". If you send post request to such flow, you should receive a card in defined Teams channel:
When I plug the same webhook into jira, there is no connection at all. Doesn't show in the run history. Do I need to white list the power automate url (https://make.powerautomate.com/)?
If the workflow is working (confirmed above) and you are not receiving any updates from configured Jira DC webhook please try to do next steps:
- the webhook URL from the first step ("When a Teams webhook request is received") should be decoded as it will not work in Jira (please check Jira logs for the errors. com.atlassian.webhooks should be enabled in Logging and Profiling) - please add the webhook URL from the first step ("When a Teams webhook request is received") to the allow list in your Jira DC, so Jira can send data to that URL, i.e. prod-24.westus.logic.azure.com or *.westus.logic.azure.com.
from the guide:
HTTP POST URL should be decoded or all ‘%2F' should be replaced with the '/’, otherwise Jira Webhook will throw 403 error code
The domain for the webhook should be added to the Allow list in order to send data to the webhook. otherwise, it could be blocked.
I tried them all and Domain was the correct selection. I'm now seeing the comments go into the teams channel! I just need to figure out why the status "In Progress" when that's not the status. Thanks again for all of your help!! you are the best.
Glad to hear that you were able to configure workflows and now you are receiving updates in your Teams channel. If you are going to have Jira notifications in few Teams channels and you need to create separate workflow for each channel. In that case you'll receive unique webhook URLs from the first step. So it so it is better to add to allow list a wildcard record (i.e. *.westus.logic.azure.com).
Will do! I'm almost there! can you tell me 2 things? 1. Why am I getting 2 run histories, and one of them errors, everytime the flow is triggered by the jira webhook:
And the 2nd question is: Why am I getting the incorrect status showing in the card? Is it hard coded in the code somewhere? I look for a reference to status in the JSON code but couldn't find anything.
I'm hoping that, once this is fixed, we'll be done!! Thanks again!! ejs
For the Question #1: From the it seems that Jira Webhook is sending two events (maybe just when comment is added) and the second one has a totally different schema...Regularly Jira webhook should send just one event having the same format all the time. Is it possible that you have some custom configuration or app installed that can send another event? You can try to reach Atlassian support to investigate this issue - https://support.atlassian.com/contact/.
Another option you can try - modify workflow a bit and add conditions to send the card only if the trigger body has expected format:
- add new step "Condition" after Parse JSON step - drag and drop last step to the True section under condition - select condition and set next options - body('Parse_JSON')['issue'] IS NOT EQUAL TO (EMPTY_VALUE) - body('Parse_JSON')['user'] IS NOT EQUAL TO (EMPTY_VALUE)
In the end you should receive similar condition as above ^^. Please note that in that case the workflow will be triggered for both event coming from Jira, but only one of the will send the card to the channel. The second one will be executed successfully, but will do nothing.
For the Question #2:
The status is taken from the webhook event. Please check one of the Successful run and check what value is coming under Parse JSON -> INPUTS -> status -> status category -> name. This values is taken and displayed on UI (value is not hardcoded):
UPD for Question #1:
Jira is sending two events when comment is created 1) "webhookEvent": "jira:issue_updated", "issue_event_type_name": "issue_commented" 2) "webhookEvent": "comment_created"
The second one will fail as we are using the schema for the first event types only. To fix it we can add condition after Parse JSON to not process the second type of events
"body('Parse_JSON')['webhookEvent']" Is not equal to "comment_created" and send card only if that condition is met:
65 comments