Read / Write Files from Disk

Describe the problem/error/question: Read / Write files from Disk returns null

What is the error message (if any)? No error message - WOrkflow executes successfully

Please share your workflow

{
“nodes”: [
{
“parameters”: {
“fileSelector”: “C:\RFPFiles\RFPQuestionnaire.pdf”,
“options”: {
“dataPropertyName”: “data”
}
},
“type”: “n8n-nodes-base.readWriteFile”,
“typeVersion”: 1,
“position”: [
-580,
360
],
“id”: “3d9d8d94-9b08-4ce6-9b6b-cf9e6c20a36b”,
“name”: “Read/Write Files from Disk”,
“alwaysOutputData”: true
},
{
“parameters”: {},
“type”: “n8n-nodes-base.manualTrigger”,
“typeVersion”: 1,
“position”: [
-740,
360
],
“id”: “ebceb83d-f737-46fa-aab3-7fdbd7d4c352”,
“name”: “When clicking ‘Test workflow’”
}
],
“connections”: {
“Read/Write Files from Disk”: {
“main”: [

]
},
“When clicking ‘Test workflow’”: {
“main”: [
[
{
“node”: “Read/Write Files from Disk”,
“type”: “main”,
“index”: 0
}
]
]
}
},
“pinData”: {},
“meta”: {
“templateCredsSetupCompleted”: true,
“instanceId”: “d01dcfb6ca9d52fc8a0579bff25d75135970c97d202d6eb815716808a10bbb25”
}
}

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Null - the message returned is item exists, but is empty

Information on your n8n setup

  • **n8n version: Latest
  • **Database (default: SQLite): defaults
  • **n8n EXECUTIONS_PROCESS setting (default: own, main):defaults
  • **Running n8n via (Docker, npm, n8n cloud, desktop app):defaults (desktop app)
  • **Operating system:Windows

how do you run n8n?
If you start n8n in docker, than you can not use the path of windows C:\RFPFiles\RFPQuestionnaire.pdf.
This directory (volume) must be shared with the container. e.g.
docker run -d -p 5678:5678 -v C:\RFPFiles:/data/RFPFiles n8nio/n8n
After that your file should be available in path /data/RFPFiles/RFPQuestionnaire.pdf

where are you storing the read file from? are u writing to disk first? can u share your workflow like this please as we can’t see it,

n8n attach workflow
just white paste after pushing code node.

Thanks guys for responding. Apologies for the late response. running n8n from web - so locally i guess - not from docker - not writing to disk - trying to read a locally stored pdf and will later process it… but the “read/wrte” action always returns a null.

1 Like
1 Like

@Vishal_Krishnamurthy Can u try like this

C:/RFPFiles/RFPQuestionnaire.pdf
or
C:\\RFPFiles\\RFPQuestionnaire.pdf

it might be because how js handles \

Your most welcome too, you could also try place the pdf, into the directory of n8n under binary folder too, might help.