Field content post into a report in Confluence [Jira Automation]

Christian Isaza February 25, 2025

Hello, everybody;

I would like to get your input/suggestions; if maybe you know an easier/better way with the built-in features.

In our instance we have a custom field and some automation rules to populate it counting Overdue days.

Now, we are trying to sum up all the overdue days values (within a variable with this smartvalue: {{lookupIssues.customfield_Overdue Days.sum}} ) to then post it in a Confluence existing page, through a Jira Automation rule.

However, I am not very experienced with Confluence Cloud's API and since it seems it is moving to V2 I am unsure on the request syntax, and other details.

This is what I have so far; it's a little messed up because no matter what I try, it always fails with different HTTP error messages.


The GET was to try to get the rule to fetch the page version number and update it automatically before the PUT but I couln't find how to.
Screenshot 2025-02-25 163816.png

1 answer

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 25, 2025

Hi @Christian Isaza 

Updating Confluence pages from rules can be challenging to get the format correct.

I recommend first hardcoding your numbers / values in the JSON to confirm you have the format correct.  Then update to use your dynamic fields.

For example...

  • Your rule uses the smart value {{newVersion}} and that is not defined by the rule.  This would try to put null in the the "version", and so fail.
  • The HTML you are sending needs to be JSON encoded for the call data.  I recommend saving the expression you have in the body's "value" in a created variable, perhaps named varBodyValue.  Then in the JSON, use this: {{varBodyValue.jsonEncode}}

Kind regards,
Bill

Christian Isaza February 26, 2025

Hello, Bill. Thank you so much for your input.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
ENTERPRISE
TAGS
AUG Leaders

Atlassian Community Events