Confluence Create Multiple Pages From Template High Quality May 2026
def create_page_from_template(title, template_id, space_key, parent_id, variables): # Step 1: Create draft from template payload = "title": title, "spaceId": get_space_id(space_key), # helper function "parentId": parent_id, "templateId": template_id
# Step 2: Replace variables in body (Confluence storage format) body = draft["body"]["storage"]["value"] for key, value in variables.items(): body = body.replace(f"key", value) # replaces client with Nike confluence create multiple pages from template
Teams needing to generate documentation structures (e.g., 30 product requirement documents, 50 meeting note pages, or a wiki tree for each client) face significant manual overhead. # helper function "parentId": parent_id
draft = requests.post(f"BASE_URL/rest/api/content/blueprint/instance/draft", headers=HEADERS, json=payload).json() value in variables.items(): body = body.replace(f"key"