Tag Confluence page creator in comment added via REST API

Matt Baker January 10, 2023

We manage a knowledge base review process for our Confluence articles from a Jira Service Management project. 

When the article comes due for its annual review I want to add a comment to the article using a JSM automation with a 'Send web request' action. In the comment I want to tag the Confluence article creator. 

Each article has a corresponding JSM task the use to 'track' the KB articles. The creator of the article is also set as the 'reporter' on the JSM issues. 

I tried sending this body in the 'Send web request'. 


{
"type": "comment",
"space": {
"key": "TSS"
},
"body": {
"storage": {
"representation": "storage",
"value": "[~accountid:{{reporter.accountId}}] please review."
}
},
"container": {
"id": 1538850821,
"type" : "global"
}
}


This successfully creates a comment, on the article, but the reporter ID doesn't result in a tagged user in the comment. It looks like this...

[~accountid:xxxxxxxxxxxxxxxxxxxxxxxx] please review.

(I masked the account ID for this posting)

Is there a way to do this?

1 answer

0 votes
Charlie Gavey
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 15, 2023

Hi @Matt Baker,

It could be worth considering using Automation for Confluence to support with this use case - you can read more about it here:
https://community.atlassian.com/t5/Confluence-articles/Introducing-Automation-for-Confluence/ba-p/1978202

 

Cheers,

Charlie

Suggest an answer

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

Atlassian Community Events