Use Webhooks to Add Jira Automation to Checkout Automation
Create an Automation rule in Jira
Use the “Incoming Webhook” Trigger
Select “No Issues from the webhook”
“Copy URL” to paste into the Checkout Automation later.
After the Trigger, add a “FOR EACH: Create a branch” component and select “Advanced Branching”
Enter “{{webhookData.items}}” in the “Smart value” input, and “item” in the “Variable name” input.
The data sent to the Jira Automation webhook from Checkout Automation can vary, in this specific scenario, it will send a list of items. The below image is an example of the json it sends:
Add a “Create issue” action component in the branch. Select the target Project, target issue type, and enter “{{item.itemTitle}}” in the “Summary.” (Note, that you cannot select either “Same project” or “Same project as trigger”, the automation will not work!)
Save and Publish the rule.
Navigate to Checkout Automation.
Click “Create Rule” and select the “Request created” Trigger
Add a “Send Webhook” action component.
Select “POST” in “HTTP method”
Paste the Webhook URL that you copied from the Jira Automation rule
Enter “Content-Type” and “application/json” in the “Headers (optional)” text inputs.
Click “Save” and “Publish Your Changes” and you should be all set!
Referencing Issue Keys With Jira Automation
In order to reference your order’s issue key with the above-described method, follow the same steps but select the option to ‘Execute this automation rule with Issues provided in the Webhook HTTP POST body’ in Step 3, and then reference the smart value of {{issue.key}} in Step 7 when specifying the content of your automation.