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

# SaaS imports

> Import data from Notion, Airtable, Google Sheets, Obsidian, and Confluence into KiwiFS.

KiwiFS can import data from third-party SaaS platforms, converting records into markdown pages.

## Notion

Import pages from a Notion database.

```bash theme={null}
kiwifs import --from notion \
  --prefix knowledge/ \
  --root ./knowledge
```

| Flag            | Description                           |
| --------------- | ------------------------------------- |
| `--database-id` | Notion database ID (required for MCP) |
| `--prefix`      | Path prefix in KiwiFS                 |
| `--limit`       | Max records to import                 |
| `--dry-run`     | Preview without writing               |

### Setup

1. Create a [Notion integration](https://www.notion.so/my-integrations) and copy the API key.
2. Share your database with the integration.
3. Set the `NOTION_API_KEY` environment variable.

```bash theme={null}
export NOTION_API_KEY="ntn_..."
kiwifs import --from notion --root ./knowledge
```

### MCP usage

```json theme={null}
{
  "tool": "kiwi_import",
  "arguments": {
    "from": "notion",
    "database_id": "abc123...",
    "prefix": "notion-pages/"
  }
}
```

## Airtable

Import records from an Airtable base.

```bash theme={null}
kiwifs import --from airtable \
  --prefix records/ \
  --root ./knowledge
```

| Flag         | Description                          |
| ------------ | ------------------------------------ |
| `--base-id`  | Airtable base ID (required for MCP)  |
| `--table-id` | Airtable table ID (required for MCP) |
| `--prefix`   | Path prefix in KiwiFS                |
| `--limit`    | Max records to import                |

### Setup

1. Create a [personal access token](https://airtable.com/create/tokens) in Airtable.
2. Set the `AIRTABLE_API_KEY` environment variable.

```bash theme={null}
export AIRTABLE_API_KEY="pat..."
kiwifs import --from airtable --root ./knowledge
```

### MCP usage

```json theme={null}
{
  "tool": "kiwi_import",
  "arguments": {
    "from": "airtable",
    "base_id": "app...",
    "table_id": "tbl...",
    "prefix": "airtable/"
  }
}
```

## Google Sheets

Import rows from a Google Sheets spreadsheet.

```bash theme={null}
kiwifs import --from gsheets \
  --spreadsheet-id "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgVE2upms" \
  --sheet "Sheet1" \
  --prefix gsheets/ \
  --root ./knowledge
```

| Flag               | Description                                                                   |
| ------------------ | ----------------------------------------------------------------------------- |
| `--spreadsheet-id` | Google Sheets spreadsheet ID (required)                                       |
| `--sheet`          | Sheet name (defaults to first sheet)                                          |
| `--credentials`    | Path to Google service account JSON (or set `GOOGLE_APPLICATION_CREDENTIALS`) |
| `--id-column`      | Column to use as filename                                                     |
| `--prefix`         | Path prefix in KiwiFS                                                         |

The first row is treated as column headers.

## Obsidian

Import an Obsidian vault into KiwiFS, preserving wiki-links and frontmatter.

```bash theme={null}
kiwifs import --from obsidian \
  --path ~/my-vault \
  --prefix vault/ \
  --root ./knowledge
```

| Flag       | Description                                     |
| ---------- | ----------------------------------------------- |
| `--path`   | Path to the Obsidian vault directory (required) |
| `--prefix` | Path prefix in KiwiFS                           |

<Tip>
  Obsidian's `[[wiki-link]]` syntax is preserved — KiwiFS uses the same link format natively.
</Tip>

## Confluence

Import pages from a Confluence space.

```bash theme={null}
kiwifs import --from confluence \
  --url "https://your-domain.atlassian.net" \
  --prefix confluence/ \
  --root ./knowledge
```

| Flag       | Description                    |
| ---------- | ------------------------------ |
| `--url`    | Confluence base URL (required) |
| `--prefix` | Path prefix in KiwiFS          |
| `--limit`  | Max pages to import            |

<Note>
  Confluence import uses the Confluence REST API. Authenticate via API token set as environment variable or passed through the Airbyte connector for richer sync. See [Airbyte import](/import/airbyte).
</Note>

## Re-import behavior

All SaaS imports are idempotent. KiwiFS uses `_source_id` in frontmatter to track which records have been imported. Re-running an import:

* **Skips** records that haven't changed
* **Updates** records with new field values
* **Creates** new records that weren't imported before

Use `--dry-run` to preview changes before writing:

```bash theme={null}
kiwifs import --from notion --dry-run
```
