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

# Camel.toolkits.notion toolkit

<a id="camel.toolkits.notion_toolkit" />

<a id="camel.toolkits.notion_toolkit.get_plain_text_from_rich_text" />

## get\_plain\_text\_from\_rich\_text

```python theme={"system"}
def get_plain_text_from_rich_text(rich_text: List[dict]):
```

Extracts plain text from a list of rich text elements.

**Parameters:**

* **rich\_text**: A list of dictionaries representing rich text elements. Each dictionary should contain a key named "plain\_text" with the plain text content.

**Returns:**

str: A string containing the combined plain text from all elements,
joined together.

<a id="camel.toolkits.notion_toolkit.get_media_source_text" />

## get\_media\_source\_text

```python theme={"system"}
def get_media_source_text(block: dict):
```

Extracts the source URL and optional caption from a
Notion media block.

**Parameters:**

* **block**: A dictionary representing a Notion media block.

**Returns:**

A string containing the source URL and caption (if available),
separated by a colon.

<a id="camel.toolkits.notion_toolkit.NotionToolkit" />

## NotionToolkit

```python theme={"system"}
class NotionToolkit(BaseToolkit):
```

A toolkit for retrieving information from the user's notion pages.

**Parameters:**

* **notion\_token** (Optional\[str], optional): The notion\_token used to interact with notion APIs. (default: :obj:`None`)
* **notion\_client** (module): The notion module for interacting with the notion APIs.

<a id="camel.toolkits.notion_toolkit.NotionToolkit.__init__" />

### **init**

```python theme={"system"}
def __init__(
    self,
    notion_token: Optional[str] = None,
    timeout: Optional[float] = None
):
```

Initializes the NotionToolkit.

**Parameters:**

* **notion\_token** (Optional\[str], optional): The optional notion\_token used to interact with notion APIs.(default: :obj:`None`)

<a id="camel.toolkits.notion_toolkit.NotionToolkit.list_all_users" />

### list\_all\_users

```python theme={"system"}
def list_all_users(self):
```

**Returns:**

List\[dict]: A list of user objects with type, name, and workspace.

<a id="camel.toolkits.notion_toolkit.NotionToolkit.list_all_pages" />

### list\_all\_pages

```python theme={"system"}
def list_all_pages(self):
```

**Returns:**

List\[dict]: A list of page objects with title and id.

<a id="camel.toolkits.notion_toolkit.NotionToolkit.get_notion_block_text_content" />

### get\_notion\_block\_text\_content

```python theme={"system"}
def get_notion_block_text_content(self, block_id: str):
```

Retrieves the text content of a Notion block.

**Parameters:**

* **block\_id** (str): The ID of the Notion block to retrieve.

**Returns:**

str: The text content of a Notion block, containing all
the sub blocks.

<a id="camel.toolkits.notion_toolkit.NotionToolkit.get_text_from_block" />

### get\_text\_from\_block

```python theme={"system"}
def get_text_from_block(self, block: dict):
```

Extracts plain text from a Notion block based on its type.

**Parameters:**

* **block** (dict): A dictionary representing a Notion block.

**Returns:**

str: A string containing the extracted plain text and block type.

<a id="camel.toolkits.notion_toolkit.NotionToolkit.get_tools" />

### get\_tools

```python theme={"system"}
def get_tools(self):
```

**Returns:**

List\[FunctionTool]: A list of FunctionTool objects
representing the functions in the toolkit.
