Confluence


Setup connector

The Confluence connector enables your Leena AI Agents to integrate with your organization's Confluence platform, facilitating automated content management, page creation, knowledge base operations, and documentation workflows.

Confluence is Atlassian's collaboration and documentation platform that allows teams to create, organize, and share knowledge. The Confluence connector allows Leena AI to automate documentation workflows, manage pages and spaces, and interact with content seamlessly.

Overview

The Confluence connector supports two authentication methods:

  1. Basic Authentication (Recommended for most use cases)
  2. OAuth 2.0 (For advanced integrations)

Prerequisites

Before setting up the Confluence connector, ensure you have:

  1. Administrator access to your Confluence instance
  2. Ability to create API tokens in Confluence
  3. Access to your Leena AI workspace with connector management permissions

Setting up the Confluence Connector

Option 1: Basic Authentication (Recommended)

Basic Authentication is the simpler and most commonly used method for Confluence integration.

Step 1: Generate API Token in Confluence

  1. Log in to Confluence - Ensure you're signed in as an admin or user with appropriate permissions
  2. Navigate to Account Settings:
    • Click on your profile picture in the top-right corner
    • Select Account settings
    • Go to Security tab
  3. Create API Token:
    • Click Create and manage API tokens
    • Click Create API token
    • Enter a descriptive label (e.g., "Leena AI Integration")
    • Click Create

Important: Copy the generated API token immediately as it won't be shown again

Step 2: Access the Integrations Page under Leena AI

  1. Log in to your Leena AI workspace
  2. Navigate to Settings > Integrations
  3. Search for "Confluence" and select it from the list to add its new connector
  4. Choose Basic Authentication method
  5. Start configuring the connector as per Step 3

Step 3: Configure Basic Authentication in Leena AI

The Confluence connector uses Basic Authentication with the following parameters:

ParameterDescriptionExample
Site URLYour Confluence instance URLhttps://yourcompany.atlassian.net
User EmailYour Confluence account email address[email protected]
API TokenThe API token generated in Step 1Generated token from Confluence

Step 4: Test and Save Connection

  1. Click Test Connection to verify the setup
  2. If successful, click Save to store the connector configuration
  3. The connector is now ready for use

Option 2: OAuth 2.0 Authentication (Advanced)

OAuth 2.0 provides more granular access control and is suitable for enterprise integrations.

Step 1: Create Atlassian Connect App

  1. Access App Configuration:
    • In Leena AI, when setting up the OAuth 2.0 method, you'll see a Descriptor URL
    • This URL provides the app configuration for Atlassian Connect
  2. Install Connect App:
    • Go to your Confluence instance
    • Navigate to Apps > Manage apps
    • Click Upload app
    • Enter the Descriptor URL provided by Leena AI
    • Install the app

Step 2: Configure OAuth 2.0 in Leena AI

ParameterDescriptionSource
Site URLYour Confluence instance URLYour Confluence domain
User EmailAdmin email for initial setupYour admin email
API TokenAdmin API token for setupFrom Confluence settings
OAuth Client IDGenerated after app installationAuto-filled after setup
Shared SecretGenerated after app installationAuto-filled after setup

Step 3: Complete OAuth Setup

  1. The OAuth Client ID and Shared Secret will be auto-filled after the Connect app is installed
  2. Click Test Connection to verify the OAuth flow
  3. Save the connector configuration

Authentication Comparison

FeatureBasic AuthOAuth 2.0
Setup ComplexitySimpleAdvanced
SecurityAPI Token basedOAuth flow based
Use CaseMost integrationsEnterprise/Complex apps
PermissionsUser-level permissionsApp-level permissions
Recommended ForStandard workflowsAdvanced integrations

Core Permissions Required

Ensure your Confluence account has the following permissions:

Basic Permissions:

  • Read access: View spaces and pages
  • Write access: Create and edit pages
  • Space admin: Manage space content (if needed)

Advanced Permissions (for comprehensive functionality):

  • Confluence admin: Full administrative access
  • Space permissions: Manage space-specific permissions
  • User management: Add/remove users from spaces

Troubleshooting Common Issues

