Forums

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

confluence automation - freelancer

Patrick S. Stuckenberger June 9, 2025

I am not sure if atlassian allows this post, we will see.

 

are there freelancers available, who can help us with some automation rules?

 

it is mostly about pages which need to be altered (replace values) or add something to a pagetree and keep the prefix. 

 

example pagetree:

project type 1

* OE-1 project one

 ** OE-1 status report

* OE-5 project space aliens

** OE-5 status report

 

I also have setup a freelancer campaign 455037908

2 answers

0 votes
Colin
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!
June 19, 2025

Hi Patrick,

I have worked on similar Confluence automations using REST API and Forge custom apps.
Handling pagetree modifications and dynamic prefix updates is pretty straightforward.
Let me know the specifics and I can take a look.

You can reach out to me on my email here

Colin

0 votes
Subhasis Das
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!
June 9, 2025

Try this

📌 Use Case: Replace values across a pagetree

🔁 Step-by-step logic (in pseudo-code / scriptable logic):

  1. Get child pages of a parent (e.g., “project type 1”)
  2. Loop through pages where title matches pattern (e.g., OE-*)
  3. Fetch page content (body.storage)
  4. Perform value replacement
  5. Push updated content via PUT

 

Sample Python Snippet using REST API:

import requests
import json

BASE_URL = "https://<your-instance>.atlassian.net/wiki"
AUTH = ("your-email", "your-api-token")

def get_child_pages(parent_id):
url = f"{BASE_URL}/rest/api/content/{parent_id}/child/page?limit=100"
response = requests.get(url, auth=AUTH)
return response.json().get('results', [])

def update_page_content(page_id, title, new_body, version):
url = f"{BASE_URL}/rest/api/content/{page_id}"
payload = {
"id": page_id,
"type": "page",
"title": title,
"version": {"number": version + 1},
"body": {
"storage": {
"value": new_body,
"representation": "storage"
}
}
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, auth=AUTH, headers=headers, data=json.dumps(payload))
print(f"Updated: {title} (Status: {response.status_code})")

def process_pages(parent_id):
pages = get_child_pages(parent_id)
for page in pages:
page_id = page['id']
title = page['title']
version = page['version']['number']

body_url = f"{BASE_URL}/rest/api/content/{page_id}?expand=body.storage,version"
content = requests.get(body_url, auth=AUTH).json()
body = content['body']['storage']['value']

# Replace content logic here
new_body = body.replace("OldValue", "NewValue")

if new_body != body:
update_page_content(page_id, title, new_body, version)

# Example usage
process_pages("<PARENT_PAGE_ID>")

Suggest an answer

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

Atlassian Community Events