
## Set up Glean

URL: https://docs.atlan.com/apps/connectors/knowledge-management/glean/how-tos/set-up-glean

> Configure the API credentials and datasource in Glean and Atlan required to sync glossary terms.

Before running your first sync, complete the one-time setup tasks in this guide: create a Glean datasource to receive the indexed terms, generate the API credentials needed for both indexing and curated Answers, and save them in Atlan.

## Prerequisites

Before you begin, make sure you have:

- Admin access to the Glean admin console
- Permissions to create API tokens in Glean
- Your Atlan tenant URL (for example, `your-tenant.atlan.com`)
- Admin or **API Token** creation permissions in Atlan

<!-- vale Microsoft.Headings = NO -->

## Create Glean datasource

<!-- vale Microsoft.Headings = YES -->

A Glean datasource is the named container that holds all the documents indexed from Atlan. You create it once and reference it in every sync run.

1. Log in to your Glean admin console.

2. Navigate to **Workspace Settings** > **Custom Apps**.

3. Click **Add datasource** and select **KNOWLEDGE_HUB** as the datasource type.

4. Choose a short, unique internal name using only lowercase letters, digits, and underscores (for example, `atlan_glossary`). Enter this name in Atlan when saving credentials.

5. In the datasource URL pattern field, enter a regex that matches your Atlan tenant URLs:
 ```
 ^https://your-tenant.atlan.com/(assets|glossary)/.*$
 ```
 Replace `your-tenant` with your actual Atlan tenant name.
6. Complete the datasource configuration and save. New datasources start in test mode. You'll promote the datasource to production after validating your first sync.

## Generate Glean API tokens

This connector requires two Glean API tokens: an Indexing token (scope: Indexing) to push glossary terms as searchable documents, and a Client API token (scope: Client API) to manage curated Answers. Both are required, even if curated Answers aren't enabled. To generate each token:

1. In the Glean admin console, navigate to **Workspace Settings** > **API tokens**.

2. Click **Create token**.

3. Select the appropriate scope for the token you're creating.

4. Copy and securely save both tokens. You can't view them again after leaving the page.

## Generate Atlan API key

The connector uses an Atlan API key to read glossary terms. Because the connector only reads data, a low-privilege token is sufficient.

1. In Atlan, go to **Settings** > **API Tokens**.

2. Click **Generate API Token**.

3. Enter a descriptive name, such as `Glean Sync`.

4. Assign the **`Guest`** or **`Data Steward`** persona. The connector only reads glossary term metadata.

5. Click **Save** and copy the generated token.

## Save credentials in Atlan

1. In your Atlan workspace, click **Connectors** in the left sidebar.
 * If you are using the **Old UI (Classic)**, click **New Workflow** in the top navigation.

2. Click **Marketplace**.

3. Search for **Glean** and select it.

4. Click **Install**.

5. Once installation completes, click **Setup Workflow** on the same tile.

5. In the **Credential** step, click **Add credential**.

6. Fill in the credential form:
 - For **Glean Instance URL**, enter your Glean backend hostname without `https://` or a trailing slash. For example: `your-company-be.glean.com`.
 - For **Atlan API Key**, paste the API key you generated in the previous step.
 - For **Glean Indexing API Token**, paste the indexing token.
 - For **Glean Client API Token**, paste the client API token.
 - For **Glean Datasource Name**, enter the datasource name you created earlier (for example, `atlan_glossary`).
7. Click **Save** to store the credential.

Your credentials are now saved.

## Next steps

- [Sync glossary terms to Glean](https://docs.atlan.com/llms/connectors/glean/sync-glean/llms.txt): Configure which terms to sync, whether to enable curated Answers, and run or schedule the workflow.

---
