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

# Confluence

> Import documentation from Atlassian Confluence into AGO

Import pages from Atlassian Confluence Cloud or Data Center into AGO. The connector fetches pages recursively from a root page, converts HTML to Markdown, downloads attachments, and rewrites internal Confluence links to AGO links.

| Feature              | Details                                      |
| -------------------- | -------------------------------------------- |
| **Authentication**   | API Token                                    |
| **Content type**     | Enterprise wiki pages                        |
| **Hierarchy**        | Yes (recursive page trees)                   |
| **Attachments**      | Yes (images and files)                       |
| **Incremental sync** | Yes (version tracking skips unchanged pages) |

## Prerequisites

1. Access to Confluence Cloud or Data Center
2. An API token with read access to the spaces you want to import
3. The root page ID for your import (the top of the page tree)

### Generating an API Token

**Confluence Cloud:**

1. Go to [Atlassian Account Settings](https://id.atlassian.com/manage-profile/security/api-tokens)
2. Click **Create API token**
3. Give your token a label (e.g., "AGO Integration")
4. Copy the token immediately (you won't be able to see it again)

**Confluence Data Center:**

1. Go to your Confluence profile > **Personal Access Tokens**
2. Click **Create token**
3. Set expiration and permissions
4. Copy the generated token

### Finding Your Root Page ID

Navigate to the page you want as your root and look at the URL:

```
https://your-domain.atlassian.net/wiki/spaces/SPACE/pages/123456789/Page+Title
```

The number `123456789` is your page ID. You can also find it via the page's `...` menu > **Page Information**.

## Setup Steps

### 1. Configure Confluence Credentials

In your AGO admin interface, go to **Settings** and configure your Confluence connection:

| Setting           | Description                                                   |
| ----------------- | ------------------------------------------------------------- |
| Confluence domain | Your instance URL (e.g., `https://your-domain.atlassian.net`) |
| Admin email       | Email of the Confluence user with access                      |
| API token         | The token you generated above                                 |

### 2. Create a Knowledge Source

1. Navigate to **Knowledge** > **Sources** > **Create**
2. Select **Confluence** as the connector type
3. Enter the **Root Page ID** — the starting page for recursive import
4. Name your source (e.g., "Product Documentation")
5. Save and run a manual sync

The connector will import the root page and all child pages beneath it, preserving the hierarchy.

### 3. Import Multiple Spaces

Create a separate source for each Confluence space or section. For example, create one source for "Product Docs" pointing to one root page, and another for "Engineering Wiki" pointing to a different root page.

## What Gets Imported

The connector processes each page through these steps:

1. Fetches HTML content from Confluence
2. Converts emoticons to Unicode emojis (e.g., `:)` becomes 😊)
3. Converts HTML to Markdown (tables, lists, code blocks preserved)
4. Downloads attachments if the page version changed
5. Rewrites internal Confluence links to AGO documentation links
6. Stores the page with its position in the hierarchy

Pages that haven't changed since the last sync are skipped, so subsequent syncs are faster.

## Filtering

The connector imports all pages under the root page. To import only a specific section:

* Set the root page ID to the top of that section instead of the entire space homepage
* Create separate sources for different sections you want to import independently

## Best Practices

* Archive outdated pages in Confluence before importing
* Select a root page that represents the top of your documentation tree — avoid the space homepage if it includes unwanted sections
* Start with a small space to verify formatting before importing large ones
* Schedule regular syncs (daily or weekly) to keep content fresh
* For large spaces (500+ pages), split into multiple sources by section

## Troubleshooting

<AccordionGroup>
  <Accordion title="Authentication failed">
    * Verify your API token is correct and not expired
    * Check the email address matches the token owner
    * Ensure the user has read permission for the space
  </Accordion>

  <Accordion title="Page not found">
    * Verify the root page ID is correct
    * Check the page hasn't been deleted or moved
  </Accordion>

  <Accordion title="Missing images or attachments">
    * Verify the attachments are accessible to the API user
    * Unchanged pages skip attachment re-download — trigger a full re-sync if needed
  </Accordion>

  <Accordion title="Formatting issues">
    * Some Confluence macros don't have a Markdown equivalent and may not convert cleanly
    * Test with simpler page content first to isolate the issue
  </Accordion>

  <Accordion title="Broken internal links">
    * Verify all linked pages were included in the import (they must be under the same root page)

    ***
  </Accordion>
</AccordionGroup>

## Related

* [Knowledge Connectors](./knowledge-connectors) — All available connectors
* [Knowledge Source Management](../features/knowledge-source-management) — Managing sources
* [Connect Notion](../guides/connect-notion-howto) — Similar setup for Notion
