Forums

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

Jira Automation - Use smart values inside automatically created confluence pages

Fabian Gropp
March 18, 2025

I want to use jira automation to create a confluence page every time a release version is created in jira. In additon, I want to use the smart values (e.g. {{version.name}}) inside my confluence page template.

How can I achieve it? If its not possible, how could I achieve something similar (without apps like ARN)?

6 answers

3 votes
Sebastian Krzewiński
Community Champion
March 18, 2025

Hi @Fabian Gropp 

 

What you can do is to create confluence page via rest api in jira automation rule. Then you can use any jira smart values that you want.

 

Regards,
Seba

Fabian Gropp
March 18, 2025

Hi Seba,

thanks for your fast reply. The problem here is, that my template is quite complex. This makes it rather difficult to use the rest api with its json like format. So, the workflow have to be something like this:

    1. Create release version inside the project.
    2. This should trigger the creation of the confluence page.
    3. Replace all occurences of release_version_placeholder inside the template with the created release version.

Is there another way? Or an easier way to combine it with the rest api?

 

Sebastian Krzewiński
Community Champion
March 18, 2025

I would do this in below steps:

  1. Create new version
  2. New version will trigger confluence page creation via rest api
    1. page is not created from template
    2. page is created with body that you want
Like # people like this
Fabian Gropp
March 18, 2025

Thanks for your reply - seems promising.

How would you create the body content similar to the template?

I could copy the content of the template via the python3 api:
    -> content = page["body"]["storage"]["value"]


But (I guess) the content does not match with the content the web hook would like to receive as body content.

Sebastian Krzewiński
Community Champion
March 19, 2025

I did that by create empty page from template and get content via rest api and use it in page creation. Unfortunately at this moment there is no way to combine create page from template and add new items at the same time.

1 vote
Fabian Gropp
March 21, 2025

Hi guys,

many thanks for all the replies!

We found a different solution on how to handle this.

1. We use a third library tool to create the page when a new release is created. From a privacy perspective this is fine, as a template contains only raw data. This tool replaces all placeholders for the release version, including the placeholders inside the generic issue filter.

2. Afterwards we run a script to fill the page with content.

 

1 vote
Lukas Nicolai_Seibert
Atlassian Partner
March 18, 2025

@Fabian Gropp If using an app is an option for you, I think AutoPage could be a really good solution for this use case.

  • It automatically creates Confluence pages from Jira issues based on certain triggers.
  • A trigger could be, as you described, a status change to "released."
  • Confluence pages are automatically populated with information from your Jira issues, such as forms, descriptions, or summaries (e.g., version name).

 

Here you find AutoPage: https://marketplace.atlassian.com/apps/1218503

 

Hope this helps! Feel free to let me know if you have any more questions.

Best regards, 

Lukas 

Fabian Gropp
March 18, 2025

Hi Lukas,

thanks for your answer.

It seems like a possible solution on first glance (like ARN). Unfortunately apps as a solution are not possible due to data privacy concerns in general.

 

0 votes
Priam Sampaio
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!
December 9, 2025

I found @Vishal Biyani 's answer very useful, and I have completed it with my findings below - As of December 2025.

 

In my case, I wanted to create a Confluence page after a Work Item was created, as a manual trigger. I wanted the Confluence page to list all the linked work items to the main work item.

 

As a result, a new confluence page will be created under the designated parent page, the title will be " <DATE> <TIME> - <WORK_ITEM_KEY> ", and the body will follow the confluence template defined below.

 

--- Prerequisite ---

 

 #1. Create a Confluence template

Title: 

Release note (Jira Automation in progress)

Body:

On WI_END_DATE, 
A new update will be released which closes these items:

LINKED_WI_LIST

 

#2. Create a Confluence API Key

This API key is required to update the Confluence page via the Automation below.

You can do so in your Atlassian Account Settings > Security > Create and manage API tokens > Create API Token > Confluence. Copy the generated secret key and create a Base64 string using an online tool such as base64encode.org. The string you want to encode is:

<your_user_email_adress>:<your_API_key>

Keep this base64 string to use in the automation below.

 

 

--- The Automation ---

 

When: Manually Triggered

Condition: "End Date" field is not empty

 

Then: [ACTION] Publish New Page in Confluence

- Select the target space

- Select the target parent page

- Page Title: (Here, use a temporary page title that is unique and self-explanatory)

... Example:  12/10/25, 10:10 AM - TB-647  (Automation in Progress)

{{now.shortDateTime()}} - {{issue.key}} (Automation In Progress)

- Choose your Confluence Space where the template is located

- Select your Confluence Template

 

And: Send Web Request

This web request will allow us to fetch the new Confluence Page's version, which is required to update the Confluence page.

- URL:

https://<YOUR_SITE>.atlassian.net/wiki/api/v2/pages/{{page.id}}?body-format=storage 

- HTTP method: GET

- Web request body: Empty

- Check the option: Delay execution of subsequent rule actions

- Add Header:

