Leverage Action Outputs as Smart Values in Your Jira Automations

When configuring a Trigger Action post function, you can store the output of the action as an issue property, to use in Jira Automations as Smart Values.

This is useful, for instance, when you want to trigger different automation actions depending on the output of an action in one of your integrations.

An example is ideal to explain this feature, so let's get to it. Imagine you would like to trigger a custom automation action after creating a user in your Okta integration.

When you open your Trigger Action Post function, you will find the option to transition to another status after the chain of actions have been completely executed. Actions are ran asynchronously, so it is important to evaluate the output after they have all been completed. You are not forced to use this transition, but it is recommended to evaluate the output properties in the after execution status. For the sake of this example, we selected Resolved.

It is important to note that you can have more than one Trigger Action post function implemented for the same transition. If that is the case, you should select the transition only for one of them.

Once you have selected the transition status, we can proceed to configure the Create User action. The important bit is the option that appears at the bottom of the action configuration.

By enabling this checkbox, the output of the action will be stored in the specified issue property.

The default property path is: issue.properties.multiplierActionsOutput.<actionName>, but you can edit the the property name (multiplierActionsOutput) and the key (actioName) to be used.

If you have more than one Trigger Action post function for the same transition, it is recommended to use a different property name (by default multiplierActionsOutput). It is not mandatory, but this will prevent possible race conditions when updating the issue properties.

For this example, we will leave the default values, but keep in mind you can edit them by clicking on them. You can also copy the smart value path by clicking the copy to clipboard icon. The copied value will include a trailing .success, as it is probably the most useful value to be used in automations.

In this example, clicking the copy to clipboard button will copy:

{{issue.properties.multiplierActionsOutput.createUserWithoutCredentials.success}}

In this example, the User Creation action returns the a success value (true/false), and the ID of the newly created user when the action succeeds. All actions will return success . Hovering the cursor over each of the listed output values will tooltip the description of value.

Click on the checkbox to enable output.

With the configuration in place, we can now design an automation to write a different comments depending on the success value.

The automation is triggered when the issue is transitioned to the selected after execution status (Resolved). It then evaluates the success value written by the action.

The IF condition must use {{smart values}} condition, as we will compare the previously copied smart value path. Use the copied path as first value:

{{issue.properties.multiplierActionsOutput.createUserWithoutCredentials.success}}

In the editor, it looks like this:

Since the automation is triggered when the issue reaches the after execution status, we are guaranteed the action has finished executing, and the properties have been correctly written.

As mentioned above, all actions will export a success true/false value. Some will export other values (user ID in the user creation actions, for instance). If you are using an action that returns a value that it is not being exported, please reach out and we will include it.

Happy automating!

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us