Basic Authentication Issues:

  • Invalid credentials: Verify email and API token are correct
  • Site URL errors: Ensure URL format is correct (https://yourcompany.atlassian.net)
  • Permission denied: Check if user has sufficient Confluence permissions

OAuth 2.0 Issues:

  • App installation fails: Verify Descriptor URL is accessible
  • Client ID not populated: Ensure Connect app is properly installed
  • OAuth flow errors: Check shared secret and client ID configuration

Security Best Practices

  1. API Token Security: Store API tokens securely and rotate them regularly
  2. Principle of Least Privilege: Only grant necessary permissions
  3. Access Monitoring: Monitor API usage through Confluence admin panels
  4. Regular Audits: Review connector permissions and access logs periodically

The connector is now ready to be used by your Leena AI Agents for automated content management and documentation workflows.


Create page

Creates a new page in Confluence. The Agent can leverage the skill (workflow), which has been designed to create a new documentation page in Confluence, once the user provides the page details and content.

Required Parameters

ParameterDescriptionType
Page TitleThe title of the new pageString
Space KeyThe key identifier of the Confluence space. The space key is created while creating a page. For example, if 'Workflows' is the name of the space, then the key would be auto-generated as 'WOR'String

Optional Parameters

ParameterDescriptionType
Parent Page IDID of the parent page (for hierarchical structure)String
Page ContentThe main content of the pageString
Content FormatThe format of the page contentDropdown
StatusThe publication status of the pageDropdown

Content Format Options

  • storage: Confluence storage format (default)
  • wiki: Wiki markup format
  • view: HTML view format

Status Options

  • current: Published page (default)
  • draft: Draft page (not published)

Example Usage

Basic Page Creation

{
  "Page Title": "Getting Started Guide",
  "Space Key": "DOCS"
}

Page with Content

{
  "Page Title": "API Documentation",
  "Space Key": "DEV",
  "Page Content": "<h1>API Overview</h1><p>This page contains comprehensive API documentation for our services.</p>",
  "Content Format": "storage",
  "Status": "current"
}

Child Page Creation

{
  "Page Title": "Troubleshooting",
  "Space Key": "SUPPORT",
  "Parent Page ID": "123456789",
  "Page Content": "<h2>Common Issues</h2><p>This section covers frequently encountered problems and their solutions.</p>",
  "Content Format": "storage",
  "Status": "current"
}

Draft Page Creation

{
  "Page Title": "Work in Progress - New Feature",
  "Space Key": "PROJECT",
  "Page Content": "<h1>New Feature Documentation</h1><p>This page is under development...</p>",
  "Content Format": "storage",
  "Status": "draft"
}

Wiki Markup Content

{
  "Page Title": "Team Guidelines",
  "Space Key": "TEAM",
  "Page Content": "h1. Team Guidelines\n\n* Follow coding standards\n* Document your work\n* Collaborate effectively",
  "Content Format": "wiki",
  "Status": "current"
}

Content Format Examples

Storage Format (Confluence HTML)

<h1>Welcome</h1>
<p>This is a paragraph with <strong>bold</strong> text.</p>
<ul>
  <li>Item 1</li>
  <li>Item 2</li>
</ul>

Wiki Markup Format

h1. Welcome

This is a paragraph with *bold* text.

* Item 1
* Item 2

Response

Upon successful creation, the action returns:

  • Page ID of the newly created page
  • Page URL for direct access
  • Creation timestamp
  • Version information
  • Space details

Common Use Cases

  1. Documentation Creation: Create technical documentation and user guides
  2. Knowledge Base: Build FAQ pages and troubleshooting guides
  3. Project Documentation: Create project specifications and requirements
  4. Meeting Notes: Generate structured meeting notes and action items
  5. Process Documentation: Document workflows and procedures
  6. Team Wikis: Create collaborative team spaces and information hubs

Error Handling

Common error scenarios:

  • Space Not Found: Invalid Space Key or insufficient permissions
  • Parent Page Not Found: Invalid Parent Page ID
  • Permission Denied: User lacks page creation permissions in the space
  • Invalid Content: Malformed HTML or wiki markup
  • Duplicate Title: Page with the same title already exists in the space
  • Space Limits: Space has reached page creation limits

Update page

Updates an existing page in Confluence. The Agent can leverage the skill (workflow), which has been designed to modify an existing documentation page in Confluence, once the user provides the updated page details and content.

Required Parameters

ParameterDescriptionType
Page IDThe unique identifier of the page to updateString
VersionThe current version number of the pageInteger

Optional Parameters

ParameterDescriptionType
Page TitleThe updated title of the pageString
Page ContentThe updated main content of the pageString
Content FormatThe format of the page contentDropdown
StatusThe publication status of the pageDropdown

Content Format Options

  • storage: Confluence storage format (default)
  • wiki: Wiki markup format
  • view: HTML view format

Status Options

  • current: Published page
  • draft: Draft page (not published)

Example Usage

Update Page Content Only

{
  "Page ID": "123456789",
  "Version": 3,
  "Page Content": "<h1>Updated Content</h1><p>This page has been updated with new information and examples.</p>",
  "Content Format": "storage"
}

Update Title and Content

{
  "Page ID": "987654321",
  "Version": 1,
  "Page Title": "Revised API Documentation",
  "Page Content": "<h1>API Documentation v2.0</h1><p>Updated documentation reflecting new API changes.</p>",
  "Content Format": "storage",
  "Status": "current"
}

Convert to Draft

{
  "Page ID": "456789123",
  "Version": 2,
  "Status": "draft"
}

Update with Wiki Markup

{
  "Page ID": "789123456",
  "Version": 4,
  "Page Title": "Updated Guidelines",
  "Page Content": "h1. Updated Team Guidelines\n\n* New coding standards\n* Updated review process\n* Enhanced documentation requirements",
  "Content Format": "wiki",
  "Status": "current"
}

Publish Draft to Current

{
  "Page ID": "321654987",
  "Version": 1,
  "Page Title": "Feature Documentation - Now Live",
  "Page Content": "<h1>New Feature Documentation</h1><p>This feature is now available in production.</p>",
  "Content Format": "storage",
  "Status": "current"
}

Version Management

Important: Confluence requires the exact current version number for updates. To get the current version:

  1. Use Get Page by ID action first to retrieve current version
  2. Use the returned version number in your update request
  3. Version number increments automatically after successful update

Version Workflow Example

  1. Get Page by ID → Version: 3
  2. Update Page with Version: 3 → New Version: 4
  3. Next update must use Version: 4

Response

Upon successful update, the action returns:

  • Updated page ID
  • New version number
  • Update timestamp
  • Page URL
  • Updated content summary

Common Use Cases

  1. Content Maintenance: Regular updates to documentation and guides
  2. Version Control: Track changes and maintain document versions
  3. Status Management: Convert drafts to published content
  4. Content Migration: Update pages with migrated content
  5. Automated Updates: Scheduled content updates from external systems
  6. Collaborative Editing: Programmatic updates as part of review workflows

Best Practices

Before Updating:

  1. Get Current Version: Always retrieve the current version number first
  2. Backup Content: Consider backing up existing content before major changes
  3. Review Permissions: Ensure sufficient permissions to edit the page
  4. Validate Content: Check content format and structure

During Updates:

  1. Incremental Changes: Make focused updates rather than complete rewrites
  2. Content Validation: Ensure HTML/wiki markup is properly formatted
  3. Version Tracking: Keep track of version numbers for concurrent updates
  4. Error Handling: Implement proper error handling for version conflicts

After Updates:

  1. Verify Changes: Confirm updates were applied correctly
  2. Notify Stakeholders: Inform relevant users about significant changes
  3. Update References: Update any external references to the content
  4. Monitor Access: Track page access and engagement metrics

Error Handling

Common error scenarios:

  • Page Not Found: Invalid Page ID
  • Version Conflict: Incorrect version number (page was updated by someone else)
  • Permission Denied: Insufficient edit permissions
  • Invalid Content: Malformed HTML or wiki markup
  • Content Too Large: Content exceeds Confluence limits
  • Concurrent Updates: Another user updated the page simultaneously

Delete page

Deletes an existing page from Confluence. The Agent can leverage the skill (workflow), which has been designed to remove a documentation page from Confluence, once the user specifies the page to be deleted.

Required Parameters

ParameterDescriptionType
Page IDThe unique identifier of the page to deleteString

Example Usage

Basic Page Deletion

{
  "Page ID": "123456789"
}

Delete Specific Page

{
  "Page ID": "987654321"
}

Delete Child Page

{
  "Page ID": "child-page-456789"
}

Response

Upon successful deletion, the action returns:

  • Confirmation of successful deletion
  • Deleted page ID
  • Deletion timestamp
  • Space information where the page was located

Common Use Cases

  1. Content Cleanup: Remove outdated or obsolete documentation
  2. Page Management: Delete duplicate or test pages
  3. Space Reorganization: Remove pages during space restructuring
  4. Automated Workflows: Delete pages as part of content lifecycle management
  5. Archive Management: Remove archived content that's no longer needed

Error Handling

Common error scenarios:

  • Page Not Found: Invalid Page ID
  • Permission Denied: Insufficient delete permissions
  • Page Has Children: Page has child pages that need to be handled first
  • Space Restrictions: Space-level restrictions preventing deletion