Key: Authorization
Value: Basic <YOUR_BASE64_STRING> 

- Add another Header:

Key: Content-Type
Value:
application/json

- Add another Header:

Key: Accept
Value: application/json

 

And: Create Variable

Name: NewPageVersion

Value: {{webResponse.body.version.number}}

 

And: Create Variable

Name: TemplatePageContent

Value: {{webResponse.body.body.storage.value}}

   

And: Create Variable

Name: WIEndDate

Value: {{issue.customfield_10419.shortDateTime()}}

(This variable points to my custom field, adjust accordingly)

 

And: Create Variable

Name: ModifiedPageContentA

Value: {{TemplatePageContent.replace("WI_END_DATE", WIEndDate)}}

 

And: Create Variable

Name: LinkedWIListString

Value: 

{{#issue.issueLinks}}<p><a href="https://<YOUR_SITE>.atlassian.net/browse/{{outwardIssue.key}}" data-card-appearance="inline">{{outwardIssue.key}} - {{outwardIssue.fields.summary}}</a></p>{{/}}

 

And: Create Variable

Name: ModifiedPageContentB

Value: {{ModifiedPageContentA.replace("LINKED_WI_LIST", LinkedWIListString)}}

 

[ If you need to replace more variables, duplicate the few actions above to fit your needs ] 

 

And: Send Web Request

This web request will allow us to update the new Confluence page with the modified body

- URL:

https://<YOUR_SITE>.atlassian.net/wiki/api/v2/pages/{{page.id}}

- HTTP method: PUT

- Web request body: Custom Data

- Custom Data:

{
"id": "{{page.id}}",
"status": "current",
"title": "{{now.shortDateTime()}} - {{issue.key}}",
"body": {
"representation": "storage",
"value": "{{ModifiedPageContentB.jsonEncode}}"
},
"version": {
"number": "{{#=}}{{NewPageVersion}} + 1{{/}}"
}
}

- Check the option: Delay execution of subsequent rule actions

- Add Header:

Key: Authorization
Value: Basic <YOUR_BASE64_STRING> 

- Add another Header:

Key: Content-Type
Value:
application/json

- Add another Header:

Key: Accept
Value: application/json

 

--- Conclusion ---

Let me know if you have any suggestions or improvements.

 

0 votes
Pasam Venkateshwarrao
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 Champions.
March 18, 2025

Hi @Fabian Gropp 

Welcome to the community.Set the condition’s parameters as shown in the screenshot below.

  1. Instead of <Confluence_base_url> put your Confluence instance’s url.
  2. Instead of <Token> put the personal access token you generated in the Base64 format.
  3. In case an anonymous user creates a page, remove the Authorization header.
  4. Set custom data as needed. In the example above the Confluence page title is set as the issue's key by using smart values. 

  5. you can include the description smart value in the custom data

 

     Hope this helps

 

 

 

0 votes
Vishal Biyani
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 Champions.
March 18, 2025

@Fabian Gropp 

Trigger: Version Created

Add Component

Create page in confluence

 

Subsequently you can refer to smart value {{createPage}}

Can you see if you are able to make progress with this approach?

snip.png

Fabian Gropp
March 18, 2025

Hi Vishal,

thanks for your reply. Unfortunately the work begins right here. I want to use the smart values inside the template itself.

Vishal Biyani
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 Champions.
March 18, 2025

@Fabian Gropp 

As I don't have your template, I created a basic template, which has release_version_placeholder in title and release_version_placeholder in body apart from an H1 title. With this complete solution, confluence page is getting created using the template and is release_version_placeholder  is getting replaced by Version# that tigered this automation rule.

Can you check and let me know if this works for you? if not, would you share the template that you are using and elaborate a bit more on what is not working for you?

 

Expanding on the automation above,

Trigger: Version Created

Add Component

Create page in confluence

  • Create the connection and specify the template.

Get Page Id

Use the following code to extract the page ID and save it in the variable `varPageId`:

{{createdPage.url.split("/").get(7)}}

Send Web Request to get content of confluence page

URL: https://your-instance.atlassian.net/wiki/api/v2/pages/{{varPageId}}?body-format=storage

Store Version Number

Save the version number in the variable varPageVersion

{{webResponse.body.version.number}}

Page Content

Replace the placeholder in the page content with the version number and save it in variable varPageContent 

 

{{webResponse.body.body.storage.value.replace("release_version_placeholder", varVersion)}}

Send Web Request to Update confluence page

URL: https://your-instance.atlassian.net/wiki/api/v2/pages/{{varPageId}}

Method: PUT

Web Request Body: Custom data

{
"id": "{{varPageId}}",
"status": "current",
"title": "{{createdPage.title}}",
"body": {
"representation": "storage",
"value": "{{varPageContent}}"
},
"version": {
"number": "{{#=}}{{webResponse.body.version.number}} + 1{{/}}"
}
}

Headers

  • Authorization
  • Accept
  • Content-Type

This successfully updates the confluence page created using a template with the version number.

Suggest an answer

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

Atlassian Community Events