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

Raphael Teodoro
Contributor
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 } }

 

1 answer

0 votes
Brant Schroeder
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 10, 2024
Raphael Teodoro
Contributor
November 10, 2024

markup can only be used after page creation, isn't it the case?

Are you saying that markup can be used when at the moment of writing the JSON via webhook?

Can you please clarify?

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