Confluence Integration Documentation

What the Integration Does

The Confluence integration enables seamless interaction with your Confluence account, allowing agents to retrieve or manipulate Confluence content programmatically.

Short Description

This integration is typically used to automate content management tasks such as retrieving space details, creating new pages, or updating existing page content within Confluence.

Example Scenarios

  • :loudspeaker: Retrieve all pages from a specific Confluence space and display them in a dashboard.
  • :page_facing_up: Create a new Confluence page with predefined content automatically upon project initiation.
  • :pencil2: Update specific Confluence pages with the latest data from external systems.

Capabilities

This integration exposes several capabilities:

1. Retrieve Page Content

  • Purpose: Retrieve the content of a specific page in a Confluence space.
  • What it Enables: Automate the fetching of Confluence page details.
  • Input Schema:
    • space_name: string
    • page_title: string
    • expand: string (optional, default: "body.storage")
  • Output Schema:
    • JSON-encoded page content or error message.

2. Retrieve All Space Details

  • Purpose: Retrieve details about all Confluence spaces.
  • What it Enables: Get a summary of spaces for oversight or reporting.
  • Input Schema: None
  • Output Schema:
    • List of space details as strings.

3. Get Space Key

  • Purpose: Obtain the space key for a Confluence space.
  • What it Enables: Useful for operations requiring a space key, like page retrieval.
  • Input Schema:
    • space_name: string
  • Output Schema:
    • Space key or "No space found" message.

4. Retrieve All Pages From Space

  • Purpose: Fetch a list of all pages belonging to a specific Confluence space.
  • What it Enables: Simplifies access to entire space contents.
  • Input Schema:
    • space_name: string
  • Output Schema:
    • List containing page id and title.

5. Create Page

  • Purpose: Create a new page within a Confluence space.
  • What it Enables: Automate page creation for consistent documentation.
  • Input Schema:
    • space_name: string
    • title: string
    • body: string
    • parent_id: string (optional)
  • Output Schema:
    • JSON-encoded ID and title of the newly created page.

6. Update Page

  • Purpose: Update content of an existing Confluence page.
  • What it Enables: Automate content updates to reflect the latest information.
  • Input Schema:
    • page_id: string
    • title: string
    • body: string
  • Output Schema:
    • JSON-encoded status and ID of the updated page or error message.

Limitations

  • :chart_with_downwards_trend: Rate Limits: Ensure your API usage complies with Confluence's API rate limits.
  • :no_entry_symbol: Partial API Coverage: Not all Confluence API features may be supported.

Setup & Configuration

Prerequisites

  • :scroll: Confluence account.
  • :key: API Key generation from your Confluence account.
  • Permissions to access and modify spaces/pages as required.

Authentication

  • Authentication is handled using basic authentication or API tokens.
  • Credentials can be provided as environment variables (CONFLUENCE_URL, CONFLUENCE_USERNAME, CONFLUENCE_API_KEY).

Step-by-Step Guide

  1. Environment Variables
    • Ensure your environment variables are set correctly. E.g., CONFLUENCE_URL, CONFLUENCE_USERNAME, CONFLUENCE_API_KEY.

Testing Connection

  • Verify the credentials setup by querying a known page using the get_page_content capability.

How to Use in Agents

Example Prompts and Configurations

  • :question: Example to retrieve a page:

    Retrieve the "Home Page" content from the "Marketing" space using Confluence.

Code/Configuration Snippet

  • Example configuration in an agent definition:
    {
      "integration": "confluence_tools",
      "operation": "get_page_content",
      "parameters": {
        "space_name": "Sales",
        "page_title": "Q1 Report"
      }
    }
    

Best Practices

  • Schedule frequent API calls during off-peak hours to adhere to rate limits.
  • Cache results of frequently accessed pages to reduce load.

Reference Section