Integrate with Notion for Data Operations
NotionToolSpec loads and updates documents from Notion via API token, providing load_data, search_data, and append_data functions for use as a Tool in a
Why it matters
Leverage your Notion workspace as a data source and destination within your AI applications. This asset enables seamless interaction with Notion pages and databases for data retrieval and content updates.
Outcomes
What it gets done
Load data from Notion pages and databases by ID.
Search for specific content within your Notion workspace.
Append new content to existing Notion pages or databases.
Utilize Notion data within AI agent workflows.
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/li-tool-tools-notion | bash Capabilities
What this skill does
Pulls structured data fields from unstructured text.
Chunks, embeds, and indexes documents for semantic retrieval.
Writes and executes SQL or NoSQL queries on databases.
Overview
Notion Tool
What it does
NotionToolSpec is a tool that loads and updates documents from Notion. It requires a Notion API token for initialization and provides three functions: `load_data` loads a list of pages or databases by ID, `search_data` searches for matching pages or databases, and `append_data` appends content to the matching page or database.
How it connects
This tool is designed to be used as a way to load data as a Tool in an Agent within LlamaIndex workflows.
Source README
Notion Tool
This tool loads and updates documents from Notion. The user specifies an API token to initialize the NotionToolSpec.
Usage
This tool has more extensive example usage documented in a Jupyter notebook here
Here's an example usage of the NotionToolSpec.
from llama_index.tools.notion import NotionToolSpec
from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.openai import OpenAI
tool_spec = NotionToolSpec()
agent = FunctionAgent(
tools=tool_spec.to_tool_list(),
llm=OpenAI(model="gpt-4.1"),
)
print(await agent.run("Append the heading 'I am legend' to the movies page"))
load_data: Loads a list of page or databases by idsearch_data: Searches for matching pages or databasesappend_data: Appends content to the matching page or database
This loader is designed to be used as a way to load data as a Tool in a Agent.
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.