When appending content to page via API webhooks, is it possible to format the new content?

Raphael Teodoro September 25, 2024

I'm doing some automation rules using web requests to append content to Confluence pages and it's working all right.

But I realised that when I need to keep the page current content = webResponse.body.body.storage.value, the custom data JSON doesn't allow me to break lines, create tables, nor highlight bold or italics, for example.

Is it possible to format the content I'm appending somehow and also keep the page current content? What would be the syntax for that?

I've seen some examples in the community where they use "wiki" in the body representation, by using it I could format the new content, but it broke the page current content = webResponse.body.body.storage.value.

Is there a way to make both "storage" and "wiki" work at the same time in the same web request?

This is what I'm using:

//Using representation "storage" to keep page current content
{ "id": "<Page ID>", //pageID "status": "current", "title": "<Page Title>", //Pagetitle "body": { "representation": "storage", "value": "NEW CONTENT VERY LIMITED {{webResponse.body.body.storage.value}}" //Page current content + new content }, "version": { "number": "{{#=}}{{webResponse.body.version.number}} + 1{{/}}" //Increment page version } }

 

0 answers

Suggest an answer

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

Atlassian Community Events