> ## Documentation Index
> Fetch the complete documentation index at: https://hadiqio.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Confluence

> Index Confluence pages and attachments so your team can get direct answers from your wiki.

The Confluence connector indexes pages, comments, and attachments from your Confluence workspace. Rather than searching for page titles and scanning results, you can ask Hadiq.io a question and get an answer sourced directly from the relevant wiki content.

## What gets indexed

* **Pages**: full page content including formatted text
* **Comments**: inline and page-level comments appended to the page content
* **Attachments**: PDFs, Word documents, and other supported file types attached to pages
* **Spaces**: used to organize the hierarchy — spaces and ancestor pages are tracked so results show where content lives
* **Labels**: indexed as metadata for filtering

Pages with labels you configure to skip are excluded from indexing.

## Prerequisites

You can connect Confluence using either:

* **API token** (Confluence Cloud): use your Atlassian account email and an API token generated at [id.atlassian.com](https://id.atlassian.com/manage-profile/security/api-tokens).
* **Personal access token** (Confluence Data Center / Server): generate a token in your Confluence profile settings.

The account used must have **read access** to the spaces you want to index.

## Connect Confluence

<Steps>
  <Step title="Go to Admin > Connectors">
    Navigate to **Admin Panel** > **Connectors** and select **Confluence**.
  </Step>

  <Step title="Enter your Confluence URL">
    Enter your Confluence base URL. For Cloud, this is typically `https://yourcompany.atlassian.net/wiki`. For Data Center or Server, use your self-hosted URL.
  </Step>

  <Step title="Select deployment type">
    Select **Confluence Cloud** or **Confluence Data Center / Server** to match your deployment.
  </Step>

  <Step title="Add credentials">
    **Confluence Cloud**:

    * **Username**: your Atlassian account email
    * **API token**: the token generated at id.atlassian.com

    **Confluence Data Center / Server**:

    * **Personal access token**: the token from your Confluence profile
  </Step>

  <Step title="Configure scope (optional)">
    Leave the scope fields empty to index all spaces the account can access.

    To narrow the scope:

    * **Space key**: enter a single space key (e.g., `ENG`) to index only that space
    * **Page ID**: enter a specific page ID to index that page and optionally its descendants
    * **Index recursively**: enable to index all child pages under the specified page
    * **CQL query**: enter a custom Confluence Query Language expression for precise control

    ```text theme={null}
    type=page AND space="ENG" AND label="runbook"
    ```
  </Step>

  <Step title="Save">
    Click **Save**. Hadiq.io connects to Confluence and begins indexing. Initial sync time depends on the number of pages and attachments.
  </Step>
</Steps>

<Warning>
  If your Confluence instance is self-hosted and not publicly accessible, Hadiq.io must be deployed in a network that can reach it. For Hadiq.io Cloud, your Confluence instance must be reachable from the internet or you must use self-hosted Hadiq.io.
</Warning>

## Permission syncing

Hadiq.io reads space-level and page-level permissions from Confluence and enforces them in search results. Users only see pages they can access in Confluence.

* **Space permissions**: applied to all pages in the space by default
* **Page restrictions**: individual page restrictions override space-level access
* Ancestor page restrictions propagate to child pages

<Note>
  Automatic permission sync — where Hadiq.io continuously re-checks Confluence ACLs — is available on the **Enterprise plan**.
</Note>

## Limitations

* Confluence attachments larger than the configured size threshold are skipped.
* Images embedded in pages are not indexed unless image indexing is explicitly enabled.
* Archived pages are not indexed by default.
* Confluence Personal Spaces are indexed if the credential has access to them.
