# Confluence
URL: https://docs.clearly-ai.com/docs/integrations/documents/confluence
Description: Connect Clearly AI to Confluence.
## Getting started [#getting-started]

To configure the Confluence integration, generate an API token in Atlassian that allows Clearly AI to read pages and attachments and add comments in your Confluence instance.

Clearly AI acts on behalf of the user who generates the credentials. For shared use, we recommend creating a dedicated **Clearly AI bot** service account and generating the token under that account.

### Prerequisites [#prerequisites]

* Access to **Integrations** in **Organization settings**
* A Confluence Cloud instance
* (Recommended) A dedicated service account in Atlassian for Clearly AI

### Ensure email visibility [#ensure-email-visibility]

The email on the account used for the token must be visible. Set visibility to **Anyone** under **Personal Settings and Visibility** at [id.atlassian.com/manage-profile/profile-and-visibility](https://id.atlassian.com/manage-profile/profile-and-visibility).

### Generate an API token [#generate-an-api-token]

1. Go to your Atlassian account security page at [id.atlassian.com/manage-profile/security](https://id.atlassian.com/manage-profile/security).
2. Under **API tokens**, click **Create and manage API tokens**.
3. Create a new API token with the scopes listed below.
4. Set an appropriately long expiry (maximum 1 year).
5. Copy the token.

### Required scopes [#required-scopes]

| Scope                                  | Purpose              |
| -------------------------------------- | -------------------- |
| `read:page:confluence`                 | Read pages           |
| `read:attachment:confluence`           | Read attachments     |
| `read:folder:confluence`               | Read folders         |
| `read:hierarchical-content:confluence` | Read child pages     |
| `read:space:confluence`                | Read spaces          |
| `read:content-details:confluence`      | Read content details |
| `write:comment:confluence`             | Add comments         |

### Configure Clearly AI [#configure-clearly-ai]

1. In Clearly AI, open **Organization settings**, select **Integrations**, then click **Set up** on the Confluence card.
2. Under **Authentication**, select **Shared API Token**.
3. Paste your Confluence instance URL in **Base URL** (e.g., `https://mycompany.atlassian.net/wiki`).
4. Enter the email of the account that generated the token in **User Email**.
5. Paste the API token in **Shared API Token**.
6. Check **I understand** under the shared-credential notice, then click **Add workspace credential**. Clearly AI tests the credential and enables the integration only when the test passes.

## Add Confluence content to a project [#add-confluence-content-to-a-project]

1. Open a project.
2. Open **Manage Sources** and click **Search Integrations**.
3. Select **Confluence**.
4. Add a space, folder, or individual page. You can also paste a Confluence link.
5. For a space or folder, choose which direct children to include.
6. Save the source and wait for processing to finish.

Clearly AI keeps the Confluence hierarchy, so nested pages are added under their real parent rather than flattened into one list.

To pick up later edits and new pages, open the project, open **Manage Sources**, and choose **Refresh source** on the space or folder. A page you added on its own has no **Refresh source**: add it again with **Add sources**, or refresh the space or folder that contains it. After processing finishes, re-run the review. See [Update a review when sources change](https://docs.clearly-ai.com/docs/reviews#update-a-review-when-sources-change).

## Related [#related]

* [Jira](https://docs.clearly-ai.com/docs/integrations/issue-trackers/jira) — Connect Clearly AI to Jira
* [Integrations](https://docs.clearly-ai.com/docs/integrations) — Auth patterns and credential scope