{"updatedAt":"2025-11-21T13:20:07.000Z","createdAt":"2025-11-18T16:34:02.729Z","id":"RXd7dswBE1Sbt849","name":"Subworkflow Uplpad files to notion","active":true,"isArchived":false,"nodes":[{"parameters":{"method":"POST","url":"={{ $('create file upload').item.json.upload_url }}","authentication":"predefinedCredentialType","nodeCredentialType":"notionApi","sendHeaders":true,"headerParameters":{"parameters":[{"name":"=notion-version","value":"2025-09-03"},{"name":"Content-Type","value":"application/json"}]},"sendBody":true,"contentType":"multipart-form-data","bodyParameters":{"parameters":[{"parameterType":"formBinaryData","name":"file","inputDataFieldName":"data"}]},"options":{}},"type":"n8n-nodes-base.httpRequest","typeVersion":4.3,"position":[-832,480],"id":"0c0014fb-095a-4001-a70f-fd3662c4945a","name":"upload file1","credentials":{"notionApi":{"id":"j9X7YFSp6m90N06v","name":"Notion account"}}},{"parameters":{"method":"PATCH","url":"=https://api.notion.com/v1/blocks/{{ $('When Executed by Another Workflow').item.json.notion_page_id }}/children","authentication":"predefinedCredentialType","nodeCredentialType":"notionApi","sendHeaders":true,"headerParameters":{"parameters":[{"name":"Notion-Version","value":"2025-09-03"},{"name":"Content-Type","value":"application/json"}]},"sendBody":true,"contentType":"raw","rawContentType":"application/json","body":"={\n\t\t\"children\": [\n\t\t\t{\n\t\t\t\t\"type\": \"{{ $('Read/Write Files from Disk').item.json.fileType }}\",\n\t\t\t\t\"{{ $('Read/Write Files from Disk').item.json.fileType }}\": {\n\t\t\t\t\t\"caption\": [],\n\t\t\t\t\t\"type\": \"file_upload\",\n\t\t\t\t\t\"file_upload\": {\n\t\t\t\t\t\t\"id\": \"{{ $json.id }}\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t]\n\t}","options":{}},"type":"n8n-nodes-base.httpRequest","typeVersion":4.3,"position":[-640,480],"id":"8ebdd4c3-497b-45da-8f99-b3b3eed24734","name":"apend file1","credentials":{"notionApi":{"id":"j9X7YFSp6m90N06v","name":"Notion account"}}},{"parameters":{"fileSelector":"=/mnt/data/PublicFiles/data/{{ $('File Info').item.json.name }}","options":{}},"type":"n8n-nodes-base.readWriteFile","typeVersion":1,"position":[-1024,480],"id":"b490abef-efeb-4e16-a2a1-8c290b17baa4","name":"Read/Write Files from Disk","alwaysOutputData":false},{"parameters":{"method":"POST","url":"https://api.notion.com/v1/file_uploads","authentication":"predefinedCredentialType","nodeCredentialType":"notionApi","sendHeaders":true,"headerParameters":{"parameters":[{"name":"Notion-Version","value":"2025-09-03"},{"name":"Content-Type","value":"application/json"}]},"options":{}},"type":"n8n-nodes-base.httpRequest","typeVersion":4.3,"position":[-1264,480],"id":"adf58f39-d690-4767-88db-5a6966d19e25","name":"create file upload","credentials":{"notionApi":{"id":"j9X7YFSp6m90N06v","name":"Notion account"}}},{"parameters":{"url":"=https://api.notion.com/v1/file_uploads/{{ $('create file upload').item.json.id }}","authentication":"predefinedCredentialType","nodeCredentialType":"notionApi","options":{}},"type":"n8n-nodes-base.httpRequest","typeVersion":4.3,"position":[32,480],"id":"9213116d-a537-4985-be1f-e189905ea4bc","name":"HTTP Request","credentials":{"notionApi":{"id":"j9X7YFSp6m90N06v","name":"Notion account"}}},{"parameters":{"amount":3},"type":"n8n-nodes-base.wait","typeVersion":1.1,"position":[-176,480],"id":"b6307e90-4c03-40ee-84c0-746fea53c6c0","name":"Wait1","webhookId":"38ad52b6-a633-4107-a4f9-384397182b50"},{"parameters":{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict","version":2},"conditions":[{"id":"434d6cfd-a1e8-441d-9a83-6f798b1201a6","leftValue":"={{ $json.status }}","rightValue":"uploaded","operator":{"type":"string","operation":"equals","name":"filter.operator.equals"}}],"combinator":"and"},"options":{}},"type":"n8n-nodes-base.if","typeVersion":2.2,"position":[-480,272],"id":"f1cde665-e72b-4061-a522-34446ed1c2a8","name":"If"},{"parameters":{"filePath":"=/{{ $json.file }}","includeOptions":{"detectMimeType":true}},"type":"n8n-nodes-fs.fileInfo","typeVersion":1,"position":[-1984,496],"id":"f4374f66-ddc1-48ea-9e87-7f028b41c110","name":"File Info"},{"parameters":{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict","version":2},"conditions":[{"id":"b9ad7877-0b19-416a-b86d-c1fe69d00b79","leftValue":"={{ $json.size }}","rightValue":20000520,"operator":{"type":"number","operation":"lt"}}],"combinator":"and"},"options":{}},"type":"n8n-nodes-base.if","typeVersion":2.2,"position":[-1744,496],"id":"564ea6a2-7e86-4bd8-b821-338972169d64","name":"20 mb limit"},{"parameters":{"method":"PATCH","url":"=https://api.notion.com/v1/blocks/{{ $('When Executed by Another Workflow').item.json.notion_page_id }}/children","authentication":"predefinedCredentialType","nodeCredentialType":"notionApi","sendHeaders":true,"headerParameters":{"parameters":[{"name":"Notion-Version","value":"2025-09-03"},{"name":"Content-Type","value":"application/json"}]},"sendBody":true,"contentType":"raw","rawContentType":"application/json","body":"={\n  \"children\": [\n    {\n      \"object\": \"block\",\n      \"type\": \"{{ $json.mimeType.split('/')[0] }}\",\n      \"{{ $json.mimeType.split('/')[0] }}\": {\n        \"type\": \"external\",\n        \"external\": {\n          \"url\": \"https://min.velvetcld.gleeze.com/data/{{ $('File Info').item.json.name }}\"\n        }\n      }\n    }\n  ]\n}\n","options":{}},"type":"n8n-nodes-base.httpRequest","typeVersion":4.3,"position":[-1792,176],"id":"c684b604-01d7-4799-ba61-9063a85a2184","name":"HTTP Request2","credentials":{"notionApi":{"id":"j9X7YFSp6m90N06v","name":"Notion account"}}},{"parameters":{"chatId":"1559527672","text":"=Finished Uploading Journal Entry \"{{ $('When Executed by Another Workflow').item.json.file }}\".\nLink to page: \"{{ $('When Executed by Another Workflow').item.json.Notion_page_url }}\"","additionalFields":{}},"type":"n8n-nodes-base.telegram","typeVersion":1.2,"position":[48,176],"id":"79c6c18a-d2d2-461f-9436-91af32dd783b","name":"Send a text message1","webhookId":"7731a501-311b-4f07-a036-be001fa9fe2b","executeOnce":true,"credentials":{"telegramApi":{"id":"XXv8oPdES5KH3iox","name":"Telegram account"}}},{"parameters":{"workflowInputs":{"values":[{"name":"file"},{"name":"notion_page_id"},{"name":"Notion_page_url"}]}},"type":"n8n-nodes-base.executeWorkflowTrigger","typeVersion":1.1,"position":[-2224,496],"id":"77c0d61b-6470-48e1-89d0-a5d4368e942e","name":"When Executed by Another Workflow"},{"parameters":{"content":"## This sub-workflow accepts filepath and name, a notion page id and a notion page url and uploads the file to the page\n\n](https://docs.n8n.io/workflows/sticky-notes/)","height":352,"width":416},"type":"n8n-nodes-base.stickyNote","position":[-2240,80],"typeVersion":1,"id":"d1c7d573-ff45-42ca-b652-6e858f22d94d","name":"Sticky Note"}],"connections":{"upload file1":{"main":[[{"node":"apend file1","type":"main","index":0}]]},"apend file1":{"main":[[{"node":"Wait1","type":"main","index":0}]]},"Read/Write Files from Disk":{"main":[[{"node":"upload file1","type":"main","index":0}]]},"create file upload":{"main":[[{"node":"Read/Write Files from Disk","type":"main","index":0}]]},"HTTP Request":{"main":[[{"node":"If","type":"main","index":0}]]},"Wait1":{"main":[[{"node":"HTTP Request","type":"main","index":0}]]},"If":{"main":[[{"node":"Send a text message1","type":"main","index":0}],[{"node":"Wait1","type":"main","index":0}]]},"File Info":{"main":[[{"node":"20 mb limit","type":"main","index":0}]]},"20 mb limit":{"main":[[{"node":"create file upload","type":"main","index":0}],[{"node":"HTTP Request2","type":"main","index":0}]]},"HTTP Request2":{"main":[[{"node":"Send a text message1","type":"main","index":0}]]},"When Executed by Another Workflow":{"main":[[{"node":"File Info","type":"main","index":0}]]}},"settings":{"executionOrder":"v1","callerPolicy":"workflowsFromSameOwner","availableInMCP":false,"errorWorkflow":"eT5fOtELZiLLcpbS"},"staticData":null,"meta":null,"pinData":{"When Executed by Another Workflow":[{"json":{"file":"/mnt/data/PublicFiles/data/temp/ספח תעודת זהות דיגיטלי (2).pdf","notion_page_id":"2afdcbfd8835814f9c1ac1947763af49","Notion_page_url":"https://www.notion.so/2-2afdcbfd8835814f9c1ac1947763af49"}}]},"versionId":"9461f2c7-440a-42d5-b456-75b5914c46d6","activeVersionId":"9461f2c7-440a-42d5-b456-75b5914c46d6","triggerCount":0,"shared":[{"updatedAt":"2025-11-18T16:34:02.732Z","createdAt":"2025-11-18T16:34:02.732Z","role":"workflow:owner","workflowId":"RXd7dswBE1Sbt849","projectId":"lh2csO3ZG7MzpN8o"}],"activeVersion":{"updatedAt":"2025-11-27T21:37:34.259Z","createdAt":"2025-11-27T21:37:34.259Z","versionId":"9461f2c7-440a-42d5-b456-75b5914c46d6","workflowId":"RXd7dswBE1Sbt849","nodes":[{"parameters":{"method":"POST","url":"={{ $('create file upload').item.json.upload_url }}","authentication":"predefinedCredentialType","nodeCredentialType":"notionApi","sendHeaders":true,"headerParameters":{"parameters":[{"name":"=notion-version","value":"2025-09-03"},{"name":"Content-Type","value":"application/json"}]},"sendBody":true,"contentType":"multipart-form-data","bodyParameters":{"parameters":[{"parameterType":"formBinaryData","name":"file","inputDataFieldName":"data"}]},"options":{}},"type":"n8n-nodes-base.httpRequest","typeVersion":4.3,"position":[-832,480],"id":"0c0014fb-095a-4001-a70f-fd3662c4945a","name":"upload file1","credentials":{"notionApi":{"id":"j9X7YFSp6m90N06v","name":"Notion account"}}},{"parameters":{"method":"PATCH","url":"=https://api.notion.com/v1/blocks/{{ $('When Executed by Another Workflow').item.json.notion_page_id }}/children","authentication":"predefinedCredentialType","nodeCredentialType":"notionApi","sendHeaders":true,"headerParameters":{"parameters":[{"name":"Notion-Version","value":"2025-09-03"},{"name":"Content-Type","value":"application/json"}]},"sendBody":true,"contentType":"raw","rawContentType":"application/json","body":"={\n\t\t\"children\": [\n\t\t\t{\n\t\t\t\t\"type\": \"{{ $('Read/Write Files from Disk').item.json.fileType }}\",\n\t\t\t\t\"{{ $('Read/Write Files from Disk').item.json.fileType }}\": {\n\t\t\t\t\t\"caption\": [],\n\t\t\t\t\t\"type\": \"file_upload\",\n\t\t\t\t\t\"file_upload\": {\n\t\t\t\t\t\t\"id\": \"{{ $json.id }}\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t]\n\t}","options":{}},"type":"n8n-nodes-base.httpRequest","typeVersion":4.3,"position":[-640,480],"id":"8ebdd4c3-497b-45da-8f99-b3b3eed24734","name":"apend file1","credentials":{"notionApi":{"id":"j9X7YFSp6m90N06v","name":"Notion account"}}},{"parameters":{"fileSelector":"=/mnt/data/PublicFiles/data/{{ $('File Info').item.json.name }}","options":{}},"type":"n8n-nodes-base.readWriteFile","typeVersion":1,"position":[-1024,480],"id":"b490abef-efeb-4e16-a2a1-8c290b17baa4","name":"Read/Write Files from Disk","alwaysOutputData":false},{"parameters":{"method":"POST","url":"https://api.notion.com/v1/file_uploads","authentication":"predefinedCredentialType","nodeCredentialType":"notionApi","sendHeaders":true,"headerParameters":{"parameters":[{"name":"Notion-Version","value":"2025-09-03"},{"name":"Content-Type","value":"application/json"}]},"options":{}},"type":"n8n-nodes-base.httpRequest","typeVersion":4.3,"position":[-1264,480],"id":"adf58f39-d690-4767-88db-5a6966d19e25","name":"create file upload","credentials":{"notionApi":{"id":"j9X7YFSp6m90N06v","name":"Notion account"}}},{"parameters":{"url":"=https://api.notion.com/v1/file_uploads/{{ $('create file upload').item.json.id }}","authentication":"predefinedCredentialType","nodeCredentialType":"notionApi","options":{}},"type":"n8n-nodes-base.httpRequest","typeVersion":4.3,"position":[32,480],"id":"9213116d-a537-4985-be1f-e189905ea4bc","name":"HTTP Request","credentials":{"notionApi":{"id":"j9X7YFSp6m90N06v","name":"Notion account"}}},{"parameters":{"amount":3},"type":"n8n-nodes-base.wait","typeVersion":1.1,"position":[-176,480],"id":"b6307e90-4c03-40ee-84c0-746fea53c6c0","name":"Wait1","webhookId":"38ad52b6-a633-4107-a4f9-384397182b50"},{"parameters":{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict","version":2},"conditions":[{"id":"434d6cfd-a1e8-441d-9a83-6f798b1201a6","leftValue":"={{ $json.status }}","rightValue":"uploaded","operator":{"type":"string","operation":"equals","name":"filter.operator.equals"}}],"combinator":"and"},"options":{}},"type":"n8n-nodes-base.if","typeVersion":2.2,"position":[-480,272],"id":"f1cde665-e72b-4061-a522-34446ed1c2a8","name":"If"},{"parameters":{"filePath":"=/{{ $json.file }}","includeOptions":{"detectMimeType":true}},"type":"n8n-nodes-fs.fileInfo","typeVersion":1,"position":[-1984,496],"id":"f4374f66-ddc1-48ea-9e87-7f028b41c110","name":"File Info"},{"parameters":{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict","version":2},"conditions":[{"id":"b9ad7877-0b19-416a-b86d-c1fe69d00b79","leftValue":"={{ $json.size }}","rightValue":20000520,"operator":{"type":"number","operation":"lt"}}],"combinator":"and"},"options":{}},"type":"n8n-nodes-base.if","typeVersion":2.2,"position":[-1744,496],"id":"564ea6a2-7e86-4bd8-b821-338972169d64","name":"20 mb limit"},{"parameters":{"method":"PATCH","url":"=https://api.notion.com/v1/blocks/{{ $('When Executed by Another Workflow').item.json.notion_page_id }}/children","authentication":"predefinedCredentialType","nodeCredentialType":"notionApi","sendHeaders":true,"headerParameters":{"parameters":[{"name":"Notion-Version","value":"2025-09-03"},{"name":"Content-Type","value":"application/json"}]},"sendBody":true,"contentType":"raw","rawContentType":"application/json","body":"={\n  \"children\": [\n    {\n      \"object\": \"block\",\n      \"type\": \"{{ $json.mimeType.split('/')[0] }}\",\n      \"{{ $json.mimeType.split('/')[0] }}\": {\n        \"type\": \"external\",\n        \"external\": {\n          \"url\": \"https://min.velvetcld.gleeze.com/data/{{ $('File Info').item.json.name }}\"\n        }\n      }\n    }\n  ]\n}\n","options":{}},"type":"n8n-nodes-base.httpRequest","typeVersion":4.3,"position":[-1792,176],"id":"c684b604-01d7-4799-ba61-9063a85a2184","name":"HTTP Request2","credentials":{"notionApi":{"id":"j9X7YFSp6m90N06v","name":"Notion account"}}},{"parameters":{"chatId":"1559527672","text":"=Finished Uploading Journal Entry \"{{ $('When Executed by Another Workflow').item.json.file }}\".\nLink to page: \"{{ $('When Executed by Another Workflow').item.json.Notion_page_url }}\"","additionalFields":{}},"type":"n8n-nodes-base.telegram","typeVersion":1.2,"position":[48,176],"id":"79c6c18a-d2d2-461f-9436-91af32dd783b","name":"Send a text message1","webhookId":"7731a501-311b-4f07-a036-be001fa9fe2b","executeOnce":true,"credentials":{"telegramApi":{"id":"XXv8oPdES5KH3iox","name":"Telegram account"}}},{"parameters":{"workflowInputs":{"values":[{"name":"file"},{"name":"notion_page_id"},{"name":"Notion_page_url"}]}},"type":"n8n-nodes-base.executeWorkflowTrigger","typeVersion":1.1,"position":[-2224,496],"id":"77c0d61b-6470-48e1-89d0-a5d4368e942e","name":"When Executed by Another Workflow"},{"parameters":{"content":"## This sub-workflow accepts filepath and name, a notion page id and a notion page url and uploads the file to the page\n\n](https://docs.n8n.io/workflows/sticky-notes/)","height":352,"width":416},"type":"n8n-nodes-base.stickyNote","position":[-2240,80],"typeVersion":1,"id":"d1c7d573-ff45-42ca-b652-6e858f22d94d","name":"Sticky Note"}],"connections":{"upload file1":{"main":[[{"node":"apend file1","type":"main","index":0}]]},"apend file1":{"main":[[{"node":"Wait1","type":"main","index":0}]]},"Read/Write Files from Disk":{"main":[[{"node":"upload file1","type":"main","index":0}]]},"create file upload":{"main":[[{"node":"Read/Write Files from Disk","type":"main","index":0}]]},"HTTP Request":{"main":[[{"node":"If","type":"main","index":0}]]},"Wait1":{"main":[[{"node":"HTTP Request","type":"main","index":0}]]},"If":{"main":[[{"node":"Send a text message1","type":"main","index":0}],[{"node":"Wait1","type":"main","index":0}]]},"File Info":{"main":[[{"node":"20 mb limit","type":"main","index":0}]]},"20 mb limit":{"main":[[{"node":"create file upload","type":"main","index":0}],[{"node":"HTTP Request2","type":"main","index":0}]]},"HTTP Request2":{"main":[[{"node":"Send a text message1","type":"main","index":0}]]},"When Executed by Another Workflow":{"main":[[{"node":"File Info","type":"main","index":0}]]}},"authors":"system migration","name":null,"description":null,"autosaved":false},"tags":[]}