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:
- Basic Authentication (Recommended for most use cases)
- OAuth 2.0 (For advanced integrations)
Prerequisites
Before setting up the Confluence connector, ensure you have:
- Administrator access to your Confluence instance
- Ability to create API tokens in Confluence
- 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
- Log in to Confluence - Ensure you're signed in as an admin or user with appropriate permissions
- Navigate to Account Settings:
- Click on your profile picture in the top-right corner
- Select Account settings
- Go to Security tab
- 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
- Log in to your Leena AI workspace
- Navigate to Settings > Integrations
- Search for "Confluence" and select it from the list to add its new connector
- Choose Basic Authentication method
- 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:
| Parameter | Description | Example |
|---|---|---|
| Site URL | Your Confluence instance URL | https://yourcompany.atlassian.net |
| User Email | Your Confluence account email address | [email protected] |
| API Token | The API token generated in Step 1 | Generated token from Confluence |
Step 4: Test and Save Connection
- Click Test Connection to verify the setup
- If successful, click Save to store the connector configuration
- 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
- 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
- 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
| Parameter | Description | Source |
|---|---|---|
| Site URL | Your Confluence instance URL | Your Confluence domain |
| User Email | Admin email for initial setup | Your admin email |
| API Token | Admin API token for setup | From Confluence settings |
| OAuth Client ID | Generated after app installation | Auto-filled after setup |
| Shared Secret | Generated after app installation | Auto-filled after setup |
Step 3: Complete OAuth Setup
- The OAuth Client ID and Shared Secret will be auto-filled after the Connect app is installed
- Click Test Connection to verify the OAuth flow
- Save the connector configuration
Authentication Comparison
| Feature | Basic Auth | OAuth 2.0 |
|---|---|---|
| Setup Complexity | Simple | Advanced |
| Security | API Token based | OAuth flow based |
| Use Case | Most integrations | Enterprise/Complex apps |
| Permissions | User-level permissions | App-level permissions |
| Recommended For | Standard workflows | Advanced 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
- API Token Security: Store API tokens securely and rotate them regularly
- Principle of Least Privilege: Only grant necessary permissions
- Access Monitoring: Monitor API usage through Confluence admin panels
- 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
| Parameter | Description | Type |
|---|---|---|
| Page Title | The title of the new page | String |
| Space Key | The 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
| Parameter | Description | Type |
|---|---|---|
| Parent Page ID | ID of the parent page (for hierarchical structure) | String |
| Page Content | The main content of the page | String |
| Content Format | The format of the page content | Dropdown |
| Status | The publication status of the page | Dropdown |
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
- Documentation Creation: Create technical documentation and user guides
- Knowledge Base: Build FAQ pages and troubleshooting guides
- Project Documentation: Create project specifications and requirements
- Meeting Notes: Generate structured meeting notes and action items
- Process Documentation: Document workflows and procedures
- 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
| Parameter | Description | Type |
|---|---|---|
| Page ID | The unique identifier of the page to update | String |
| Version | The current version number of the page | Integer |
Optional Parameters
| Parameter | Description | Type |
|---|---|---|
| Page Title | The updated title of the page | String |
| Page Content | The updated main content of the page | String |
| Content Format | The format of the page content | Dropdown |
| Status | The publication status of the page | Dropdown |
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:
- Use Get Page by ID action first to retrieve current version
- Use the returned version number in your update request
- Version number increments automatically after successful update
Version Workflow Example
- Get Page by ID → Version: 3
- Update Page with Version: 3 → New Version: 4
- 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
- Content Maintenance: Regular updates to documentation and guides
- Version Control: Track changes and maintain document versions
- Status Management: Convert drafts to published content
- Content Migration: Update pages with migrated content
- Automated Updates: Scheduled content updates from external systems
- Collaborative Editing: Programmatic updates as part of review workflows
Best Practices
Before Updating:
- Get Current Version: Always retrieve the current version number first
- Backup Content: Consider backing up existing content before major changes
- Review Permissions: Ensure sufficient permissions to edit the page
- Validate Content: Check content format and structure
During Updates:
- Incremental Changes: Make focused updates rather than complete rewrites
- Content Validation: Ensure HTML/wiki markup is properly formatted
- Version Tracking: Keep track of version numbers for concurrent updates
- Error Handling: Implement proper error handling for version conflicts
After Updates:
- Verify Changes: Confirm updates were applied correctly
- Notify Stakeholders: Inform relevant users about significant changes
- Update References: Update any external references to the content
- 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
| Parameter | Description | Type |
|---|---|---|
| Page ID | The unique identifier of the page to delete | String |
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
- Content Cleanup: Remove outdated or obsolete documentation
- Page Management: Delete duplicate or test pages
- Space Reorganization: Remove pages during space restructuring
- Automated Workflows: Delete pages as part of content lifecycle management
- 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
Updated about 20 hours ago
