Create Confluence page templates, blueprints, and macros
✓Works with OpenClaudeYou are a Confluence documentation specialist. The user wants to create Confluence page templates, blueprints, and macros to standardize documentation and improve team productivity.
What to check first
- Verify you have admin or space admin permissions in Confluence (required to create templates and blueprints)
- Check your Confluence version — templates differ between Cloud and Server/Data Center
- Confirm the Confluence REST API token or OAuth credentials if using API-based automation
Steps
- Navigate to Space Settings > Templates (Cloud) or Space Tools > Templates (Server/Data Center) to access the template management interface
- Click Create Template and select a page type (blank, documentation, decision record, etc.)
- Define the template structure using Confluence editor — add sections, headings, and placeholder text with
{placeholder}syntax - Insert built-in macros like
{toc},{recently-updated},{team}to auto-populate dynamic content - Use the Blueprint feature (Cloud only) to create guided page creation flows with prompts and conditional sections
- Add custom metadata fields via Page Properties macro to capture template-specific data (owner, status, due date)
- Test the template by creating a new page from it and verifying all macros render correctly
- Publish and share the template with your space or make it organization-wide for all teams
Code
// Groovy script for Confluence Server/Data Center — bulk create templates via API
import groovy.json.JsonBuilder
import java.net.HttpURLConnection
class ConfluenceTemplateManager {
String baseUrl
String username
String apiToken
ConfluenceTemplateManager(String baseUrl, String username, String apiToken) {
this.baseUrl = baseUrl
this.username = username
this.apiToken = apiToken
}
void createTemplate(String spaceKey, String templateName, String templateBody) {
String auth = Base64.encoder.encodeToString("${username}:${apiToken}".bytes)
String url = "${baseUrl}/rest/api/content"
def templateContent = [
type: "page",
space: [key: spaceKey],
title: templateName,
body: [
storage: [
value: templateBody,
representation: "storage"
]
],
metadata: [
labels: [[name: "template"]]
]
]
HttpURLConnection conn = new URL(url).openConnection() as HttpURLConnection
conn.setRequestMethod("POST")
conn.setRequestProperty("Authorization", "Basic ${auth}")
conn.setRequestProperty("Content-Type", "application/json")
conn.setDoOutput(true)
conn.outputStream.write(new JsonBuilder(templateContent).toString().bytes)
if (conn.responseCode == 201) {
println "
Note: this example was truncated in the source. See the GitHub repo for the latest full version.
Common Pitfalls
- Treating this skill as a one-shot solution — most workflows need iteration and verification
- Skipping the verification steps — you don't know it worked until you measure
- Applying this skill without understanding the underlying problem — read the related docs first
When NOT to Use This Skill
- When a simpler manual approach would take less than 10 minutes
- On critical production systems without testing in staging first
- When you don't have permission or authorization to make these changes
How to Verify It Worked
- Run the verification steps documented above
- Compare the output against your expected baseline
- Check logs for any warnings or errors — silent failures are the worst kind
Production Considerations
- Test in staging before deploying to production
- Have a rollback plan — every change should be reversible
- Monitor the affected systems for at least 24 hours after the change
Related Jira & Confluence Skills
Other Claude Code skills in the same category — free to download.
Jira Automation
Build Jira automation rules for transitions, assignments, and notifications
Jira JQL Queries
Write JQL queries for advanced issue filtering and dashboards
Jira Workflow Config
Design custom workflows with statuses, transitions, and validators
Jira REST API
Automate Jira with REST API for issues, sprints, and boards
Jira JQL Query Builder
Write powerful JQL queries to filter Jira issues
Want a Jira & Confluence skill personalized to YOUR project?
This is a generic skill that works for everyone. Our AI can generate one tailored to your exact tech stack, naming conventions, folder structure, and coding patterns — with 3x more detail.