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

# External Data Sources

> Ingest data from databases, SaaS tools, and file storage into Cognee Cloud

Cognee Cloud can ingest data from external databases, SaaS applications, and file storage systems. Connectors are built on [dlt (data load tool)](https://dlthub.com/) and the Cognee Python SDK.

## Databases

Connect to relational databases using a connection string. Cognee extracts table data and processes it into the knowledge graph.

```python theme={null}
import cognee

await cognee.serve()  # Connect to Cognee Cloud

# PostgreSQL
await cognee.add(
    "postgresql://user:pass@host:5432/mydb",
    dataset_name="postgres_data"
)
await cognee.cognify(datasets=["postgres_data"])
```

Supported databases:

| Database   | Connection string format                 |
| ---------- | ---------------------------------------- |
| PostgreSQL | `postgresql://user:pass@host:5432/db`    |
| MySQL      | `mysql+pymysql://user:pass@host:3306/db` |
| SQLite     | `sqlite:///path/to/database.db`          |
| SQL Server | `mssql://user:pass@host:1433/db`         |

## SaaS applications

Ingest data from SaaS tools using dlt source connectors. Install the relevant dlt extra and pass the source to `cognee.add()`.

<AccordionGroup>
  <Accordion title="Slack">
    ```bash theme={null}
    pip install "dlt[slack]"
    ```

    ```python theme={null}
    from dlt.sources.slack import slack_source

    source = slack_source(
        selected_channels=["general", "engineering"],
        start_date=datetime(2025, 1, 1),
    )
    await cognee.add(source, dataset_name="slack_data")
    ```

    Extracts: channels, messages, users, threads.
  </Accordion>

  <Accordion title="Notion">
    ```bash theme={null}
    pip install "dlt[notion]"
    ```

    ```python theme={null}
    from dlt.sources.notion import notion_databases

    source = notion_databases()
    await cognee.add(source, dataset_name="notion_data")
    ```

    Extracts: databases, pages, properties.
  </Accordion>

  <Accordion title="GitHub">
    ```bash theme={null}
    pip install "dlt[github]"
    ```

    ```python theme={null}
    from dlt.sources.github import github_reactions

    source = github_reactions("your-org", "your-repo")
    await cognee.add(source, dataset_name="github_data")
    ```

    Extracts: issues, pull requests, comments, reactions.
  </Accordion>

  <Accordion title="HubSpot">
    ```bash theme={null}
    pip install "dlt[hubspot]"
    ```

    ```python theme={null}
    from dlt.sources.hubspot import hubspot

    source = hubspot()
    await cognee.add(source, dataset_name="hubspot_data")
    ```

    Extracts: contacts, companies, deals, tickets.
  </Accordion>

  <Accordion title="Google Sheets">
    ```bash theme={null}
    pip install "dlt[google_sheets]"
    ```

    ```python theme={null}
    from dlt.sources.google_sheets import google_spreadsheet

    source = google_spreadsheet(
        spreadsheet_url="https://docs.google.com/spreadsheets/d/...",
    )
    await cognee.add(source, dataset_name="sheets_data")
    ```

    Extracts: rows and columns from specified sheets.
  </Accordion>
</AccordionGroup>

For more connectors, see the [dlt integration guide](/integrations/dlt-integration) and the [dlt source catalog](https://dlthub.com/docs/dlt-ecosystem/verified-sources/).

## File storage

Upload files directly from cloud storage services using the Cognee SDK or the [Data Ingestion API](/cognee-cloud/functionality/data-ingestion).

For S3 bucket integration, see [S3 Storage](/guides/s3-storage).

<Info>
  All dlt sources work with both local Cognee and Cognee Cloud. When connected via `cognee.serve()`, data flows to your cloud tenant automatically.
</Info>
