Error while Reading PDF's from local machine

Describe the problem/error/question

Issue while reading multiple pdf’s from the local machine.
The objective is to read all the files from the directory and upload them to s3. I’m facing challenges while reading itself. Help here is appreciated!

What is the error message (if any)?

Please share your workflow

(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

Information on your n8n setup

  • **n8n version:1.21.1
  • **Database (default: SQLite): sqlite
  • **n8n EXECUTIONS_PROCESS setting (default: own, main): default
  • **Running n8n via (Docker, npm, n8n cloud, desktop app): docker
  • **Operating system: mac

Hi @shyam_shyre, welcome to the community!

I am sorry you’re having trouble. Unfortunately it’s not clear to me which error exactly you are seeing. Going forward, perhaps you can share the error message when posting?

That said, I believe you don’t need the “Read PDF” node (superseded by the Extract From File node in recent n8n versions) based on the use case you have described. This node would extract the file content from a binary file, but this step isn’t required if you’re just looking to upload the file itself to S3 (or any other location really).

Assuming you simply want to upload the PDF files itself to S3, a workflow like this would do the job:

This will read multiple files from your disk, then upload these to AWS S3:

You would not need to build loops in this case as most n8n nodes (including the S3 node here) will perform their action on every item they receive.

Note that I’ve created this example using n8n 1.24.1, so you might need to update your n8n setup before you can import the workflow shared above. The basic idea should still work with older version though.

Hope this helps!