Notion Agent Tool
π Key Concepts
The Notion Agent Tool enables seamless integration of your Notion workspace with LLM-powered workflows in INTELLITHING. It loads pages by ID, builds a vector index, and allows querying content from those Notion pages using natural language.
This tool is ideal for:
- Surfacing decision-making or planning notes
- Answering contextual queries from documentation
- Creating AI agents that assist with knowledge stored in Notion
π Key Definitions
Term | Definition |
---|---|
Notion Token | A Notion Integration token used to authenticate access to pages. |
Notion Page ID | The unique identifier of a Notion page that you want to index and make searchable. |
Vector Index | A searchable, semantic index of the documents, enabling intelligent query handling. |
QueryEngineTool | A LlamaIndex-powered wrapper that allows the agent to ask and answer questions over the content. |
βοΈ Setup Guide: Using the Notion Agent Tool
To configure the Notion Agent Tool, fill out the fields described below:
1. Name & Description
Field | Purpose | Example |
---|---|---|
name |
Human-readable tool name for the agent | "Team Notes Reader" |
description |
Used by the routing engine to match user queries | "Reads strategy and planning docs in Notion" |
2. Provide Page Access
Field | Description | Example |
---|---|---|
notion_token |
Token from Notion Integration with read access to the relevant pages | secret_abc123... |
notion_page_ids |
List of Notion page IDs to load | ["e3cde1f5d0b742abacda7c2b6e0b3d77"] |
π§ Hint: You can find a Notion page ID by copying the link and extracting the last part of the URL:
https://www.notion.so/My-Page-Name-e3cde1f5d0b742abacda7c2b6e0b3d77
π How It Works
- The
NotionPageReader
uses your token to fetch and parse content from Notion. - Each page is stored as a document in memory.
VectorStoreIndex
is built from the content for semantic retrieval.- A
QueryEngineTool
is created, allowing agents to answer natural language questions grounded in Notion content.
Once connected, your agent can automatically decide when to route questions to Notion, like:
- βWhatβs the Q4 roadmap?β
- βWhoβs responsible for onboarding?β
- βSummarize the meeting notes from last Friday.β
β Best Practices
- Use precise page IDs: Avoid linking entire workspaces or parent pages unless truly needed.
- Keep pages focused: Semantic search works best on well-scoped documents.
- Use the description field to guide the router toward relevant tools.
- Token security: Never hardcode tokens. Use secrets storage or secured UI inputs.
π Example Use Case
To create a tool that helps your AI agent answer questions about internal strategy notes:
- Share your Notion pages with the integration tied to your token.
-
Fill out the tool configuration:
-
Name:
"Strategy Guide"
- Description:
"Provides answers from quarterly planning documents in Notion."
- Notion Page IDs:
["e3cde1f5d0b742abacda7c2b6e0b3d77"]
-
Ask your agent:
-
βWhat are our goals for Q1?β
- βSummarize our top OKRs from the planning doc.β