confluence-automation
Original:🇺🇸 English
Not Translated
Automate Confluence page creation, content search, space management, labels, and hierarchy navigation via Rube MCP (Composio). Always search tools first for current schemas.
2installs
Added on
NPX Install
npx skill4agent add sickn33/antigravity-awesome-skills confluence-automationSKILL.md Content
Confluence Automation via Rube MCP
Automate Confluence operations including page creation and updates, content search with CQL, space management, label tagging, and page hierarchy navigation through Composio's Confluence toolkit.
Prerequisites
- Rube MCP must be connected (RUBE_SEARCH_TOOLS available)
- Active Confluence connection via with toolkit
RUBE_MANAGE_CONNECTIONSconfluence - Always call first to get current tool schemas
RUBE_SEARCH_TOOLS
Setup
Get Rube MCP: Add as an MCP server in your client configuration. No API keys needed — just add the endpoint and it works.
https://rube.app/mcp- Verify Rube MCP is available by confirming responds
RUBE_SEARCH_TOOLS - Call with toolkit
RUBE_MANAGE_CONNECTIONSconfluence - If connection is not ACTIVE, follow the returned auth link to complete Confluence OAuth
- Confirm connection status shows ACTIVE before running any workflows
Core Workflows
1. Create and Update Pages
When to use: User wants to create new documentation or update existing Confluence pages
Tool sequence:
- - List spaces to find the target space ID [Prerequisite]
CONFLUENCE_GET_SPACES - - Find existing page to avoid duplicates or locate parent [Optional]
CONFLUENCE_SEARCH_CONTENT - - Get current page content and version number before updating [Prerequisite for updates]
CONFLUENCE_GET_PAGE_BY_ID - - Create a new page in a space [Required for creation]
CONFLUENCE_CREATE_PAGE - - Update an existing page with new content and incremented version [Required for updates]
CONFLUENCE_UPDATE_PAGE - - Tag the page with labels after creation [Optional]
CONFLUENCE_ADD_CONTENT_LABEL
Key parameters:
- : Space ID or key (e.g.,
spaceId,"DOCS") -- space keys are auto-converted to IDs"12345678" - : Page title (must be unique within a space)
title - : Parent page ID for creating child pages; omit to place under space homepage
parentId - : HTML/XHTML content in Confluence storage format
body.storage.value - : Must be
body.storage.representationfor create operations"storage" - : For updates, must be current version + 1
version.number - : Optional change description
version.message
Pitfalls:
- Confluence enforces unique page titles per space; creating a page with a duplicate title will fail
- requires
UPDATE_PAGEset to current version + 1; always fetch current version first withversion.numberGET_PAGE_BY_ID - Content must be in Confluence storage format (XHTML), not plain text or Markdown
- uses
CREATE_PAGEwhilebody.storage.valueusesUPDATE_PAGEwithbody.valuebody.representation - requires a numeric long ID, not a UUID or string
GET_PAGE_BY_ID
2. Search Content
When to use: User wants to find pages, blog posts, or content across Confluence
Tool sequence:
- - Keyword search with intelligent relevance ranking [Required]
CONFLUENCE_SEARCH_CONTENT - - Advanced search using Confluence Query Language [Alternative]
CONFLUENCE_CQL_SEARCH - - Hydrate full content for selected search results [Optional]
CONFLUENCE_GET_PAGE_BY_ID - - Browse pages sorted by date when search relevance is weak [Fallback]
CONFLUENCE_GET_PAGES
Key parameters for SEARCH_CONTENT:
- : Search text matched against page titles with intelligent ranking
query - : Limit search to a specific space
spaceKey - : Max results (default 25, max 250)
limit - : Pagination offset (0-based)
start
Key parameters for CQL_SEARCH:
- : CQL query string (e.g.,
cql)text ~ "API docs" AND space = DOCS AND type = page - : Comma-separated properties (e.g.,
expand,content.space)content.body.storage - :
excerpt,highlight, orindexednone - : Max results (max 250; reduced to 25-50 when using body expansions)
limit
CQL operators and fields:
- Fields: ,
text,title,label,space,type,creator,lastModified,createdancestor - Operators: ,
=,!=(contains),~,!~,>,<,>=,<=,INNOT IN - Functions: ,
currentUser(),now("-7d")now("-30d") - Example:
title ~ "meeting" AND lastModified > now("-7d") ORDER BY lastModified DESC
Pitfalls:
- fetches up to 300 pages and applies client-side filtering -- not a true full-text search
CONFLUENCE_SEARCH_CONTENT - is the real full-text search; use
CONFLUENCE_CQL_SEARCHfor content body searchtext ~ "term" - HTTP 429 rate limits can occur; throttle to ~2 requests/second with backoff
- Using body expansions in CQL_SEARCH may reduce max results to 25-50
- Search indexing is not immediate; recently created pages may not appear
3. Manage Spaces
When to use: User wants to list, create, or inspect Confluence spaces
Tool sequence:
- - List all spaces with optional filtering [Required]
CONFLUENCE_GET_SPACES - - Get detailed metadata for a specific space [Optional]
CONFLUENCE_GET_SPACE_BY_ID - - Create a new space with key and name [Optional]
CONFLUENCE_CREATE_SPACE - - Retrieve custom metadata stored as space properties [Optional]
CONFLUENCE_GET_SPACE_PROPERTIES - - List pages, blog posts, or attachments in a space [Optional]
CONFLUENCE_GET_SPACE_CONTENTS - - List labels on a space [Optional]
CONFLUENCE_GET_LABELS_FOR_SPACE
Key parameters:
- : Space key -- alphanumeric only, no underscores or hyphens (e.g.,
key,DOCS)PROJECT1 - : Human-readable space name
name - :
typeorglobalpersonal - :
status(active) orcurrentarchived - : For GET_SPACE_CONTENTS, filters by space key
spaceKey - : Numeric space ID for GET_SPACE_BY_ID (NOT the space key)
id
Pitfalls:
- Space keys must be alphanumeric only (no underscores, hyphens, or special characters)
- requires numeric space ID, not the space key; use
GET_SPACE_BY_IDto find numeric IDsGET_SPACES - Clickable space URLs may need assembly: join (relative) with
_links.webui_links.base - Default pagination is 25; set explicitly (max 200 for spaces)
limit
4. Navigate Page Hierarchy and Labels
When to use: User wants to explore page trees, child pages, ancestors, or manage labels
Tool sequence:
- - Find the target page ID [Prerequisite]
CONFLUENCE_SEARCH_CONTENT - - List direct children of a parent page [Required]
CONFLUENCE_GET_CHILD_PAGES - - Get the full ancestor chain for a page [Optional]
CONFLUENCE_GET_PAGE_ANCESTORS - - List labels on a specific page [Optional]
CONFLUENCE_GET_LABELS_FOR_PAGE - - Add labels to a page [Optional]
CONFLUENCE_ADD_CONTENT_LABEL - - List labels across all content in a space [Optional]
CONFLUENCE_GET_LABELS_FOR_SPACE_CONTENT - - Audit edit history for a page [Optional]
CONFLUENCE_GET_PAGE_VERSIONS
Key parameters:
- : Page ID for child pages, ancestors, labels, and versions
id - : Opaque pagination cursor for GET_CHILD_PAGES (from
cursor)_links.next - : Items per page (max 250 for child pages)
limit - : Child page sort options:
sort,id,-id,created-date,-created-date,modified-date,-modified-date,child-position-child-position
Pitfalls:
- only returns direct children, not nested descendants; recurse for full tree
GET_CHILD_PAGES - Pagination for GET_CHILD_PAGES uses cursor-based pagination (not start/limit)
- Verify the correct page ID from search before using as parent; search can return similar titles
- requires the page ID, not a version number
GET_PAGE_VERSIONS
Common Patterns
ID Resolution
Always resolve human-readable names to IDs before operations:
- Space key -> Space ID: with
CONFLUENCE_GET_SPACESfilter, orspaceKeyaccepts space keys directlyCREATE_PAGE - Page title -> Page ID: with
CONFLUENCE_SEARCH_CONTENTparam, then extract page IDquery - Space ID from URL: Extract numeric ID from Confluence URLs or use GET_SPACES
Pagination
Confluence uses two pagination styles:
- Offset-based (most endpoints): (0-based offset) +
start(page size). Incrementlimitbystartuntil fewer results thanlimitare returned.limit - Cursor-based (GET_CHILD_PAGES, GET_PAGES): Use the from
cursorin the response. Continue until no_links.nextlink is present.next
Content Formatting
- Pages use Confluence storage format (XHTML), not Markdown
- Basic elements: ,
<p>-<h1>,<h6>,<strong>,<em>,<code>,<ul>,<ol><li> - Tables: /
<table><tbody><tr><th>structure<td> - Macros: for code blocks, etc.
<ac:structured-macro ac:name="code"> - Always wrap content in proper XHTML tags
Known Pitfalls
ID Formats
- Space IDs are numeric (e.g., ); space keys are short strings (e.g.,
557060)DOCS - Page IDs are numeric long values for GET_PAGE_BY_ID; some tools accept UUID format
- requires numeric ID, not the space key
GET_SPACE_BY_ID - takes an integer, not a string
GET_PAGE_BY_ID
Rate Limits
- HTTP 429 can occur on search endpoints; honor Retry-After header
- Throttle to ~2 requests/second with exponential backoff and jitter
- Body expansion in CQL_SEARCH reduces result limits to 25-50
Content Format
- Content must be Confluence storage format (XHTML), not Markdown or plain text
- Invalid XHTML will cause page creation/update to fail
- nests body under
CREATE_PAGE;body.storage.valueusesUPDATE_PAGE+body.valuebody.representation
Version Conflicts
- Updates require exact next version number (current + 1)
- Concurrent edits can cause version conflicts; always fetch current version immediately before updating
- Title changes during update must still be unique within the space
Quick Reference
| Task | Tool Slug | Key Params |
|---|---|---|
| List spaces | | |
| Get space by ID | | |
| Create space | | |
| Space contents | | |
| Space properties | | |
| Search content | | |
| CQL search | | |
| List pages | | |
| Get page by ID | | |
| Create page | | |
| Update page | | |
| Delete page | | |
| Child pages | | |
| Page ancestors | | |
| Page labels | | |
| Add label | | content ID, label |
| Page versions | | |
| Space labels | | space ID |