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

# Connecting Knowledge Sources

> Sync external documentation to your knowledge base

Connect your existing documentation platforms to automatically sync content to Duckie's knowledge base. Changes in the source are reflected in Duckie automatically.

## Supported Sources

| Source           | Content Types           | Sync Frequency       |
| ---------------- | ----------------------- | -------------------- |
| **Notion**       | Pages, databases, wikis | Real-time webhooks   |
| **Confluence**   | Spaces, pages, blogs    | Periodic sync        |
| **Google Drive** | Docs, Sheets, PDFs      | Periodic sync        |
| **Zendesk**      | Help center articles    | Periodic sync        |
| **Intercom**     | Help articles           | Periodic sync        |
| **Slack**        | Channel history         | Periodic sync        |
| **Web/URLs**     | Any public webpage      | On-demand + periodic |

## Connecting a Source

<Steps>
  <Step title="Navigate to Knowledge">
    Go to **Train → Knowledge** and select the **Knowledge Sources** tab.
  </Step>

  <Step title="Click Add Source">
    Click **Add Source** to see available options.

    {/* Screenshot: Add source dialog showing available source types */}
  </Step>

  <Step title="Select Source Type">
    Choose the platform you want to connect.
  </Step>

  <Step title="Authorize Access">
    Complete the OAuth flow or enter API credentials.
  </Step>

  <Step title="Select Content">
    Choose which content to sync:

    * Notion: Select pages or databases
    * Confluence: Select spaces
    * Google Drive: Select folders

    {/* Screenshot: Content selection showing folder/page tree with checkboxes */}
  </Step>

  <Step title="Configure Options">
    Set sync options (if applicable):

    * Include subpages
    * Sync frequency
    * Tag assignment
  </Step>

  <Step title="Start Sync">
    Click **Connect** to begin the initial sync.
  </Step>
</Steps>

## Source-Specific Guides

### Notion

<Steps>
  <Step title="Connect">
    Click **Connect** and authorize Duckie to access your Notion workspace.
  </Step>

  <Step title="Share Pages">
    In Notion, share the pages you want to sync with the Duckie integration.
  </Step>

  <Step title="Select Content">
    Choose pages and databases to include.
  </Step>
</Steps>

**What syncs:**

* Page content and formatting
* Database entries
* Nested subpages (if enabled)

**What doesn't sync:**

* Comments
* Page history
* Private/unshared pages

### Confluence

<Steps>
  <Step title="Connect">
    Click **Connect** and authorize with your Atlassian account.
  </Step>

  <Step title="Select Spaces">
    Choose which Confluence spaces to sync.
  </Step>
</Steps>

**What syncs:**

* Pages and their content
* Attachments (text-based)
* Space hierarchy

### Google Drive

<Steps>
  <Step title="Connect">
    Click **Connect** and authorize with your Google account.
  </Step>

  <Step title="Select Folders">
    Choose folders to sync.
  </Step>
</Steps>

**What syncs:**

* Google Docs (converted to text)
* Google Sheets (converted to text)
* PDFs (text extracted)
* Text files

**What doesn't sync:**

* Images, videos
* Google Slides
* Binary files

### Web/URLs

<Steps>
  <Step title="Add URL">
    Click **Add Source → Web** and enter the URL.
  </Step>

  <Step title="Configure Crawling">
    Choose whether to crawl linked pages:

    * Single page only
    * Include linked pages (same domain)
    * Full site crawl
  </Step>
</Steps>

**What syncs:**

* Page text content
* Linked pages (if enabled)
* Updates on periodic refresh

## Managing Sources

### Viewing Sync Status

{/* Screenshot: Knowledge source card showing sync status, last sync time, article count */}

Each source shows:

* Connection status
* Last sync time
* Number of articles synced
* Any sync errors

### Re-syncing

To manually trigger a sync:

1. Click on the source
2. Click **Sync Now**

### Editing Configuration

To change what content is synced:

1. Click on the source
2. Click **Edit**
3. Modify content selection
4. Save changes

### Disconnecting

To remove a source:

1. Click on the source
2. Click **Disconnect**
3. Confirm removal

<Warning>
  Disconnecting removes all synced content from that source. Agents will no longer have access to this knowledge.
</Warning>

## Sync Settings

### Automatic Sync

Most sources sync automatically:

* **Real-time** — Notion (via webhooks)
* **Hourly** — Most other sources
* **Daily** — Web URLs

### Manual Sync

Trigger immediate sync when you need content updated now.

### Tagging Synced Content

Automatically tag all content from a source:

1. Edit the source configuration
2. Set default tags
3. All synced articles receive these tags

This is useful for organizing by source or restricting agent access.

## Troubleshooting

### Sync Errors

**"Authorization expired"**

* Re-authorize the connection
* Check that you still have access in the source platform

**"Content not found"**

* Verify the selected pages/folders still exist
* Check permissions in the source platform

**"Sync timed out"**

* Large content may take time; wait and retry
* Consider syncing smaller subsets

### Missing Content

**Pages not appearing:**

* Ensure pages are selected in source configuration
* Check that pages are shared/accessible
* Verify no sync errors occurred

**Content out of date:**

* Check last sync time
* Trigger manual sync
* Verify webhooks are working (Notion)

## Next Steps

<CardGroup cols={2}>
  <Card title="Custom Knowledge" icon="file-lines" href="/knowledge/custom-knowledge">
    Add content manually
  </Card>

  <Card title="Knowledge Tags" icon="tags" href="/knowledge/tags">
    Organize your knowledge
  </Card>
</CardGroup>
