Documentation

🚀 n8n-nodes-confluence-cloud

A powerful n8n Community Node for seamless integration with Confluence Cloud REST API. This node provides comprehensive access to Confluence Cloud's capabilities with automatic API validation, deprecation detection, and intelligent error handling.

npm version
License: MIT

✨ Features

🔄 Confluence Cloud Node

  • Spaces Management: Create, read, update, and delete Confluence spaces
  • Pages Management: Full CRUD operations for Confluence pages
  • Automatic API Version Detection: Seamlessly uses V2 API with V1 fallback for legacy operations
  • Built-in Error Handling: Comprehensive error messages with actionable solutions
  • OpenAPI-Generated: Automatically generated from official Confluence API specifications

🎯 Confluence Cloud Trigger

  • Real-time Content Monitoring: Poll for new or updated content
  • Flexible Filtering: Filter by spaces, labels, authors, and content types
  • Template-based Configuration: Easy setup with pre-configured templates
  • Custom CQL Support: Advanced users can write custom Confluence Query Language expressions
  • Smart Time Handling: Configurable lookback periods for initial runs

🛡️ Quality Assurance

  • Deprecated API Detection: Build fails if deprecated APIs are detected
  • Missing Route Validation: Automatic validation of API route configurations
  • Professional Error Messages: Clear, actionable error messages with documentation links

📦 Installation

Install the node using n8n's Community Nodes feature:

  1. Via n8n Interface:

    • Go to SettingsCommunity Nodes
    • Install package: n8n-nodes-confluence-cloud
  2. Via npm (for self-hosted n8n):

    npm install n8n-nodes-confluence-cloud
    

For detailed installation instructions, see the n8n Community Nodes documentation.

🔐 Credentials Setup

Required Credentials

Create a Confluence Cloud API credential with:

Field Description Example
Domain Your Confluence Cloud URL https://your-company.atlassian.net
Email Your Atlassian account email [email protected]
API Token Generated API token ATATT3xFfGF0T...

