Notion database pages: how to pass a file to a "File & media" property

GM to you all!

I built a workflow that replicates a Notion database from one place to another, including passing files that were uploaded in a “File & media” property (I use n8n for that since Notion native automations cannot handle Files).

In n8n, I retrieve the uploaded file path in the form of a https://prod-files-secure.s3.us-west-2.amazonaws.com/…’ URL (Notion CDN’s domain).
I send that same URL to my second database in a similar “File & media” field.

It used to work fine until yesterday, when Notion started sending back the error below
It could have to do with n8n grabbing files with `type: “file”`or `type: “file_upload”…

I reached out to Notion support as well but they couldn’t help
Hopefully someone here can help me figure this out!

Thanks a ton

Bad request - please check your parameters [item 0]
cV^X value at index 0 contains invalid url. A file with type external cannot contain a Notion hosted file url. Use type file.

{ “errorMessage”: “Bad request - please check your parameters [item 0]”,
“errorDescription”: “cV^X value at index 0 contains invalid url. A file with type external cannot contain a Notion hosted file url. Use type file.”,
“errorDetails”: {
“rawErrorMessage”: [
“400 - {"object":"error","status":400,"code":"validation_error","message":"cV^X value at index 0 contains invalid url. A file with type external cannot contain a Notion hosted file url. Use type file.","request_id":"2b616ee3-3d92-4ef4-9a70-dcda202318d0"}”
],
“httpCode”: “400”
},
“n8nDetails”: {
“nodeType”: “n8n-nodes-base.notion”,
“nodeVersion”: 2.2,
“resource”: “databasePage”,
“operation”: “update”,
“n8nVersion”: “1.117.0 (Self Hosted)”,

Notion changed their API validation - you can’t pass Notion-hosted URLs as external files anymore. The n8n Notion node only supports external URLs, so here are your options:

  1. Re-host approach: Download file from Notion CDN, Upload to external storage (S3, Cloudflare R2, or Ainoflow Files), Pass that stable URL to destination database
  2. Advanced approach: Use HTTP Request node to call Notion’s file upload API directly with type: file (more complex, requires custom API calls, not used this approach not sure if works)

I use free tier Ainoflow Files for 1 option with auto removal, works well for workflow file storage like this.

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.