Unable to extract text from file

Describe the problem/error/question

I am using a node read/write files from disk and giving the file path it’s gives below output but I want file content. Although I can see the file content when i click on “View” button as evident in the screenshot but ame thing i am unable to provide to next step [ { “mimeType”: “text/plain”, “fileType”: “text”, “fileName”: “test_file - Copy - Copy - Copy - Copy.txt”, “fileExtension”: “txt”, “fileSize”: “12 B” } ]

What is the error message (if any)?

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 1.107.4
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): n8n local
  • Operating system:

welcome to :n8n: community @Md_Atif_Shamim,

You can’t pass the file content directly if it’s in binary format from the previous node,
You’ll need to use the Extract from File node → Extract from Text File,
and then pass the output to the LLM node..

I modified your workflow to include that node, here’s an example:


:point_right: If this solves your problem, feel free to mark the reply as the solution :white_check_mark: it’ll help others with same issue, and it also helps me on the leaderboard :folded_hands:t2:

2 Likes

Thanks @mohamed3nan it’s working now.

1 Like

Glad it works @Md_Atif_Shamim , please mark my reply as the solution, thanks

Done.
Let me know if not reflecting

1 Like

Thank, all good, have a nice day

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