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

# Third-Party Integrations

## Notion Integration

Notion OAuth only supports HTTPS, so local deployments must use internal integration.

### Configure environment variables

Set in `.env`:

```
NOTION_INTEGRATION_TYPE=internal
NOTION_INTERNAL_SECRET=your_internal_secret_here
```

For public integration (HTTPS only):

```
NOTION_INTEGRATION_TYPE=public
NOTION_CLIENT_SECRET=oauth_client_secret
NOTION_CLIENT_ID=oauth_client_id
```

Get credentials from [Notion Integrations](https://www.notion.so/my-integrations).

## Text-to-Speech (TTS)

### FFmpeg not installed error

OpenAI TTS requires FFmpeg for audio stream segmentation.

**macOS**:

```bash theme={null}
brew install ffmpeg
```

**Ubuntu**:

```bash theme={null}
sudo apt-get update
sudo apt-get install ffmpeg
```

**CentOS**:

```bash theme={null}
sudo yum install epel-release
sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
sudo yum update
sudo yum install ffmpeg ffmpeg-devel
```

**Windows**:

1. Download from [FFmpeg website](https://ffmpeg.org/download.html)
2. Extract and move to `C:\Program Files\`
3. Add FFmpeg bin directory to system PATH
4. Verify: `ffmpeg -version`

## Model Tokenizers

### Can't load tokenizer for 'gpt2'

Error:

```
Can't load tokenizer for 'gpt2'. If you were trying to load it from 'https://huggingface.co/models'...
```

Configure Hugging Face mirror or proxy in environment variables. See [environment documentation](https://docs.dify.ai/en/self-host/configuration/environments) for details.

## Security Policies

### Content Security Policy (CSP)

Enable CSP to reduce XSS attacks.

In `.env`:

```
CSP_WHITELIST=https://api.example.com,https://cdn.example.com
```

Add all domains used by your application (APIs, CDNs, analytics, etc.).

See [MDN CSP documentation](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) for more information.

## Application Templates

### Custom templates

Currently not supported in community edition. Default templates are provided by Dify for reference only.

Cloud version users can:

* Add applications to workspace
* Customize and save as personal applications

For enterprise custom templates, contact: [business@dify.ai](mailto:business@dify.ai)
