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

# Connect Confluence Cloud to your assistant

> Read the pages of your Confluence Cloud site into MITHUNAI with an Atlassian account and API token you create, from making the token to the first sync.

To connect Confluence, create an API token for an Atlassian account, save it in MITHUNAI with your site address, and choose which spaces to read. It takes about five minutes.

> [!WARNING]
>
> Whatever the account can see, your assistant can quote to anyone who can ask it. Use an account
> that can view only the spaces you want read. See [Saved connections](https://docs.mithunai.com/knowledge/connections.md).

> [!NOTE]
>
> Confluence is in **beta**. It has been tested against scripted responses written from Atlassian's
> documentation, not yet against a real Confluence site, so tell your MITHUNAI contact if a sync
> does not read what you expect.

## What you need

* A **Confluence Cloud** site, at an address like `https://your-company.atlassian.net`. Confluence Data Center and sites on your own domain are not supported.
* An **Atlassian account** that can view the spaces you want read. A dedicated account for MITHUNAI is best, so its access is exactly what you choose.
* The **owner or admin** role in your MITHUNAI organisation.

## 1. Create the API token in Atlassian

Signed in to Atlassian as the account MITHUNAI will read as:

1. Go to [id.atlassian.com/manage-profile/security/api-tokens](https://id.atlassian.com/manage-profile/security/api-tokens).
2. Select **Create API token**. If you see a choice, choose the plain **API token**, not the one *with scopes*: MITHUNAI does not support scoped tokens yet.
3. Name it so you will recognise it later, such as `MITHUNAI`.
4. Choose an **expiration date**. Atlassian allows up to one year. Note the date: you will replace the token before then.
5. Select **Create**, then **Copy to clipboard**.

Atlassian shows the token only once. If you lose it, create another.

## 2. Save it in MITHUNAI

1. In the console, open **Sources** and choose **Connect source**.
2. Choose **Confluence**.
3. You have no Atlassian connection yet, so the form to add one is open. Fill in:
   * **Connection name**: your own name for it, such as `Docs team Confluence`.
   * **Site address**: your site, such as `https://your-company.atlassian.net`. You can paste any page's address; only the site is kept. **It cannot be changed later.**
   * **Account email**: the email of the Atlassian account the token belongs to.
   * **Token**: the API token you copied.
4. Choose **Save connection**. The token is now stored encrypted and is never shown again.

You can also save it first under **Settings → Connections**, then choose it here.

## 3. Choose what to read

* **Name**: what the source is called in your list.
* **Spaces**: the short code of each space, separated by commas. It is in the space's address: `…/wiki/spaces/ENG/…` is `ENG`. Leave it empty to read every space the account can see.
* **Maximum pages** (under *Change filters*): from 1 to 5,000, 500 by default.

Choose **Connect source**. The first sync starts straight away.

## What is read

Every **current** page in the chosen spaces, with its title and text, including code blocks. Each page becomes one document, and answers cite it with a link to the page.

Not read: drafts, archived or deleted pages, blog posts, comments, attachments and images. Restrictions on a page inside Confluence are not carried over: if the account can see a page, the assistant can quote it.

A page that has not changed since the last sync is not read again.

## When something goes wrong

| What you see | Why, and what to do |
| - | - |
| *Enter the address of your Atlassian site* | The site address is not an `atlassian.net` site. Check it starts with `https://` and ends with `.atlassian.net`. |
| *The space ENG was not found* | The space key is wrong, or the account cannot view that space. |
| *No pages were found* | The account can see no current pages in the spaces you chose. |
| *The Confluence site did not accept the saved connection* | The token expired or was revoked, or the email does not match it. [Replace the token](https://docs.mithunai.com/knowledge/connections.md#replace-a-token). |
| *The Confluence site is limiting how fast it can be read* | Atlassian is rate limiting. The sync is retried later by itself. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.