Settings
| Setting | What it is |
|---|---|
| ConnectionRequired | The Notion connection the step signs in with. |
| File nameRequired | The file's name, extension included. Pick the file, then paste its base64 below. |
| Content type | text |
| File contentsRequired | Base64 of the file — {{ file("name").base64 }}. At most 20 MB here; a free Notion workspace caps a file at 5 MiB. Uploads over the "Use fixed IP address" lane are unverified; leave that toggle off for this node. |
| Page idRequired | The page the file is attached to. |
| Attach it as | "property" or "block" |
| Property name | The files property's name, exactly as it reads in Notion. |
| Kind of block | "file" or "image" |
Technical details
| Key | Value |
|---|---|
connection | texta connection id from `requires.connections` (provider `notion`) |
name | texta file name, listed in `requires.files` |
contentType | text, by default "application/octet-stream" |
contentBase64 | textits `{{ }}` must give a string |
pageId | textits `{{ }}` must give a string |
attachAs | "property" or "block", by default "property" |
propertyName | texta value from the vendor's own list; used when `attachAs` is "property" |
blockType | "file" or "image", by default "file"used when `attachAs` is "block" |
Output
| Field | Type |
|---|---|
fileUploadIdUpload id | string |
fileUploadUpload | object |
attachedAttached to the page | boolean |
Sample output, and the expression for each field
- attachedtrue
- fileUpload
- object"file_upload"
- fileUploadId"fu0001"
Errors
When a step of this node stops a run, the run page shows a code. Look it up:
Example step
The step as a flow file holds it. Replace each value in <…>.
{
"config": {
"attachAs": "property",
"blockType": "file",
"connection": "<connection id>",
"contentBase64": "<file contents>",
"contentType": "application/octet-stream",
"name": "<file name>",
"pageId": "<page id>",
"propertyName": ""
},
"label": "Upload file",
"type": "notion.uploadFile",
"version": 1
}