Block → Upload Media
AI-generatedOverview
The Notion Upload Media node uploads media files (images or videos) to a specified Notion block. It is useful for automating the process of adding media content to Notion pages or blocks, such as uploading images or videos directly from binary data within a workflow. For example, it can be used to upload a product image to a Notion database entry or add a video clip to a project documentation block.
Use Case Examples
- Uploading an image file stored in binary data to a Notion block by specifying the block ID and binary property name.
- Uploading a video file to a Notion block with a custom file name and forced media type as video.
Properties
| Name | Meaning |
|---|---|
| Block ID | The ID of the Notion block where the media will be uploaded. It can be extracted from the block URL. |
| Input Binary Field | The name of the binary property containing the media file to upload. |
| Media Type | The type of media to upload, which can be auto-detected from the file MIME type, or forced as image or video. |
| Options | Additional options for the upload, such as specifying a custom file name for the uploaded media. |
Output
JSON
success- Indicates if the media upload was successful (true or false).blockId- The ID of the Notion block where the media was uploaded.mediaUrl- The URL of the uploaded media file in Notion.fileName- The file name used for the uploaded media.blockType- The type of media block created (image or video).size- The size of the uploaded media file as a human-readable string.message- A message indicating the result of the upload operation.error- Error message if the upload failed (present only if success is false).
Dependencies
- Requires an API key credential for Notion with upload permissions (referred to as notionUploadMediaApi).
Troubleshooting
- Invalid block ID error: Ensure the block ID is correctly formatted and extracted from the Notion block URL.
- Empty or missing binary data error: Verify that the specified binary property contains valid media data.
- Upload failure due to network or permission issues: Check API credentials and network connectivity.
- Error messages include details about the failure reason, which helps in debugging and correcting input parameters.