🔑 Creating an API Token

  1. Go to Atlassian Account Security
  2. Click "Create API token"
  3. Enter a label (e.g., "n8n Integration")
  4. Copy the generated token (⚠️ Save it immediately - you won't see it again!)

🏗️ Supported Operations

📁 Space Operations

Operation Method API Version Documentation
Get Spaces GET /spaces V2 📖 V2 API Docs
Get Space By Id GET /spaces/{id} V2 📖 V2 API Docs
Create Space POST /space V1 (Legacy) 📖 V1 API Docs
Update Space PUT /space/{spaceKey} V1 (Legacy) 📖 V1 API Docs
Delete Space DELETE /space/{spaceKey} V1 (Legacy) 📖 V1 API Docs

📄 Page Operations

Operation Method API Version Documentation
Get Pages GET /pages V2 📖 V2 API Docs
Create Page POST /pages V2 📖 V2 API Docs
Get Page By Id GET /pages/{id} V2 📖 V2 API Docs
Update Page PUT /pages/{id} V2 📖 V2 API Docs
Delete Page DELETE /pages/{id} V2 📖 V2 API Docs
Get Pages In Space GET /spaces/{id}/pages V2 📖 V2 API Docs

📄 Template Operations

Operation Method API Version Documentation
Get Content Templates GET /template/page V1 (Legacy) 📖 V1 API Docs
Get Blueprint Templates GET /template/blueprint V1 (Legacy) 📖 V1 API Docs
Create Content Template POST /template V1 (Legacy) 📖 V1 API Docs
Update Content Template PUT /template V1 (Legacy) 📖 V1 API Docs
Get Content Template GET /template/{contentTemplateId} V1 (Legacy) 📖 V1 API Docs
Remove Template DELETE /template/{contentTemplateId} V1 (Legacy) 📖 V1 API Docs

📄 Search Operations

Operation Method API Version Documentation
Search Content By C Q L GET /content/search V1 (Legacy) 📖 V1 API Docs

📄 Comment Operations

Operation Method API Version Documentation
Get Page Footer Comments GET /pages/{id}/footer-comments V2 📖 V2 API Docs
Get Page Inline Comments GET /pages/{id}/inline-comments V2 📖 V2 API Docs
Get Blog Post Footer Comments GET /blogposts/{id}/footer-comments V2 📖 V2 API Docs
Get Blog Post Inline Comments GET /blogposts/{id}/inline-comments V2 📖 V2 API Docs
Get Custom Content Comments GET /custom-content/{id}/footer-comments V2 📖 V2 API Docs
Get Footer Comments GET /footer-comments V2 📖 V2 API Docs
Create Footer Comment POST /footer-comments V2 📖 V2 API Docs
Get Footer Comment By Id GET /footer-comments/{comment-id} V2 📖 V2 API Docs
Update Footer Comment PUT /footer-comments/{comment-id} V2 📖 V2 API Docs
Delete Footer Comment DELETE /footer-comments/{comment-id} V2 📖 V2 API Docs
Get Footer Comment Children GET /footer-comments/{id}/children V2 📖 V2 API Docs
Get Inline Comments GET /inline-comments V2 📖 V2 API Docs
Create Inline Comment POST /inline-comments V2 📖 V2 API Docs
Get Inline Comment By Id GET /inline-comments/{comment-id} V2 📖 V2 API Docs
Update Inline Comment PUT /inline-comments/{comment-id} V2 📖 V2 API Docs
Delete Inline Comment DELETE /inline-comments/{comment-id} V2 📖 V2 API Docs
Get Inline Comment Children GET /inline-comments/{id}/children V2 📖 V2 API Docs

🎯 Trigger Configuration

Template Options

Template Description CQL Generated
New Pages Monitor newly created pages type = page AND created >= now("-1h")
Updated Pages Monitor modified pages type = page AND lastModified >= now("-1h")
New or Updated Pages Monitor all page changes type = page AND (created >= now("-1h") OR lastModified >= now("-1h"))

Filter Options

Filter Type Description Example
Space Keys String Comma-separated space keys DOCS, TEAM, HELP
Labels String Comma-separated labels urgent, review, draft
Author String Confluence Account ID 99:27935d01-XXXX-XXXX-XXXX-a9b8d3b2ae2e
Initial Lookback Select How far back to look initially 1h, 6h, 12h, 1d, 3d, 1w, 2w, 1month

Advanced: Custom CQL

For power users, write custom Confluence Query Language expressions:

space in ("DOCS", "TEAM") AND 
type = page AND 
(label = "urgent" OR label = "review") AND 
creator = "99:27935d01-XXXX-XXXX-XXXX-a9b8d3b2ae2e" AND
created >= now("-1w")

💡 Usage Examples

Example 1: Create a New Page

// Input Data
{
  "resource": "page",
  "operation": "create",
  "spaceId": "123456",
  "title": "My New Page",
  "body": {
    "storage": {
      "value": "<p>This is my page content.</p>",
      "representation": "storage"
    }
  }
}

Example 2: Monitor New Pages in Specific Spaces

// Trigger Configuration
{
  "queryType": "template",
  "template": "new_pages",
  "spaceKeys": "DOCS, ENGINEERING",
  "initialLookback": "1d"
}

Example 3: List All Spaces

// Simple space listing
{
  "resource": "space",
  "operation": "getAll"
}

🔧 Development

Prerequisites

  • Node.js 18+
  • npm 8+
  • n8n development environment

Setup

# Clone the repository
git clone https://github.com/your-username/n8n-nodes-confluence-cloud.git
cd n8n-nodes-confluence-cloud

# Install dependencies
npm install

# Build the project
npm run build

# Run tests
npm test

# Format code
npm run format

Architecture

This node uses a sophisticated build system:

  • OpenAPI Code Generation: Automatically generates operations from Confluence API specifications
  • Dual API Version Support: Seamlessly handles both V1 (legacy) and V2 APIs
  • Quality Validation: Build fails on deprecated APIs or missing routes
  • Type Safety: Full TypeScript support with generated types

Build System Features

  • 📥 Automatic API Spec Download: Latest Confluence API specifications
  • 🔍 Deprecated API Detection: Prevents using outdated endpoints
  • ⚠️ Missing Route Validation: Ensures all configured routes exist
  • 🎯 Smart Error Messages: Actionable feedback for configuration issues

🤝 Contributing

Contributions are welcome! Please read our Contributing Guide for details.

Adding New Routes

  1. Edit config/confluence-routes.json
  2. Add your route configuration:
    {
      "path": "/your-endpoint",
      "methods": ["get", "post"],
      "legacy": false
    }
    
  3. Run npm run build to generate operations
  4. Test your changes

📋 API Compatibility

Confluence Cloud API Support Status Notes
REST API v2 ✅ Full Support Primary API version
REST API v1 🟡 Legacy Support For operations not yet in V2
Content API ✅ Supported Via V2 endpoints
Space API ✅ Supported Both V1 and V2

🐛 Troubleshooting

Common Issues

❌ "API PATH NOT FOUND" Error

❌ "DEPRECATED API DETECTED" Error

❌ "CQL Parse Error" in Trigger

❌ Authentication Issues

  • Verify your API token is valid
  • Ensure your email address is correct
  • Check domain format: https://your-domain.atlassian.net

📚 Resources

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

  • Built for the n8n automation platform
  • Uses official Confluence Cloud API specifications
  • Inspired by the n8n community's need for robust Confluence integration

Made with ❤️ for the n8n community

Discussion