confluence-template
Confluence Template Skill
Work with Confluence page templates and blueprints.
⚠️ PRIMARY USE CASE
This skill manages page templates. Use for:
- Listing available templates
- Creating pages from templates
- Managing template content
- Working with blueprints
When to Use / When NOT to Use
| Use This Skill | Use Instead |
|---|---|
| List templates | - |
| Create from template | - |
| Update template | - |
| Create page directly | confluence-page |
| Search templates | confluence-search |
Risk Levels
| Operation | Risk | Notes |
|---|---|---|
| List templates | - | Read-only |
| Get template | - | Read-only |
| Create from template | - | Creates new page |
| Update template | ⚠️ | Affects future pages |
| Delete template | ⚠️⚠️ | Cannot be recovered |
Overview
Templates in Confluence allow you to standardize page creation. Blueprints are pre-built templates provided by Confluence or apps. This skill primarily uses the Confluence v1 REST API (/rest/api/template/*) for template management, while create-from uses the v2 API (/api/v2/pages) for page creation.
CLI Commands
confluence template list
List available page templates and blueprints in your Confluence instance.
Usage:
# List all templates
confluence template list
# Filter by space
confluence template list --space DOCS
# Filter by type (page or blogpost)
confluence template list --type page
# List blueprints instead of templates
confluence template list --blueprints
# JSON output
confluence template list --output json
# Limit results
confluence template list --limit 50
Arguments:
--space,-s: Filter templates by space key--type,-t: Filter by template type (page or blogpost)--blueprints: List blueprints instead of templates--output,-o: Output format (text or json)--limit,-l: Maximum number of results (default: 100, max: 250)
confluence template get
Retrieve detailed information about a specific template or blueprint.
Usage:
# Get template details
confluence template get tmpl-123
# Include body content
confluence template get tmpl-123 --body
# Convert body to Markdown
confluence template get tmpl-123 --body --format markdown
# Get blueprint details
confluence template get bp-456 --blueprint
# JSON output
confluence template get tmpl-123 --output json
Arguments:
template_id: Template ID or blueprint ID--body: Include template body content--format: Body format (storage or markdown)--blueprint: Get blueprint instead of template--output,-o: Output format (text or json)
confluence template create-from
Create a new Confluence page based on an existing template or blueprint.
Usage:
# Create page from template
confluence template create-from --template tmpl-123 --space DOCS --title "New Page"
# Create page with parent
confluence template create-from --template tmpl-123 --space DOCS --title "Page" --parent-id 12345
# Create from blueprint
confluence template create-from --blueprint bp-456 --space DOCS --title "Project Plan"
# Add labels
confluence template create-from --template tmpl-123 --space DOCS --title "Page" --labels "tag1,tag2"
# Override template content
confluence template create-from --template tmpl-123 --space DOCS --title "Page" --content "<p>Custom content</p>"
# Use content from file
confluence template create-from --template tmpl-123 --space DOCS --title "Page" --file content.md
Arguments:
--template: Template ID to use--blueprint: Blueprint ID to use (alternative to --template)--space: Space key for the new page (required)--title: Title for the new page (required)--parent-id: Parent page ID--labels: Comma-separated labels--content: Custom HTML/XHTML content--file: File with content (Markdown or HTML)--output,-o: Output format (text or json)
confluence template create
Create a new page template in Confluence.
Usage:
# Create basic template
confluence template create --name "Meeting Notes" --space DOCS
# With description
confluence template create --name "Status Report" --space DOCS --description "Weekly status report"
# From HTML file
confluence template create --name "Template" --space DOCS --file template.html
# From Markdown file
confluence template create --name "Template" --space DOCS --file template.md
# With labels
confluence template create --name "Template" --space DOCS --labels "template,meeting"
# Blogpost template
confluence template create --name "Blog Template" --space DOCS --type blogpost
# Based on blueprint
confluence template create --name "Custom" --space DOCS --blueprint-id com.atlassian...
Arguments:
--name: Template name (required)--space,-s: Space key (required)--description: Template description--content: Template body content (HTML/XHTML) - required if--filenot provided--file: File with template content (Markdown or HTML) - required if--contentnot provided--labels: Comma-separated labels--type,-t: Template type - page or blogpost (default: page)--blueprint-id: Base on existing blueprint--output,-o: Output format (text or json)
Note: Either --content or --file must be provided to specify the template body.
confluence template update
Update an existing page template.
Usage:
# Update name
confluence template update tmpl-123 --name "Updated Template"
# Update description
confluence template update tmpl-123 --description "New description"
# Update content from HTML file
confluence template update tmpl-123 --file updated.html
# Update from Markdown file
confluence template update tmpl-123 --file updated.md
# Update inline content
confluence template update tmpl-123 --content "<h1>Updated</h1>"
# Add labels
confluence template update tmpl-123 --add-labels "tag1,tag2"
# Remove labels
confluence template update tmpl-123 --remove-labels "old-tag"
# Multiple updates
confluence template update tmpl-123 --name "New Name" --description "New desc" --add-labels "new"
Arguments:
template_id: Template ID to update (required)--name: New template name--description: New description--content: New body content (HTML/XHTML)--file: File with new content (Markdown or HTML)--add-labels: Comma-separated labels to add--remove-labels: Comma-separated labels to remove--output,-o: Output format (text or json)
Note: At least one field must be specified to update.
API Endpoints Used
This skill uses the Confluence REST API:
v1 API (template management):
GET /rest/api/template/page- List page templatesGET /rest/api/template/blueprint- List blueprintsGET /rest/api/template/{templateId}- Get template detailsPOST /rest/api/template- Create templatePUT /rest/api/template/{templateId}- Update template
v2 API (page creation):
POST /api/v2/pages- Create page from template (used bycreate-from)
Examples
Finding and Using Templates
# List all available templates
confluence template list
# Find templates in a specific space
confluence template list --space DOCS
# Get template details
confluence template get tmpl-123 --body --format markdown
# Create a page from that template
confluence template create-from --template tmpl-123 --space DOCS --title "My Meeting Notes"
Creating Custom Templates
# Create a simple template
confluence template create --name "Weekly Report" --space DOCS --description "Template for weekly status reports"
# Create from a Markdown file
confluence template create --name "Project Plan" --space DOCS --file project-template.md --labels "template,planning"
Maintaining Templates
# Update template content from file
confluence template update tmpl-123 --file updated-template.md
# Add tags to categorize
confluence template update tmpl-123 --add-labels "engineering,documentation"
# Update name and description
confluence template update tmpl-123 --name "New Template Name" --description "Updated description"
Tips
-
Template IDs: Template IDs are typically in the format
tmpl-123or similar. Useconfluence template listto find IDs. -
Markdown Support: All scripts support Markdown input files, which are automatically converted to Confluence's storage format (XHTML).
-
Blueprints vs Templates: Blueprints are system-provided templates. You can create pages from blueprints but typically cannot modify them. Use
--blueprintflag to work with blueprints. -
Labels: Use labels to organize and categorize templates for easier discovery.
-
Preserving Content: When updating templates, only the fields you specify are changed. Other fields are preserved.
-
Parent Pages: When creating pages from templates, you can specify a parent page to create a page hierarchy.
Troubleshooting
Template not found: Verify the template ID with confluence template list. Template IDs are space-specific in some cases.
Permission denied: Ensure you have permission to create/modify templates in the specified space. Template management typically requires space admin permissions.
Content format issues: If template content doesn't render correctly, ensure HTML/XHTML is well-formed. Use Markdown files for easier authoring.
More from grandcamel/confluence-assistant-skills
confluence-space
Manage Confluence spaces - create, list, update, delete, and configure spaces. ALWAYS use when user wants to work with spaces (not individual pages).
1confluence-watch
Content watching and notifications. ALWAYS use when user wants to follow content or manage notifications.
1confluence-label
Manage content labels - add, remove, and search by labels. ALWAYS use when user wants to tag, label, or categorize content.
1confluence-page
Manage Confluence pages and blog posts - create, read, update, delete, copy, move, and version control. ALWAYS use when user wants to work with page content, create pages, update pages, or manage page versions.
1confluence-bulk
Bulk operations for 50+ pages - updates, moves, deletions, labels, and permissions. Use when updating multiple pages simultaneously (dry-run preview included), needing rollback safety, or coordinating team changes. Handles partial failures gracefully.
1confluence-ops
Cache management, API diagnostics, and operational utilities. Use when optimizing performance, managing cache, diagnosing API issues, or troubleshooting Confluence connectivity.
1