Confluence

Overview

The Confluence connector enables your AI Colleagues to integrate with your organization's Atlassian Confluence platform, facilitating automated knowledge management, page creation, and collaborative documentation workflows.

Confluence is Atlassian's team workspace and knowledge management platform that allows users to create, collaborate on, and organize content in spaces. The Confluence connector allows Leena AI to automate documentation workflows, manage pages, and interact with spaces seamlessly.

API Details

Leena AI integrates with Confluence via REST APIs.

Documentation link: https://developer.atlassian.com/cloud/confluence/rest/v2/intro/

Setup

The Confluence connector supports two authentication methods: Basic Authentication and OAuth 2.0 (Atlassian Connect).

Prerequisites

Before setting up the Confluence connector, ensure you have:

  • Administrator access to your Atlassian account
  • Access to your Confluence Cloud instance
  • Ability to create API tokens in Atlassian
  • Access to your Leena AI workspace with connector management permissions

Get credentials

Basic Authentication

Here is how to create an API token in Atlassian:

  1. Log in to your Atlassian account at https://id.atlassian.com/manage/api-tokens
  2. Click Create API token
  3. Give your API token a name that describes what it does
  4. Select an expiration date for the API token (Token expiration can be between 1 and 365 days)
  5. Click Create
  6. Click Copy to clipboard, then paste the token and save it somewhere safe
    • Note: You cannot recover the API token later. Save it in a password manager.
  7. Note down your Confluence site URL (e.g., https://your-domain.atlassian.net)

OAuth 2.0 (Atlassian Connect) - For Enterprise

For enterprise environments requiring user impersonation:

  1. Set up an Atlassian Connect App using the Descriptor URL provided by Leena AI
  2. Install the Connect App in your Confluence instance
  3. Upon installation, the OAuth Client ID and Shared Secret will be auto-populated
  4. The system will handle JWT-based token exchange for secure authentication

Add connection

Here is how to add a connection on 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 your authentication method:

For Basic Authentication:

  1. Site URL: Your Confluence site URL (e.g., https://your-domain.atlassian.net)
  2. User Email: Your Atlassian account email address
  3. API Token: The API token you generated from Atlassian

For OAuth 2.0 (Atlassian Connect):

  1. Site URL: Your Confluence site URL

  2. User Email: Admin email for initial setup

  3. API Token: Admin API token for setup

  4. Descriptor URL: Auto-generated URL for Atlassian Connect App setup

  5. OAuth Client ID: Auto-filled after Connect App installation

  6. Shared Secret: Auto-filled after Connect App installation

  7. Click Connect to validate and save the connection

  8. The connector will validate credentials by making a test API call to verify access

Actions

The following actions are supported for the Confluence connector:

Create Page

Creates a new page in Confluence. The Agent can leverage the skill (workflow), which has been designed to create a new page in Confluence, once the user raises a query to do so.

Input Parameters

Here are the input parameters required to set up this action:

Mandatory

NameDescription
Page TitleThe title of the page to create
Space KeyThe key of the space where the page will be created
Page ContentThe content of the page in storage format (supports HTML and Confluence Wiki markup)

Optional

NameDescription
Parent Page IDThe ID of the parent page (optional, for creating child pages)
Content FormatThe format of the page content, options: storage: Storage Format (default), wiki: Wiki Markup
StatusThe status of the page to create, options: current: Published page (default), draft: Draft page

Here is a sample JSON input:

//Basic Page Creation

{
  "title": "Project Documentation",
  "spaceKey": "PROJ",
  "body": {
    "storage": {
      "value": "<p>This is the content of the new page.</p>"
    }
  }
}

//Create Child Page

{
  "title": "Sprint 1 Notes",
  "spaceKey": "PROJ",
  "parentId": "123456789",
  "body": {
    "storage": {
      "value": "<h2>Sprint Goals</h2><p>Complete user authentication module.</p>"
    }
  },
  "representation": "storage",
  "status": "current"
}

//Create Draft Page

{
  "title": "Draft Design Document",
  "spaceKey": "DESIGN",
  "body": {
    "storage": {
      "value": "<p>Work in progress design specifications.</p>"
    }
  },
  "status": "draft"
}

Response

Upon successful creation, the action returns the created page details including:

  • Page ID
  • Page URL
  • Page title
  • Space information
  • Version number
  • Creation timestamp

Get Page by ID

Retrieves a specific page from Confluence by its ID. This action can be leveraged by Leena AI Orchestrator/Agent to fetch page content for reference or processing. Here are some common use cases:

  • Content Retrieval: Get page content for analysis or reference
  • Version Check: Verify current version before updating
  • Information Lookup: Retrieve specific documentation on demand
  • Content Aggregation: Gather information from multiple pages

Input Parameters

Here are the input parameters required to set up this action:

Mandatory

NameDescription
Page IDThe ID of the page to retrieve

Optional

NameDescription
StatusStatus of the page to return, options: current: Current published version, archived: Archived pages, trashed: Trashed pages, draft: Draft pages
VersionThe version number of the page to retrieve
ExpandA comma-separated list of properties to expand (e.g., "body.storage,version,space")

Here is a sample JSON input:

//Basic Page Retrieval

{
  "pageId": "123456789"
}

//Get Page with Expanded Properties

{
  "pageId": "123456789",
  "expand": "body.storage,version,space"
}

//Get Specific Version

{
  "pageId": "123456789",
  "version": 5
}

//Get Draft Page

{
  "pageId": "123456789",
  "status": "draft"
}

Response

The action returns the page details including:

  • Page ID
  • Page title
  • Page content (if expanded)
  • Version information
  • Space details
  • Creation and modification timestamps
  • Author information

Get Pages

Retrieves a list of pages from a Confluence space. This action can be leveraged by Leena AI Orchestrator/Agent to list down all the pages in a specific space or filter pages based on various criteria. Here are some common use cases:

  • Space Overview: Get all pages in a space
  • Content Discovery: Find pages by title or status
  • Documentation Audit: Review pages in a space
  • Search and Filter: Find specific documentation

Input Parameters

Here are the input parameters required to set up this action:

Mandatory

NameDescription
Space KeyThe key of the space to get pages from

Optional

NameDescription
LimitMaximum number of pages to return, options: 10, 25 (default), 50, 100
StartStarting index of the returned pages for pagination, options: 0 (default), 10, 25, 50
TitleFilter pages by title
StatusStatus of the pages to return, options: current: Current published pages, archived: Archived pages, trashed: Trashed pages, draft: Draft pages
ExpandProperties to expand in the response, options: None, body.storage: Page content, version: Version info, body.storage,version: Content and version, ancestors: Parent pages, children, descendants, space

Here is a sample JSON input:

//Get All Pages in Space

{
  "spaceKey": "PROJ",
  "limit": "25",
  "start": "0"
}

//Filter by Title

{
  "spaceKey": "PROJ",
  "title": "Meeting Notes",
  "limit": "50"
}

//Get Pages with Content

{
  "spaceKey": "DOCS",
  "expand": "body.storage,version",
  "status": "current",
  "limit": "25"
}

//Paginated Results

{
  "spaceKey": "PROJ",
  "limit": "25",
  "start": "25"
}

Response

The action returns a list of pages, each containing:

  • Page ID
  • Page title
  • Page URL
  • Status
  • Version information (if expanded)
  • Content (if expanded)
  • Space information

Get Spaces

Retrieves a list of spaces from Confluence. This action can be leveraged by Leena AI Orchestrator/Agent to discover available spaces for content management. Here are some common use cases:

  • Space Discovery: Find available spaces in the organization
  • Access Review: Check which spaces are accessible
  • Space Selection: Help users select the right space for content
  • Organization Overview: Get an overview of all spaces

Input Parameters

Here are the input parameters required to set up this action:

Optional

NameDescription
LimitMaximum number of spaces to return, options: 10, 25 (default), 50, 100
StartStarting index of the returned spaces for pagination, options: 0 (default), 10, 25, 50
Space TypeType of spaces to return, options: global: Global/team spaces, personal: Personal spaces
StatusStatus of the spaces to return, options: current: Active spaces, archived: Archived spaces
ExpandProperties to expand in the response, options: None, description: Space description, metadata: Space metadata, description,metadata: Both, icon: Space icon, homepage, All

Here is a sample JSON input:

//Get All Spaces

{
  "limit": "25",
  "start": "0"
}

//Get Global Spaces Only

{
  "type": "global",
  "status": "current",
  "limit": "50"
}

//Get Spaces with Details

{
  "expand": "description,metadata",
  "status": "current",
  "limit": "25"
}

//Get Personal Spaces

{
  "type": "personal",
  "limit": "25"
}

Response

The action returns a list of spaces, each containing:

  • Space ID
  • Space key
  • Space name
  • Space type
  • Status
  • Description (if expanded)
  • Homepage information (if expanded)
  • Icon URL (if expanded)

Update Page

Updates an existing page in Confluence. The Agent can leverage the skill (workflow), which has been designed to modify an existing page in Confluence, once the user provides the page details to be updated. Here are some common use cases:

  • Content Updates: Modify page content with new information
  • Title Changes: Update page titles
  • Version Management: Create new versions of documentation
  • Collaborative Editing: Update shared documentation
  • Status Changes: Move pages between draft and published

Input Parameters

Here are the input parameters required to set up this action:

Mandatory

NameDescription
Page IDThe ID of the page to update
Page TitleThe updated title of the page
VersionThe current version number of the page (will be incremented automatically)
Page ContentThe updated content of the page in storage format (supports HTML and Confluence Wiki markup)

Optional

NameDescription
Content FormatThe format of the page content, options: storage: Storage Format (default), wiki: Wiki Markup
StatusThe status of the updated page, options: current: Published page (default), draft: Draft page

Here is a sample JSON input:

//Basic Page Update

{
  "pageId": "123456789",
  "title": "Updated Project Documentation",
  "version": 3,
  "body": {
    "storage": {
      "value": "<p>This is the updated content of the page.</p>"
    }
  }
}

//Update Page Content Only

{
  "pageId": "123456789",
  "title": "Project Documentation",
  "version": 5,
  "body": {
    "storage": {
      "value": "<h2>New Section</h2><p>Added new information to the documentation.</p>"
    }
  },
  "representation": "storage",
  "status": "current"
}

//Update to Draft Status

{
  "pageId": "123456789",
  "title": "Work in Progress Document",
  "version": 2,
  "body": {
    "storage": {
      "value": "<p>Draft content being reviewed.</p>"
    }
  },
  "status": "draft"
}

Response

Upon successful update, the action returns the updated page details including:

  • Updated page properties
  • Page URL
  • New version number
  • Modification timestamp
  • Version message

Delete Page

Deletes an existing page from Confluence. The Agent can leverage the skill (workflow), which has been designed to remove a page from Confluence, once the user specifies the page to be deleted. Here are some common use cases:

  • Content Cleanup: Remove outdated or redundant pages
  • Page Management: Delete pages that are no longer relevant
  • Space Organization: Clean up space by removing unnecessary content
  • Draft Removal: Delete abandoned draft pages
  • Privacy Management: Remove sensitive documentation

Input Parameters

Here are the input parameters required to set up this action:

Mandatory

NameDescription
Page IDThe ID of the page to delete

Here is a sample JSON input:

//Basic Page Deletion

{
  "pageId": "123456789"
}

Response

Upon successful deletion, the action returns:

  • Confirmation of successful deletion
  • HTTP status code (204 for successful deletion)