Skip to main content
Glama

MCP Notion Upload Server

by goonoo

upload_and_attach_file_to_page

Upload files to Notion and attach them to specific pages, generating temporary download URLs with file metadata for sharing and access.

Instructions

Upload a file to Notion and attach it to a specific page, returning download URL. This function performs the complete workflow: 1. Upload file to Notion 2. Create file block and attach to specified page 3. Extract and return download URL with metadata Args: file_path: Path to the file to upload page_id: Notion page ID to attach the file to (with or without dashes) notion_token: Notion API token for authentication (optional if NOTION_API_TOKEN env var is set) file_name: Optional custom filename (defaults to original filename) caption: Optional caption for the file block Returns: Dictionary containing: - file_upload_id: The uploaded file ID - file_block_id: The created file block ID - download_url: Temporary download URL (expires in 1 hour) - expiry_time: ISO timestamp when download URL expires - filename: Name of the file - content_type: MIME type of the file - file_size: Size of the file in bytes Raises: Exception: If file doesn't exist, exceeds size limit, or API call fails Example: result = await upload_and_attach_file_to_page( "document.pdf", "2785bbc0e5c281f48dfae9a48f53f6a6", notion_token="ntn_xxx" ) download_url = result["download_url"]

Input Schema

NameRequiredDescriptionDefault
captionNo
file_nameNo
file_pathYes
notion_tokenNo
page_idYes

Input Schema (JSON Schema)

{ "properties": { "caption": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Caption" }, "file_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "File Name" }, "file_path": { "title": "File Path", "type": "string" }, "notion_token": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Notion Token" }, "page_id": { "title": "Page Id", "type": "string" } }, "required": [ "file_path", "page_id" ], "type": "object" }

Other Tools from MCP Notion Upload Server

Related Tools

    MCP directory API

    We provide all the information about MCP servers via our MCP API.

    curl -X GET 'https://glama.ai/api/mcp/v1/servers/goonoo/mcp_notion_upload'

    If you have feedback or need assistance with the MCP directory API, please join our Discord server