Hello! I am looking for help on how to setup key-value pairs on a Jira form that will trigger an automation to start runbook in Azure. (https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Start-runbook-in-Azure)
In this case, I want to pass the values from my form fields to Azure:
FIRSTNAME and LASTNAME are the keys that Azure is expecting... what do I need to enter in the value fields to grab the corresponding data from the form fields?
The action to start runbook in Azure, is not able to use smart values (values from other fields to be used in other automation actions or conditions)
So in this case I don't see that the request you have is possible, as you only can specify a key pair in the action directly.
Sorry, not sure I follow. Are you saying I can't pass the values of my form fields to Azure? Seem like that defeats the entire purpose of providing key-value pairs?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In the action "start runbook in Azure" you can set defined values, but these values can't be provided by input in fields in an issue.
This can only be done by using automation smart values, but the action "start runbook in Azure", can't use smart values as stated in the documentation.
The values you can use in the action are values in Azure, as the action already requires you to connect Jira with Microsoft Azure.
So the details you can provide in the action, are values, that exist in Azure, but can't be taken from fields in Jira.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for clarifying. This is pretty disappointing and seems like a functional oversight to not be able to simply pass form field values to a runbook. In my case, I was hoping to create a new user account request form (amongst others) but I guess if the values don't already exist in Azure then this automation is pretty limited in scope.
I did find a way to pass some data to Azure, but it's a pain in the butt. For those interested.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Justin Buckley "functional oversight" is an understatement!
I've just discovered that I can't use variable/smart values. I don't understand the "values, that exist in Azure" comment from Marc. Why does the value need to exist in Azure (rhetorical). My runbooks have mandatory typed parameters which match the key/value pairs in the Jira automation. I can enter any value of the correct type into these parameters when I manually run the runbook so why can't I send a variable/smart-value through the automation rule.
If I send the wrong value/type, then that's on me. It's a one-way integration afaik so not sure why Jira would care what value I send through the automation. The cynic in me thinks that Atlassian are angling to make this an Enterprise feature.
Sorry for the rant. Will take a look at your link and see if I can use that. Thanks for posting.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Justin Buckley - did you investigate using a runbook webhook with the Jira 'send web request' action? This looks like it might work but have only skimmed the details so far.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Fwiw, in case someone else stumbles across this, a Jira 'Send web request' action to an Azure runbook webhook is working for me. In my basic test, I'm specifying custom data in the Jira request body:
[ {"upn" : "{{reporter.emailAddress}}", "task" : "remove"} ]
My PowerShell 7.2 runbook takes this and adds/removes the reporter from an Azure Ad group using the Microsoft Graph.
It should be easy to extend this to more complex processes.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@ian do you think you would be able to pass a ticket number to the webhook? I just discovered this as an option for automation and am looking to run some commands on tickets as they come in but, not sure how to pass the issue key to the webhook.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Scott Holland You can find Jira Cloud automation smart values here: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/
I think you want {{issue.key}}.
You should be able to pass any of these smart values to the runbook webhook in JSON format. You can technically pass all the ticket values as JSON but I've found it easier in the runbook to deal with just the values I need.
Your comment "run some commands on tickets" has me wondering if you realise this is one direction: Jira to Azure. If you want the runbook to do something with Jira tickets then it would need to connect back to a Jira webhook or similar. I've not done anything in that direction because we've been able to use Jira automation to do all that we need inside our Jira environment.
We have a PowerApp that updates items in Jira Assets with properties from Azure AD but this basically uses the Assets import function. These items are surfaced in our tickets. Some of the third-party apps do this much better now so we may switch to one of them soon.
I hope that answers your qu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@ian i came across your comment about using the 'Send web request' action in Jira to trigger an Azure Runbook. I'm currently trying to achieve something similar — running an Azure Runbook from Jira based on information entered in forms. Could you please provide more details about how you set it up? Like, what does the Send web request configuration look like in Jira Automation (e.g., headers, body, url)? did you need to include any specific authentication setup (like Azure AD token or shared access key)?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Mafe Ortega . I've not touched this for a bit so will explain as best I can.
Add a webhook to your Azure runbook. This will generate a URL that includes a unique token. You need to copy the webhook URL before you finish creating the webhook because you cannot get it again later.
I store these in the secure vault of our password/identity management tool in case I need to refer to it again.
In your Jira automation add a 'Send web request'. Paste your Azure webhook URL in the URL field. Choose POST as the method.
In the 'Web request body' field I chose 'Custom Data' and have this in the Custom data field:
[ {"upn" : "{{reporter.emailAddress}}", "task" : "remove"} ]
In the Azure runbook, I have one parameter like this:
param
(
[Parameter(Mandatory=$false)]
[object] $WebhookData
)
$jiraData = ConvertFrom-Json -InputObject $WebhookData.RequestBody
$upn = $jiraData.upn
$task = $jiraData.task
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.