Overview
This node allows users to make custom API calls to the Notion API. It supports all standard HTTP methods (GET, POST, PUT, PATCH, DELETE) and lets users specify the URL path relative to the Notion API base URL (https://api.notion.com). Users can customize headers, query parameters, and request body content, enabling flexible interaction with any Notion API endpoint.
Common scenarios include:
- Accessing or modifying Notion blocks, pages, databases, or users beyond built-in node capabilities.
- Automating workflows that require specific Notion API endpoints or features not yet supported natively.
- Integrating Notion data with other systems by making tailored API requests.
Example use cases:
- Retrieving a specific block's content using a GET request.
- Updating page properties via PATCH.
- Creating new database entries with POST.
- Deleting a block with DELETE.
Properties
| Name | Meaning |
|---|---|
| Method | The HTTP method to use for the request. Options: DELETE, GET, PATCH, POST, PUT |
| URL | The URL path appended to https://api.notion.com to form the full API endpoint URL |
| Notion Version | The version of the Notion API to use (e.g., "2022-06-28") |
| Headers | Additional HTTP headers as a JSON object to send with the request |
| Query Parameters | Query parameters as a JSON object to include in the request URL |
| Body | JSON object containing the request body parameters (used only for POST, PUT, PATCH, DELETE) |
Output
The node outputs an array of items where each item contains a json field holding the parsed JSON response from the Notion API call. The structure of this JSON depends on the specific API endpoint called and the operation performed.
If the API returns binary data (not typical for Notion API), it would be handled accordingly, but this node primarily deals with JSON responses.
Example output structure:
{
"json": {
// Response data from Notion API, varies by endpoint
}
}
Dependencies
- Requires an API key credential for authenticating with the Notion API.
- The node uses the Notion API base URL
https://api.notion.com. - The user must provide a valid Notion API version string.
- No additional external dependencies beyond the Notion API and n8n's HTTP request helper.
Troubleshooting
- Invalid JSON in headers, query parameters, or body: The node expects these inputs as valid JSON strings. Errors will occur if the JSON is malformed. To fix, ensure proper JSON formatting.
- Authentication errors: If the API key is missing or invalid, requests will fail. Verify the API key credential is correctly configured.
- Incorrect URL path: The URL property must be a valid Notion API path starting with
/v1/.... Invalid paths will cause API errors. - Unsupported HTTP method: Only DELETE, GET, PATCH, POST, and PUT are supported.
- API version mismatch: Using an unsupported or incorrect Notion API version may lead to unexpected errors. Use a valid version string like "2022-06-28".
Links and References
- Notion API Documentation
- Notion API Versions
- n8n HTTP Request Node Documentation (for understanding HTTP request options)