-
Type:
Suggestion
-
Resolution: Unresolved
-
Component/s: Rule - Smart Values
-
Jira Service Management, Confluence
Summary
Currently, Automation for Confluence and Jira does not evaluate nested smart values that are contained within the output of another smart value.
A common pattern is to use webResponse.body.body.storage (or similar smart values) to fetch a page’s body in storage format via send web request action. If the returned storage format contains additional smart values (for example {}{{page.id}}), Automation treats them as plain text and does not resolve them.
This limitation prevents admins and power users from building more advanced, dynamic automation patterns where content containing smart values is fetched and then re-used or rendered with those values evaluated.
Detailed Use Case
Scenario
- An automation rule (in Confluence or Jira) calls an API that returns a Confluence page body in storage format.
- Example smart value:
{{webResponse.body.body.storage}
- The page body includes smart values meant to be evaluated by Automation, such as {}{{page.id{}}}.
- Example response value of webResponse.body.body.storage:
<table data-table-width="1800" data-layout="align-start" ac:local-id="*********"> <tbody> <tr ac:local-id="*********"> <th ac:local-id="*********"> <p local-id="*********f"><strong>PID</strong></p> </th> <td ac:local-id="*********2"> <p local-id="*********">{{page.id}}</p> </td> </tr> </tbody> </table>
- This value is then used in a subsequent automation action (for example, another send web request action to create another page) by inserting the original smart value: webResponse.body.body.storage
Expected behaviour:
- When the automation runs, the inner smart value {{page.id}} (and similar) should be evaluated in the context of the current rule execution, and the final rendered content should contain the actual page ID (e.g. 123456) instead of the literal {{page.id}} string.
Actual behaviour:
- Automation outputs the inner smart value as-is. The result shows {{page.id}} as plain text, without substitution, despite being within the content produced by another smart value (webResponse.body.body.storage).
5. Suggestion for Implementation
Core Idea
Introduce nested smart value evaluation (or “two-pass” evaluation) for Automation for Confluence and Jira.
When a smart value like {{webResponse.body.body.storage}} produces a string that contains patterns matching smart value syntax (e.g. {}{{...}}), give admins an option to have Automation:
- Interpret the output string as a template; and
- Evaluate any valid smart values within that template in the context of the current rule execution.
Potential Approaches
Introduce a new function to explicitly evaluate nested smart values. ** Add a function like any one of the following:
{{webResponse.body.body.storage.evaluateSmartValues}}
{{evaluateSmartValues(webResponse.body.body.storage)}}
Behavior:
- The initial smart value is resolved.
- The resulting string is parsed for additional smart values and evaluated once more, in the same rule context.
- The final string (with nested smart values resolved) is returned.
This keeps the behaviour opt-in, avoiding any unexpected changes to existing rules.