# Confluence

## Overview <a href="#overview" id="overview"></a>

The Confluence Integration enables seamless access to organizational knowledge by connecting your platform with Confluence. It allows users to retrieve, manage, and synchronize documentation, knowledge base articles, and content efficiently. This integration is specifically designed for **Content Management** capability, ensuring centralized access to structured information.

### Prerequisites <a href="#prerequisites" id="prerequisites"></a>

Ensure the following requirements are fulfilled before initiating the integration:

* An active **Confluence Admin account** with appropriate permissions.
* Valid **Confluence Domain**, **Username**, and **API Key**.
* Access to the platform (**TheLoops**) with **Admin role** privileges.

### Best practices <a href="#best-practices" id="best-practices"></a>

* **Use Active Browser Session:**\
  If you are already logged into Confluence in the same browser, authentication may complete seamlessly.
* **Secure API Key Management:**\
  Always store API Keys securely and avoid sharing them across unauthorized users.
* **Validate Integration Post Setup:**\
  Perform a **Test Connection** immediately after setup to ensure proper configuration.
* **Monitor API Key Expiry:**\
  Track API Key validity and update proactively to prevent integration failures.
* **Ensure Proper Permissions:**\
  Use an Admin account with appropriate access rights to avoid authentication issues.

## Setup Instructions

### Initiate Integration

{% stepper %}
{% step %}
Log in to **TheLoops** using an **Admin** account.
{% endstep %}

{% step %}
Navigate to **Settings → Integrations** module.
{% endstep %}

{% step %}
Click on the **“+ Add Integration”** button.
{% endstep %}

{% step %}
Search for **Confluence** integration and open it.
{% endstep %}
{% endstepper %}

### Configuration <a href="#step-2-basic-configuration" id="step-2-basic-configuration"></a>

{% stepper %}
{% step %}
In the **Basic** tab, enter a suitable **Integration Name**.
{% endstep %}

{% step %}
Confluence supports only **Content Management** capability, which is selected by default.
{% endstep %}

{% step %}
Click on the **Next** button.
{% endstep %}
{% endstepper %}

### Authentication

{% stepper %}
{% step %}
On the **Authentication** tab, enter the following details:

1. **Username**
2. **API Key**
3. **Confluence Domain**
   {% endstep %}

{% step %}
Click on the **Connect** button.
{% endstep %}

{% step %}
Upon successful authentication:

1. The integration will be added successfully.
2. A success message will be displayed.
   {% endstep %}
   {% endstepper %}

### Verification

{% stepper %}
{% step %}
Navigate back to the **Integrations** module.
{% endstep %}

{% step %}
Verify that the newly added integration appears at the top of the list.
{% endstep %}

{% step %}
Click on the **Test Connection** icon (beside the delete icon).
{% endstep %}

{% step %}
If the test connection is successful, a confirmation message will be displayed, indicating that the integration is configured correctly.
{% endstep %}
{% endstepper %}

## Token Management (API Key-Based Authentication) <a href="#token-management-api-key-based-authentication" id="token-management-api-key-based-authentication"></a>

### Overview

The Confluence integration uses **API Key-based authentication** (non-OAuth). If the API Key is revoked manually or expires, the integration will fail during **Test Connection**. In such cases, the API Key must be regenerated and updated in the integration.

### API Key Regeneration & Update Steps <a href="#api-key-regeneration-and-update-steps" id="api-key-regeneration-and-update-steps"></a>

{% stepper %}
{% step %}
Log in to your **Atlassian account** with Admin credentials.
{% endstep %}

{% step %}
Navigate to **Security → Create API Token**.
{% endstep %}

{% step %}
In the **Create API Token** popup:

* Enter a suitable name for the token.
* Set an expiry date.
* Click **Create**.
  {% endstep %}

{% step %}
Copy the generated **API Key** and store it securely.
{% endstep %}

{% step %}
Go to **TheLoops → Settings → Integrations**.
{% endstep %}

{% step %}
Locate the Confluence integration to be updated.
{% endstep %}

{% step %}
Click the **Test Connection** icon; if it fails, it indicates that the token has expired.
{% endstep %}

{% step %}
Click on the **Edit** icon (beside the delete icon).
{% endstep %}

{% step %}
Navigate to the **Authentication** tab.
{% endstep %}

{% step %}
Enter the new **API Key** in the respective field and click **Update**.
{% endstep %}

{% step %}
A success message will confirm the update.
{% endstep %}

{% step %}
Perform **Test Connection** again to verify successful configuration.
{% endstep %}
{% endstepper %}

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kb.theloops.io/cxplatform/ifs-loops-cx-platform/integrations/confluence.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
