Skip to content

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

  1. The NotionPageReader uses your token to fetch and parse content from Notion.
  2. Each page is stored as a document in memory.
  3. VectorStoreIndex is built from the content for semantic retrieval.
  4. 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:

  1. Share your Notion pages with the integration tied to your token.
  2. Fill out the tool configuration:

  3. Name: "Strategy Guide"

  4. Description: "Provides answers from quarterly planning documents in Notion."
  5. Notion Page IDs: ["e3cde1f5d0b742abacda7c2b6e0b3d77"]
  6. Ask your agent:

  7. β€œWhat are our goals for Q1?”

  8. β€œSummarize our top OKRs from the planning doc.”