Skip to main content
The @guildai-services/guildai~notion package gives your agents access to Notion pages, databases, and blocks through Guild’s Notion integration.

Authentication

  • Type: OAuth 2.0
  • Token management: Refreshed automatically

Setup

1

Open Credentials

Go to Credentials in Guild.
2

Connect Notion

Click Notion and authorize Guild in your Notion workspace.
3

Select pages

Choose which pages and databases to share with Guild.

Usage

import { notionTools } from "@guildai-services/guildai~notion"
import { llmAgent } from "@guildai/agents-sdk"

export default llmAgent({
  description: "An agent that reads and writes Notion pages",
  tools: { ...notionTools },
})

Selecting specific tools

Tools are named with the notion_ prefix. Use pick() to include only what your agent needs.
import { notionTools } from "@guildai-services/guildai~notion"
import { llmAgent, pick } from "@guildai/agents-sdk"

export default llmAgent({
  description: "An agent that manages a Notion database",
  tools: {
    ...pick(notionTools, [
      "notion_databases_query",
      "notion_pages_create",
      "notion_pages_update",
      "notion_blocks_children_list",
    ]),
  },
})