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

# Business tools

> Sync your team's knowledge from Notion, Confluence, and Obsidian into your agent context

Give your agent access to the documentation, wikis, and notes your team keeps in business tools. Syncing these lets the agent answer questions from your internal knowledge - business definitions, metric glossaries, runbooks, and onboarding docs.

nao can sync three knowledge sources today:

* [Notion](#notion) - pages and databases
* [Confluence](#confluence) - spaces, pages, and labels
* [Obsidian](#obsidian) - a local vault of markdown notes

Each is configured with its own block in `nao_config.yaml` and pulled in with `nao sync`.

<Warning>
  Never commit credentials to Git. Use `{{ env('VAR') }}` for every secret.
</Warning>

## Notion

Add Notion as a context provider to give your agent access to documentation, wikis, and knowledge bases stored in Notion.

### Adding Notion

**During initialization**, `nao init` prompts for your Notion API key and the page IDs to sync. **Manually**, add a `notion` block to your `nao_config.yaml`:

```yaml theme={null}
notion:
  api_key: {{ env('NOTION_API_KEY') }}
  pages:
    - 0123456789abcdef0123456789abcdef
    - fedcba9876543210fedcba9876543210
```

* **`api_key`** - Your Notion integration API key.
* **`pages`** - List of Notion page IDs to sync. You can find a page ID in the page URL: `https://notion.so/workspace/Page-ID-here`.

### What happens at nao sync

`nao sync` connects to Notion, fetches each configured page, and exports it as markdown under `docs/notion/` in your nao project. Users can then ask questions like "What does our onboarding doc say about X?" and the agent reads from the synced content.

### Databases and embedded views

`nao sync` exports Notion **databases** as markdown tables, both when a database is listed directly in `notion.pages` and when it is embedded inside a synced page.

A database referenced by its plain URL is exported in full. To export a specific **view** instead, include its `?v=<view_id>` in the URL - the export then applies that view's filters, sorts, row order, and visible columns.

```yaml theme={null}
notion:
  api_key: {{ env('NOTION_API_KEY') }}
  pages:
    - https://notion.so/workspace/Metrics-Glossary-0123456789abcdef       # full database
    - https://notion.so/workspace/Roadmap-abcdef0123456789?v=fedcba987654 # one view
```

## Confluence

Add Confluence to give your agent access to the documentation, wikis, and runbooks your team keeps there. Works with both **Confluence Cloud** and **Confluence Data Center/Server**.

### Adding Confluence

**During initialization**, `nao init` prompts for your base URL, deployment flavour, credentials, and what to sync. **Manually**, add a `confluence` block to your `nao_config.yaml`:

```yaml theme={null}
confluence:
  base_url: https://acme.atlassian.net/wiki
  deployment: cloud
  email: {{ env('CONFLUENCE_EMAIL') }}
  api_token: {{ env('CONFLUENCE_API_TOKEN') }}
  spaces:
    - DATA
```

Confluence needs the optional `confluence` extra:

```bash theme={null}
pip install 'nao-core[confluence]'
```

| Field | Description |
| - | - |
| `base_url` | Absolute HTTP(S) URL. `https://acme.atlassian.net/wiki` on Cloud, `https://confluence.acme.com` on Data Center/Server. |
| `deployment` | `cloud` (default) or `server`. |

### Authentication

Credentials differ by deployment.

<Tabs>
  <Tab title="Cloud">
    Cloud uses Basic auth with an Atlassian API token. Both fields are required:

    ```yaml theme={null}
    confluence:
      base_url: https://acme.atlassian.net/wiki
      deployment: cloud
      email: {{ env('CONFLUENCE_EMAIL') }}
      api_token: {{ env('CONFLUENCE_API_TOKEN') }}
      spaces:
        - DATA
    ```
  </Tab>

  <Tab title="Data Center / Server">
    Self-hosted takes either a personal access token (Bearer auth) or a username and password (Basic auth). Supply one or the other:

    ```yaml theme={null}
    confluence:
      base_url: https://confluence.acme.com
      deployment: server
      personal_access_token: {{ env('CONFLUENCE_PAT') }}
      spaces:
        - DATA
    ```

    ```yaml theme={null}
    confluence:
      base_url: https://confluence.acme.com
      deployment: server
      username: {{ env('CONFLUENCE_USERNAME') }}
      password: {{ env('CONFLUENCE_PASSWORD') }}
      spaces:
        - DATA
    ```
  </Tab>
</Tabs>

### Choosing what to sync

Four selectors decide which pages are pulled. They combine, and a page selected twice is only synced once. **At least one of them must be set** - a `confluence` block with none of them fails validation.

| Selector | What it pulls |
| - | - |
| `pages` | Individual pages, given as numeric page IDs or as URLs that carry one. |
| `page_trees` | A page **and all of its descendants**. Use this to take a whole section without listing every child. |
| `labels` | Every page carrying the label. Scope it to one space with `SPACE:label`. |
| `spaces` | A space in full, by its key (`ENG`, `DATA`). |

```yaml theme={null}
confluence:
  base_url: https://acme.atlassian.net/wiki
  deployment: cloud
  email: {{ env('CONFLUENCE_EMAIL') }}
  api_token: {{ env('CONFLUENCE_API_TOKEN') }}
  pages:
    - https://acme.atlassian.net/wiki/spaces/DATA/pages/123456/Metric+Glossary
  page_trees:
    - 789012
  labels:
    - DATA:certified
  spaces:
    - ENG
```

Only **pages** and **blog posts** are synced. Whiteboards, databases, and attachments expose no text through the API and are skipped.

### What happens at nao sync

When you run `nao sync`, nao resolves every selector into a single set of pages, fetches each page's body, converts the rendered HTML to markdown, and writes it under `docs/confluence/` in your nao project. Each file carries YAML frontmatter with the page's `title`, `id`, `space`, `version`, and `url`, so the agent can cite the source page. Files mirror the Confluence page tree.

* **Incremental syncs** - nao records each page's Confluence version. On the next run, a page whose version is unchanged is left alone. Pages that disappear from your selectors are cleaned up, but only after a run that succeeded in full.
* **Images** - Confluence images need the same auth as the API, so each is replaced with an `[image]` placeholder in the exported markdown.
* Files under `docs/confluence/` are **read-only** in the [File Explorer](/nao-agent/chat/admin/file-explorer); edits belong in Confluence itself or in the `confluence` block.

## Obsidian

Add an Obsidian vault as a context provider to give your agent access to the notes and documentation you keep in [Obsidian](https://obsidian.md). Obsidian support is included in the core `nao-core` package and does not require an extra install.

### Adding Obsidian

**During initialization**, `nao init` prompts for the local path to your vault. **Manually**, add an `obsidian` block to your `nao_config.yaml`:

```yaml theme={null}
obsidian:
  path: /Users/you/vaults/my-vault
```

* **`path`** - The local path to your Obsidian vault.

### What happens at nao sync

`nao sync` copies the markdown notes from your vault into `docs/obsidian/` in your nao project, keeping your folder structure and skipping hidden folders such as `.obsidian/` and `.trash/`. The copied markdown becomes part of your agent's context.

**Next Steps**

<CardGroup cols={2}>
  <Card title="Context Configuration" icon="gear" href="/nao-agent/context-builder/configuration">
    Initialize and configure your nao project
  </Card>

  <Card title="Context Providers" icon="plug" href="/nao-agent/context-builder/databases">
    Connect databases and other context sources
  </Card>
</CardGroup>


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