Connect EMQX Agents to Notion
The Notion connector lets EMQX Agents create, search, read, and update pages, databases, data sources, blocks, comments, and file uploads. Use this connector to build workflows around specifications, knowledge bases, project data, and structured records stored in Notion.
Common Use Cases
- Read a specification before generating or updating an agent.
- Create a database row from an MQTT event or chat decision.
- Update a status property after an automated workflow completes.
- Append an analysis result to an operations page.
Example chat prompt:
Use the product-notion connector to find the Device Operations database and create a row for the repeated disconnect alert. Include the device ID, severity, and current date.Prerequisites
Before adding the connector, prepare:
- A Notion account with access to the required workspace.
- Permission to grant Composio access to the required Notion pages.
- Access to the pages and databases required by the workflow.
Add a Notion Connector
- In the left navigation menu, click Connectors.
- On the Available tab, locate Notion and click Add.
- Enter a descriptive connector name.
- Click Confirm. The Notion authorization flow opens in a dialog.
- If you can access multiple Notion workspaces, select the workspace to connect.
- Review the access requested by Composio. It can view and edit selected pages, create content and comments within selected pages, view comments within selected pages, and view workspace users and their email addresses.
- Click Select pages.
- Select the pages that Composio can access. Use the search box to find a page when needed, and select only the pages required by your workflow.
- Click Allow access.
- Wait for the authorization dialog to close and return to EMQX Agents.
- On the Added tab, verify that the connector status is Authorized.
Supported Tools
Write Content
| Tool | Access | Description |
|---|---|---|
NOTION_APPEND_TEXT_BLOCKS | Write | Appends paragraph, heading, list, or other text blocks to a page or block. |
NOTION_CREATE_COMMENT | Write | Creates a comment on a page or discussion. |
NOTION_CREATE_DATABASE | Write | Creates a Notion database. |
NOTION_CREATE_NOTION_PAGE | Write | Creates a Notion page. |
NOTION_DELETE_BLOCK | Destructive | Deletes a Notion block. |
NOTION_DUPLICATE_PAGE | Write | Duplicates a Notion page. |
NOTION_INSERT_ROW_DATABASE | Write | Inserts a row into a Notion database. |
NOTION_UPDATE_BLOCK | Write | Updates block content. |
NOTION_UPDATE_PAGE | Write | Updates page properties. |
NOTION_UPDATE_ROW_DATABASE | Write | Updates a database row. |
NOTION_UPDATE_SCHEMA_DATABASE | Write | Updates a database schema. |
Read and Query Content
| Tool | Access | Description |
|---|---|---|
NOTION_FETCH_ALL_BLOCK_CONTENTS | Read | Recursively gets all content under a block. |
NOTION_FETCH_BLOCK_CONTENTS | Read | Gets the direct child blocks of a block. |
NOTION_FETCH_COMMENTS | Read | Gets comments for a page or block. |
NOTION_FETCH_DATABASE | Read | Gets database information. |
NOTION_FETCH_ROW | Read | Gets a database row. |
NOTION_GET_ABOUT_USER | Read | Gets information about a Notion user. |
NOTION_GET_PAGE_MARKDOWN | Read | Gets page content in Markdown format. |
NOTION_GET_PAGE_PROPERTY_ACTION | Read | Gets a page property value. |
NOTION_LIST_USERS | Read | Lists users in a Notion workspace. |
NOTION_QUERY_DATA_SOURCE | Read | Queries a Notion data source. |
NOTION_QUERY_DATABASE | Read | Queries database rows. |
NOTION_QUERY_DATABASE_WITH_FILTER | Read | Queries a database with filter conditions. |
NOTION_RETRIEVE_COMMENT | Read | Gets a Notion comment. |
NOTION_RETRIEVE_DATABASE_PROPERTY | Read | Gets database property information. |
NOTION_RETRIEVE_PAGE | Read | Gets page properties and metadata. |
NOTION_SEARCH_NOTION_PAGE | Read | Searches Notion pages and databases. |
File Uploads
| Tool | Access | Description |
|---|---|---|
NOTION_CREATE_FILE_UPLOAD | Write | Creates a Notion file upload task. |
NOTION_LIST_FILE_UPLOADS | Read | Lists file upload records. |
NOTION_RETRIEVE_FILE_UPLOAD | Read | Gets file upload status and information. |
NOTION_SEND_FILE_UPLOAD | Write | Sends file content to a file upload task. |
Important Notice
Page, database, schema, row, and block update tools change Notion content. The block delete tool removes content. Confirm the target page, database, or block before write operations.
Use the Connector in a Chat
- In the chat input area, click the connector icon.
- Select the authorized Notion connector.
- In the prompt, identify the external resource and operation that the agent should use.
- Review the generated agent definition and confirm that it contains only the required tools.
Permissions and Data Access
The connector uses the authorized Notion account and integration permissions. The selected pages, workspace membership, and resource sharing settings determine the pages, databases, and data sources available to the connector. Reauthorize the connector to grant access to additional pages.
Do not include external service credentials or access tokens in the chat prompt or agent instructions.
Limitations
- Notion API rate limits and workspace policies apply.
- Block types and property schemas vary between pages and databases.
- File upload availability and size limits depend on the Notion API.
Troubleshooting
| Symptom | Resolution |
|---|---|
| The connector remains Unauthorized. | Retry authorization, select the intended workspace, select at least one required page, and click Allow access. |
| A tool returns a permission error. | Verify that the authorized account can access the target resource and that its containing page was selected during authorization. Reauthorize the connector to grant access to additional pages. |
| A required tool is unavailable. | Verify that the tool is supported and approved for this connector, then select the connector again in the chat. |
| Requests are rejected intermittently. | Check the external service status, API quota, rate limits, and account plan. |