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

# Confluence

To integrate with confluence, you need to **create an Atlassian application** that will act as a bridge between Zylon ↔ Confluence and **configure Zylon** to use the brand new Atlassian application

## Create an Atlassian app

First you need an atlassian account that will be the owner of the application. We recommend to use a non personal account. This account does not need to have access to any Space as it will serve as a bridge between Zylon and Confluence.

1. Go to [https://developer.atlassian.com/console/myapps/](https://developer.atlassian.com/console/myapps/)

   Click `Create` → `OAuth 2.0 integration`

<img src="https://mintcdn.com/zylon/AAEt1MHLqi0nuOjf/images/operator-manual/knowledge-base/confluence-images/image.png?fit=max&auto=format&n=AAEt1MHLqi0nuOjf&q=85&s=d8e7bc34830bce4e5a0f525b5521e7dd" alt="image.png" width="2988" height="856" data-path="images/operator-manual/knowledge-base/confluence-images/image.png" />

1. Provide a meaningful name for the Application.

<img src="https://mintcdn.com/zylon/F67a_ybxGCNUaYMH/images/operator-manual/knowledge-base/confluence-images/image_1.png?fit=max&auto=format&n=F67a_ybxGCNUaYMH&q=85&s=71d5a51b6cab6a96ca50c08ea9d43705" alt="image.png" width="2950" height="1312" data-path="images/operator-manual/knowledge-base/confluence-images/image_1.png" />

1. On distribution:
   * In the left menu navigate to `Distribution`
   * Click on `Edit`

<img src="https://mintcdn.com/zylon/F67a_ybxGCNUaYMH/images/operator-manual/knowledge-base/confluence-images/image_2.png?fit=max&auto=format&n=F67a_ybxGCNUaYMH&q=85&s=41d4159241043ba0a1672c72931e11d1" alt="image.png" width="2972" height="1396" data-path="images/operator-manual/knowledge-base/confluence-images/image_2.png" />

1. On distribution status:

* Select the `Sharing` checkbox.
* Enter a vendor name or choose the option `Use your own name`.
* If you have a privacy policy, provide the link to it. If not, use the default link: [`https://example.com/privacy`](https://example.com/privacy), which is intended for internal use.
* For the question "Does your app store personal data?", select `No`

<img src="https://mintcdn.com/zylon/F67a_ybxGCNUaYMH/images/operator-manual/knowledge-base/confluence-images/image_3.png?fit=max&auto=format&n=F67a_ybxGCNUaYMH&q=85&s=c7b3d0aa17b0c3dbc1a1b174b032537b" alt="image.png" width="2976" height="1536" data-path="images/operator-manual/knowledge-base/confluence-images/image_3.png" />

1. On permissions:

* In the left menu, navigate to **`Permissions`**.
* Click **`Add`** for **`Confluence API`**.
* The page refreshes automatically, and a new **`Configure`** button should appear. If it does not, refresh the page manually.
* Click **`Configure`**.

<img src="https://mintcdn.com/zylon/F67a_ybxGCNUaYMH/images/operator-manual/knowledge-base/confluence-images/image_4.png?fit=max&auto=format&n=F67a_ybxGCNUaYMH&q=85&s=fae32262ea8b0f2b591bfa257f64b35a" alt="image.png" width="2908" height="1446" data-path="images/operator-manual/knowledge-base/confluence-images/image_4.png" />

<img src="https://mintcdn.com/zylon/F67a_ybxGCNUaYMH/images/operator-manual/knowledge-base/confluence-images/image_5.png?fit=max&auto=format&n=F67a_ybxGCNUaYMH&q=85&s=e8f5b82b5dd640c7c762ccaa2639685f" alt="image.png" width="2952" height="1426" data-path="images/operator-manual/knowledge-base/confluence-images/image_5.png" />

1. Click `Granual scopes` and then on `Edit scopes`

<img src="https://mintcdn.com/zylon/F67a_ybxGCNUaYMH/images/operator-manual/knowledge-base/confluence-images/image_6.png?fit=max&auto=format&n=F67a_ybxGCNUaYMH&q=85&s=b7a2cf2e1027f7921104e79ab05a03a6" alt="image.png" width="2930" height="1500" data-path="images/operator-manual/knowledge-base/confluence-images/image_6.png" />

1. Add one by one the following permissions. You can search them pasting the values into the field with a magnifying glass.

   There needs to be a total of `10` scopes added that you can review before saving.

```bash theme={null}
        read:content:confluence,
        read:content-details:confluence,
        read:space-details:confluence,
        read:page:confluence,
        read:attachment:confluence,
        read:blogpost:confluence,
        read:custom-content:confluence,
        read:space:confluence,
        read:space.permission:confluence,
        read:folder:confluence,

```

<img src="https://mintcdn.com/zylon/F67a_ybxGCNUaYMH/images/operator-manual/knowledge-base/confluence-images/image_7.png?fit=max&auto=format&n=F67a_ybxGCNUaYMH&q=85&s=74158e3a9247b20f71a9e2a5b2aca41c" alt="image.png" width="1934" height="1120" data-path="images/operator-manual/knowledge-base/confluence-images/image_7.png" />

<img src="https://mintcdn.com/zylon/F67a_ybxGCNUaYMH/images/operator-manual/knowledge-base/confluence-images/image_8.png?fit=max&auto=format&n=F67a_ybxGCNUaYMH&q=85&s=a613d677bc1a9e830d674000414f6dfb" alt="image.png" width="1910" height="1356" data-path="images/operator-manual/knowledge-base/confluence-images/image_8.png" />

1. On authorization:

* In the left menu, navigate to **`Authorization`**.
* Click **`Add`** for **`OAuth 2.0 (3LO)`**.

<img src="https://mintcdn.com/zylon/bIRZmoPdFWuTOEQj/images/operator-manual/knowledge-base/confluence-images/image_9.png?fit=max&auto=format&n=bIRZmoPdFWuTOEQj&q=85&s=e3cce66e826c401a3e0064d2bc8aacd6" alt="image.png" width="3004" height="814" data-path="images/operator-manual/knowledge-base/confluence-images/image_9.png" />

1. In authorization:

* In the **`Callback URL`** field, enter:
  `https://zylon.company.com/api/app/integration/confluence/callback`Replace **`zylon.company.com`** with the hostname where Zylon is installed on your server.
* Click **`Save changes`**.

<img src="https://mintcdn.com/zylon/F67a_ybxGCNUaYMH/images/operator-manual/knowledge-base/confluence-images/image_10.png?fit=max&auto=format&n=F67a_ybxGCNUaYMH&q=85&s=261f42a10455b4d8d83a8ad8775f8bb4" alt="image.png" width="2964" height="982" data-path="images/operator-manual/knowledge-base/confluence-images/image_10.png" />

1. On settings:

* In the left menu, navigate to `Settings`. Copy the two values listed under **`Authentication details`**:
  * Client ID
  * Secret

You will need these values for the next step: [Configure Zylon to use Atlassian Application](https://www.notion.so/Configure-Zylon-to-use-Atlassian-Application-19e00531e9a78026896ae201cb7e2cf3?pvs=21)

<img src="https://mintcdn.com/zylon/F67a_ybxGCNUaYMH/images/operator-manual/knowledge-base/confluence-images/image_11.png?fit=max&auto=format&n=F67a_ybxGCNUaYMH&q=85&s=e7a5f7d477378aba499344fb0a602936" alt="image.png" width="2606" height="1394" data-path="images/operator-manual/knowledge-base/confluence-images/image_11.png" />

## Configure Zylon to use Atlassian Application

With the values we have acquired in [step 10](https://www.notion.so/ARCHIVED-Confluence-integration-doc-19d00531e9a7809baad3f8131f968d12?pvs=21), you need to edit Zylon config file located in `/etc/zylon/zylon-conf.yaml`

<Tip>
  The config file is a `.yaml` file mind indentation, spaces, semicolons, double quotes!
</Tip>

Add the following snippet to the bottom of the file

```bash theme={null}
integration:
  confluence:
    enabled: true
    clientId: ""
    clientSecret: ""
    redirectUri: ""  

```

And fill the properties with the values generated previously:

* clientId → value generated on [step 10](https://www.notion.so/ARCHIVED-Confluence-integration-doc-19d00531e9a7809baad3f8131f968d12?pvs=21)
* clientSecret → value generated on [step 10](https://www.notion.so/ARCHIVED-Confluence-integration-doc-19d00531e9a7809baad3f8131f968d12?pvs=21)
* redirectUri → same value as [step 9](https://www.notion.so/ARCHIVED-Confluence-integration-doc-19d00531e9a7809baad3f8131f968d12?pvs=21)

Save and close `/etc/zylon/zylon-conf.yaml` file

Finally, execute the following command to reset Zylon and update the config

```bash theme={null}
zylon-cli sync
```

You are all set 🎉

## Troubleshooting

### I try to upload files to the knowledge base and Confluence button is greyed out

Clear the browser cache and try again.

### When I click on `Upload files -> From Confluence` the log in is not working

* Check that the `clientId` `secretId` are copy pasted correctly into Zylon config file
* Check that the `Callback URL` is correct in [step 9](https://www.notion.so/ARCHIVED-Confluence-integration-doc-19d00531e9a7809baad3f8131f968d12?pvs=21) and it’s the same as the `redirectUri` in the config file.

### I don’t see any space to import

* Make sure you have logged in into Confluence with an account that has access to spaces.
* Check the permissions required are correct as shown in [step 6](https://www.notion.so/ARCHIVED-Confluence-integration-doc-19d00531e9a7809baad3f8131f968d12?pvs=21)
