When we create an automation that uses the action component "Log output to playbook" we get errors when the automation is triggered outside a playbook. Is there a way to test the source of the trigger and branch to prevent this step if not triggered in a playbook?
1. company-managed
2.
3. see above
4.
5. The issue happens when the automation is triggered from the automation button outside of the playbook. This automation can be used in multiple ways. The rule is configured to alert on errors which is triggered when used outside the playbook.
hi @Automation
Welcome to the community.
Whenever you ask for help with an Automation Rule it will help us to help you if you provide:
1. what type of project is this (e.g., company-managed, team-managed, etc.),
2. images that show your complete rule.
3. images showing the details of any relevant actions/conditions/branches.
4. images showing the Audit Log details for the rule execution.
5. Explain where the issue is.
These questions are not for not willing to help, but to have community members understand on how automation works.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI @Automation
What are the details of the web hook action and the log action
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The webhook sends a few fields to an external product and waits for a response.
The log action is a simple set of key-value pairs along with the name of the initiator.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you show the details of the log action.
Playbook output can't be jst anything, see the related documentation: https://support.atlassian.com/jira-service-management-cloud/docs/run-a-playbook-and-view-outputs/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am not sure what you are asking. I posted the entire log of the action. I am not sure what your link has to do with the question. There is no issue when the automation is run from the playbook. The issue occurs when the same automation is triggered outside the playbook, specifically from the automation button on the right panel of the issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Automation So if you execute this outside the playbook, then the playbook is not in play and the log action will provide an error as the playbook wasn't used in the execution.
Then you are sending a web request, to get log information back you would need to use a Log action in the rule.
Use the smart value {{webResponse.body}} to get information from the made web request call.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I want to make sure we are on the same page with what we are wanting to do.
The goal is to have an automation which can be executed as part of a playbook and on its own without causing any errors. If the automation is run in a playbook step, it should return the results to the playbook using the show output button. If it is run by selecting from the automation button not inside a playbook, it should run without error.
The automation calls an external product which performs a set of enrichment tasks. The results of each task are attached to the Jira issue as attachments.
The current issue is the automation does not provide logic to determine if it was called inside a playbook or not. If it is called from a playbook, we would like to use the "Log output to playbook" action to send a copy of the data to the playbook. When called outside of a playbook, the returned data would not be used.
Logic needed:
1. Manually trigger automation
2. Send data via webhook and wait for response
3a. If trigger was within a playbook step, add response to playbook step
3b. If trigger was not within a playbook step, ignore response data
The specific need is to be able to determine where/how the automation was triggered so we can provide the correct path for the response data.
I hope this helps clarify the need.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Automation
This is not feasible.
As on running the rule, there is no way to determine if the rule is executed from a playbook or from an issue.
Your only option is to have 2 rules.
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.