Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Jira Automation to append content to Confluence

Jose Quispe August 14, 2025

I am trying to make use of the Jira Automation feature to append comments made on Epics to a Confluence page that my team wants to use as overview of the relevant notes made by other colleagues on this work items, so far I have made the automation work and every time a new comment is logged on an Epic the automation appends successfully the URL, Key, CommentTimestamp, CommentAuthorName and CommentBody.  The problem is that the values returned in CommentTimestamp, CommentAuthorName and CommentBody contain ALL comments logged in the Epic not just the LAST ONE which is what I am after, in other tools I could imagine something like parsing the response (because I see is comma separated) and only write the last value of that list, BUT have no idea how to achieve that in the Jira Automation tool, anyone has experienced anything similar OR knows how to go about this.  Thank you!

1 answer

1 vote
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.
August 14, 2025

Hi @Jose Quispe -- Welcome to the Atlassian Community!

For a question like this, context is important for the community to help.  Please post the following:

  • an image of your complete automation rule in a single image for continuity
  • images of any relevant actions / conditions / branches
  • an image of the audit log details showing the rule execution

Until we see those...

If the trigger for your rule is the adding of comments to the work item, you could reference the last comment only from the list of comments to add it:

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-lists/#list.last

 

Kind regards,
Bill

Jose Quispe August 14, 2025

@Bill Sheboy thank you that documentation helped a lot! are you aware of any kind of "trigger" that would take the system date and based on a day of the week allow to perform an action?

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.
August 14, 2025

If I understand your question, the Scheduled Trigger would work:

https://support.atlassian.com/cloud-automation/docs/jira-automation-triggers/#Scheduled

 

When using a different trigger and you want to compare the current date to a specific day of week, the date / time functions will help:

Like Jose Quispe likes this
Jose Quispe August 18, 2025

Now I seem to be having another issue with regards to how the automation posts the messages on Confluence, the URL of the tickets appears as I want them to but the details I extract from each update now appear blocked and have a tag "Unlicensed user", any ideas what this could be?

Image.png

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.
August 18, 2025

To provide context for what you describe, please post an image of your rule action to update the Confluence page.  Thanks!

Jose Quispe August 29, 2025

@Bill Sheboy here an image of the automation, the trigger is any comment posted on the Epics of the project in JIRA, thanks in advance for any guidance you can provideScreenshot 2025-08-29 at 17.28.00.jpg

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.
August 29, 2025

Thanks for that image, @Jose Quispe 

Your rule is adding {{issue.comments.last.author.displayName}} to the page, and the resulting content indicates they are not a Confluence user.  Does the page access allow unlicensed users to post comments?

Jose Quispe August 29, 2025

Thank you for the reply! in theory all users in our team have access to Confluence, and in theory the space and page, but for some reason this particular attribute only gets rendered for Admins, what puzzles me is that even if I remove that property the comment is also not being sent to the page, any ideas?

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.
August 29, 2025

That is curious...two more things to try:

#1) Because the trigger is for adding a comment, there is an additional smart value: the singular one {{comment}} for the comment added which triggered the rule.  And so rather than using {{issue.comments.last}} use just {{comment.created}}, {{comment.author.displayName}}, etc.  This may help isolate the cause.

 

#2) This could also be a timing problem in the rule.  Specifically, some data cannot be looked up fast enough for a rule action to use.  This may be checked by using the Create Variable action:

  • trigger: Work Item Commented, as the main action
  • action: Create Variable
    • name: varCommentInfo
    • smart value:
{{issue.comments.last.created}} - {{issue.comments.last.author.displayName}} - {{issue.comments.last.body}}
  • action: Edit Page, setting the content to:
{{issue.url}}
{{varCommentInfo}}

 

What this does is fully evaluate the information needed from the comment first, storing that as plain text in a variable.  When the variable is used later in the action, no additional handling is needed.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events