confluence-automation
Automate Confluence page creation, content search, space management, labels, and hierarchy navigation via Rube MCP (Composio). Always search tools first for current schemas.
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_MANAGE_CONNECTIONS with toolkit confluenceRUBE_SEARCH_TOOLS first to get current tool schemasSetup
Get Rube MCP: Add https://rube.app/mcp as an MCP server in your client configuration. No API keys needed — just add the endpoint and it works.
RUBE_SEARCH_TOOLS respondsRUBE_MANAGE_CONNECTIONS with toolkit confluenceCore Workflows
1. Create and Update Pages
When to use: User wants to create new documentation or update existing Confluence pages
Tool sequence:
CONFLUENCE_GET_SPACES - List spaces to find the target space ID [Prerequisite]CONFLUENCE_SEARCH_CONTENT - Find existing page to avoid duplicates or locate parent [Optional]CONFLUENCE_GET_PAGE_BY_ID - Get current page content and version number before updating [Prerequisite for updates]CONFLUENCE_CREATE_PAGE - Create a new page in a space [Required for creation]CONFLUENCE_UPDATE_PAGE - Update an existing page with new content and incremented version [Required for updates]CONFLUENCE_ADD_CONTENT_LABEL - Tag the page with labels after creation [Optional]Key parameters:
spaceId: Space ID or key (e.g., "DOCS", "12345678") -- space keys are auto-converted to IDstitle: Page title (must be unique within a space)parentId: Parent page ID for creating child pages; omit to place under space homepagebody.storage.value: HTML/XHTML content in Confluence storage formatbody.storage.representation: Must be "storage" for create operationsversion.number: For updates, must be current version + 1version.message: Optional change descriptionPitfalls:
UPDATE_PAGE requires version.number set to current version + 1; always fetch current version first with GET_PAGE_BY_IDCREATE_PAGE uses body.storage.value while UPDATE_PAGE uses body.value with body.representationGET_PAGE_BY_ID requires a numeric long ID, not a UUID or string2. Search Content
When to use: User wants to find pages, blog posts, or content across Confluence
Tool sequence:
CONFLUENCE_SEARCH_CONTENT - Keyword search with intelligent relevance ranking [Required]CONFLUENCE_CQL_SEARCH - Advanced search using Confluence Query Language [Alternative]CONFLUENCE_GET_PAGE_BY_ID - Hydrate full content for selected search results [Optional]CONFLUENCE_GET_PAGES - Browse pages sorted by date when search relevance is weak [Fallback]Key parameters for SEARCH_CONTENT:
query: Search text matched against page titles with intelligent rankingspaceKey: Limit search to a specific spacelimit: Max results (default 25, max 250)start: Pagination offset (0-based)Key parameters for CQL_SEARCH:
cql: CQL query string (e.g., text ~ "API docs" AND space = DOCS AND type = page)expand: Comma-separated properties (e.g., content.space, content.body.storage)excerpt: highlight, indexed, or nonelimit: Max results (max 250; reduced to 25-50 when using body expansions)CQL operators and fields:
text, title, label, space, type, creator, lastModified, created, ancestor=, !=, ~ (contains), !~, >, <, >=, <=, IN, NOT INcurrentUser(), now("-7d"), now("-30d")title ~ "meeting" AND lastModified > now("-7d") ORDER BY lastModified DESCPitfalls:
CONFLUENCE_SEARCH_CONTENT fetches up to 300 pages and applies client-side filtering -- not a true full-text searchCONFLUENCE_CQL_SEARCH is the real full-text search; use text ~ "term" for content body search3. Manage Spaces
When to use: User wants to list, create, or inspect Confluence spaces
Tool sequence:
CONFLUENCE_GET_SPACES - List all spaces with optional filtering [Required]CONFLUENCE_GET_SPACE_BY_ID - Get detailed metadata for a specific space [Optional]CONFLUENCE_CREATE_SPACE - Create a new space with key and name [Optional]CONFLUENCE_GET_SPACE_PROPERTIES - Retrieve custom metadata stored as space properties [Optional]CONFLUENCE_GET_SPACE_CONTENTS - List pages, blog posts, or attachments in a space [Optional]CONFLUENCE_GET_LABELS_FOR_SPACE - List labels on a space [Optional]Key parameters:
key: Space key -- alphanumeric only, no underscores or hyphens (e.g., DOCS, PROJECT1)name: Human-readable space nametype: global or personalstatus: current (active) or archivedspaceKey: For GET_SPACE_CONTENTS, filters by space keyid: Numeric space ID for GET_SPACE_BY_ID (NOT the space key)Pitfalls:
GET_SPACE_BY_ID requires numeric space ID, not the space key; use GET_SPACES to find numeric IDs_links.webui (relative) with _links.baselimit explicitly (max 200 for spaces)4. Navigate Page Hierarchy and Labels
When to use: User wants to explore page trees, child pages, ancestors, or manage labels
Tool sequence:
CONFLUENCE_SEARCH_CONTENT - Find the target page ID [Prerequisite]CONFLUENCE_GET_CHILD_PAGES - List direct children of a parent page [Required]CONFLUENCE_GET_PAGE_ANCESTORS - Get the full ancestor chain for a page [Optional]CONFLUENCE_GET_LABELS_FOR_PAGE - List labels on a specific page [Optional]CONFLUENCE_ADD_CONTENT_LABEL - Add labels to a page [Optional]CONFLUENCE_GET_LABELS_FOR_SPACE_CONTENT - List labels across all content in a space [Optional]CONFLUENCE_GET_PAGE_VERSIONS - Audit edit history for a page [Optional]Key parameters:
id: Page ID for child pages, ancestors, labels, and versionscursor: Opaque pagination cursor for GET_CHILD_PAGES (from _links.next)limit: Items per page (max 250 for child pages)sort: Child page sort options: id, -id, created-date, -created-date, modified-date, -modified-date, child-position, -child-positionPitfalls:
GET_CHILD_PAGES only returns direct children, not nested descendants; recurse for full treeGET_PAGE_VERSIONS requires the page ID, not a version numberCommon Patterns
ID Resolution
Always resolve human-readable names to IDs before operations:
CONFLUENCE_GET_SPACES with spaceKey filter, or CREATE_PAGE accepts space keys directlyCONFLUENCE_SEARCH_CONTENT with query param, then extract page IDPagination
Confluence uses two pagination styles:
start (0-based offset) + limit (page size). Increment start by limit until fewer results than limit are returned.cursor from _links.next in the response. Continue until no next link is present.Content Formatting
, -, , , ,
,
, / structure
Macros: for code blocks, etc.
Always wrap content in proper XHTML tags Known Pitfalls
ID Formats
Space IDs are numeric (e.g., 557060); space keys are short strings (e.g., DOCS)
Page IDs are numeric long values for GET_PAGE_BY_ID; some tools accept UUID format
GET_SPACE_BY_ID requires numeric ID, not the space key
GET_PAGE_BY_ID takes an integer, not a stringRate 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
CREATE_PAGE nests body under body.storage.value; UPDATE_PAGE uses body.value + body.representationVersion 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 CONFLUENCE_GET_SPACEStype, status, limitGet space by ID CONFLUENCE_GET_SPACE_BY_IDidCreate space CONFLUENCE_CREATE_SPACEkey, name, typeSpace contents CONFLUENCE_GET_SPACE_CONTENTSspaceKey, type, statusSpace properties CONFLUENCE_GET_SPACE_PROPERTIESid, keySearch content CONFLUENCE_SEARCH_CONTENTquery, spaceKey, limitCQL search CONFLUENCE_CQL_SEARCHcql, expand, limitList pages CONFLUENCE_GET_PAGESspaceId, sort, limitGet page by ID CONFLUENCE_GET_PAGE_BY_IDid (integer)Create page CONFLUENCE_CREATE_PAGEtitle, spaceId, bodyUpdate page CONFLUENCE_UPDATE_PAGEid, title, body, versionDelete page CONFLUENCE_DELETE_PAGEidChild pages CONFLUENCE_GET_CHILD_PAGESid, limit, sortPage ancestors CONFLUENCE_GET_PAGE_ANCESTORSidPage labels CONFLUENCE_GET_LABELS_FOR_PAGEidAdd label CONFLUENCE_ADD_CONTENT_LABELcontent ID, label Page versions CONFLUENCE_GET_PAGE_VERSIONSidSpace labels CONFLUENCE_GET_LABELS_FOR_SPACEspace ID