# Confluence

<details>

<summary>Prerequisite - <strong>Integrating with Confluence</strong></summary>

To index your Knowledge Source, you must integrate your Confluence account with ClearFeed. Begin this on the ClearFeed web app:

* Navigate to `Settings` from the nav-bar, and proceed to the [Integrations](https://web.clearfeed.app/settings/integrations) tab.
* Within the list of available integrations, locate and select **Confluence.**
* Click the `Connect` button to open the input modal.
* Provide the following details:
  * **Confluence email** of the user generating the access key
  * **Select the Token Type:**
    * **Classic: API Key / Personal Access Token** (PAT) for the Confluence account
    * **Scoped:** The token must include the following scopes which are required to access spaces and pages for KS indexing.
      * **read:space:confluence**
      * **read:page:confluence**

{% hint style="info" %}
**Note:** ClearFeed will only read the pages/spaces you select when creating a Knowledge Source. We do not index all Confluence data by default.
{% endhint %}

* Upon entering these details, click the `Connect` button within the modal.
* Successful integration redirects you back to ClearFeed's web app, where a confirmation message is displayed.

<figure><img src="https://3455705434-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FE2O2wTaNovd6fXpEuLKz%2Fuploads%2Fs8A9MCYmmbghGlDYeGMR%2Fimage.png?alt=media&#x26;token=e711677b-7c80-4fac-b9e5-7770b07cfa40" alt="" width="434"><figcaption><p>Integrate ClearFeed with Confluence</p></figcaption></figure>

</details>

### **Indexing a Confluence Knowledge Source**

With the integration complete, you can now index your Knowledge Source:

<figure><img src="https://3455705434-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FE2O2wTaNovd6fXpEuLKz%2Fuploads%2Fgit-blob-fa44990a9a82b2f7f87157084d03809758f1d3e2%2FAdding%20a%20Confluence%20KS.gif?alt=media" alt="" width="563"><figcaption><p>Indexing a Confluence Knowledge Source</p></figcaption></figure>

**Step 1**: **Add your first Knowledge Source**

* From the left navigation bar on the ClearFeed WebApp, go to **AI >** [**Knowledge Sources**](https://web.clearfeed.app/knowledge-sources)**.**
* Hover over the "Add Knowledge Source" dropdown at the top right corner to select `Confluence`.
* A side drawer will appear, prompting you to provide specific details:
  * **Name:** Assign a title for the Knowledge Source to be displayed on ClearFeed.
  * **Tags:** Use tags to categorize and structure each Knowledge Source. Customize these based on your needs.
  * **Spaces:** Choose the [Confluence spaces](https://support.atlassian.com/confluence-cloud/docs/use-spaces-to-organize-your-work/) you'd like to index. The options include:
    * Indexing all spaces.
    * Indexing specific spaces.

      <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>We currently support creating Knowledge Bases from below categories of Confluence spaces:</p><ul><li>Global</li><li>Knowledge Base</li><li>Collaboration</li></ul></div>
  * **Index pages where URL:** To index specific URLs from the selected Spaces, click "Add Condition" to filter them. You can use conditions like **"Starts with"**, **"Does not start with"**, **"Contains"**, and **"Does not contain"**.\
    If you want to index all URLs in the selected Spaces, you can skip this step.
  * **Auto Reindex Regularly:** When enabled, the particular knowledge source will reindex once every 24 hours.
  * After saving your addition, the Knowledge Source will either start indexing immediately (reflected by an **In Progress** status) or will be picked soon (reflected with an **Initiated** status). Get more details on Managing Knowledge Sources [here](https://docs.clearfeed.ai/clearfeed-help-center/clearfeed-ai/knowledge-sources/managing-knowledge-sources).
* **Reindexing Confluence Docs -** To reindex Confluence documents, manually reindex the knowledge source by clicking the "Reindex" button next to it.

  <figure><img src="https://3455705434-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FE2O2wTaNovd6fXpEuLKz%2Fuploads%2Fgit-blob-654d615f020c991b6b0750a7ce300f5d93bee166%2FScreenshot%202024-06-07%20at%201.26.54%20AM%20(3).png?alt=media" alt=""><figcaption><p><strong>Reindexing Confluence Docs</strong></p></figcaption></figure>

### Using AI Agents

Once you've configured the knowledge sources, learn how to build and use AI Agents

{% content-ref url="../../ai-agents/build-ai-agents" %}
[build-ai-agents](https://docs.clearfeed.ai/clearfeed-help-center/clearfeed-ai/ai-agents/build-ai-agents)
{% endcontent-ref %}

{% content-ref url="../../ai-agents/use-ai-agents" %}
[use-ai-agents](https://docs.clearfeed.ai/clearfeed-help-center/clearfeed-ai/ai-agents/use-ai-agents)
{% endcontent-ref %}

### **Manage Knowledge Sources**

Once the status of the knowledge source has been indexed, learn more on how to manage the knowledge source below.

{% content-ref url="../managing-knowledge-sources" %}
[managing-knowledge-sources](https://docs.clearfeed.ai/clearfeed-help-center/clearfeed-ai/knowledge-sources/managing-knowledge-sources)
{% endcontent-ref %}
