Confluence Cloud icon

Confluence Cloud

Access to the Confluence Cloud REST API - Auto-generated from OpenAPI

Overview

The "Get Content Templates" operation of the Confluence Cloud node retrieves content templates from a Confluence instance. It allows users to fetch either global content templates or templates within a specific space. This operation is useful for automating documentation workflows, standardizing page creation, or integrating template data into other systems.

Typical use cases include:

  • Listing all available content templates to present options for page creation.
  • Fetching templates from a particular space to customize content generation.
  • Automating the retrieval of template content for reporting or migration purposes.

For example, a user might want to get all templates in a marketing space to generate campaign pages consistently or retrieve global templates to audit and update them programmatically.

Properties

Name Meaning
Return All Whether to return all results or only up to a specified limit.
Limit Maximum number of results to return (maximum 250 as per Confluence API limits).
Additional Fields Collection of optional fields:
- Space Key The key of the space to query templates from. If omitted, global templates are returned.
- Expand List of properties of the template to expand. Options: body, body.storage (returns the content of the template in storage format).

Output

The output JSON contains a list of content templates under the results property. Each item represents a content template with its metadata such as name, ID, associated space or blueprint, and optionally expanded fields like the body content in storage format if requested.

The structure is typically:

{
  "results": [
    {
      "id": "template-id",
      "name": "Template Name",
      "space": { /* space details if applicable */ },
      "body": { /* template body if expanded */ },
      ...
    },
    ...
  ],
  "limit": 250,
  "size": 10,
  "_links": { /* pagination links if applicable */ }
}

No binary data output is involved in this operation.

Dependencies

  • Requires access to a Confluence Cloud instance with appropriate permissions.
  • An API authentication token or API key credential configured in n8n to authenticate requests.
  • The node uses the Confluence REST API endpoint /wiki/rest/api/template/page.
  • The maximum number of results per request is limited by Confluence API to 250.

Troubleshooting

  • Permission Errors: Users must have 'View' permission on the space to access space templates and 'Can use' global permission to access global templates. Lack of these will result in authorization errors.
  • Limit Exceeded: Setting a limit above 250 will be ignored or cause an error since the API restricts the maximum to 250.
  • Invalid Space Key: Providing a non-existent or misspelled space key will result in no templates found or an error.
  • Expand Parameter Issues: Incorrect values in the expand field may cause the API to ignore the parameter or return incomplete data.

To resolve these issues:

  • Verify user permissions in Confluence.
  • Ensure the limit does not exceed 250.
  • Double-check the space key spelling.
  • Use valid expand options (body, body.storage).

Links and References

Discussion