Forums

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

Creating and Updating a Confluence page via API

Eric Segui Haugli
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 16, 2025

Hello everyone,

I'm trying to set up an automation that follows this structure:

Jira issue is created on a specific project-> Confluence page with a specific template is created. 

Jira issue is updated -> The Confluence page is then updated with the changes made to the Jira issue. 

What is working:

When a Jira issue of a specific type is created in a particular project, it creates a Confluence page in a space using a specific template. This is currently working by using Jira automation to send a webhook, which I then use to collect the data points and create the Confluence page via the API. The Confluence template has placeholders, like [tag], which are replaced with the content of the appropriate Jira field.

What is not working:

Currently my automation takes the empty template, replaces the placeholders with Jira values, then posts the update. This would be a decent working solution, but the issue is, it's deleting any kind of manual input in the Confluence page, as the process of updating the Confluence is basically the same as creating a new page, when it comes to the content of 'storage'.

I am unable to come up with a solution where only specific sections of the Confluence page are updated. For example, fields on specific cells of a table, that would correspond to Description, Tags, Jira issue assignee, etc.

I would be grateful to receive any guidance or ideas. I have the feeling that the solution is somewhere between HTML (being able to create specific sections in the Confluence page) and clever usage of the API to target those sections specifically.

Thanks in advance,

Eric. 

 

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.
April 16, 2025

Hi @Eric Segui Haugli -- Welcome to the Atlassian Community!

I believe your last paragraphs outline what is needed for this scenario using built-in features:

  • an automation rule triggers based on some work item (formerly called "issue") change
  • the relevant Confluence page is identified
  • call the REST API endpoint to load the page content / storage using the Send Web Request action; this ensures the rule is starting from the current state of the page, rather than always starting from the template
  • use smart value, text functions to update the content for the work item changes
  • call another endpoint to update the page content

Experimentation is key for scenarios like this to ensure the page does not get "broken" by the updates.

Kind regards,
Bill

Eric Segui Haugli
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 16, 2025

Thanks @Bill Sheboy for the suggestion! I will take a look at Confluence smart values and try with those. 

Like Bill Sheboy likes this

Suggest an answer

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

Atlassian Community Events