Read from binary file - read from text file?

Describe the problem/error/question

Cannot read from text file, always empty output. I think I might be missing something really important here, but whatever I tried I cannot read one line text file.

What is the error message (if any)?

No error message

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

  • **n8n version:Version 0.222.3
  • **Database (default: SQLite):default
  • **n8n EXECUTIONS_PROCESS setting (default: own, main):own
  • **Running n8n via (Docker, npm, n8n cloud, desktop app):npm
  • **Operating system:Ubuntu 22.04

Hey @DanBoyDan,

If you click on view on the input file what does it show?

Silly question - but where exactly?

Hey @DanBoyDan,

In your screenshot on the left it has the below, If you press View there does it show anything?


Yes, when I press View I can see the content of the file.

Perfect, Can you share what the content is so I can create the same file on my local install and give it a go?

^^that is the content^^

Hey @DanBoyDan,

So it looks like your binary source key is FileData if you update your Move Binary Data node to use that and disable Set All Data as there is no JSON data it should work and you will have something like the below.

1 Like

Tried again but seems to not work on my end, here is another try:

Hey @DanBoyDan,

This time you have changed the property name in the Read Binary Files node to data, What ever you have in the property name here is what you need to use for the Source Key value on the Move Binary Data node.

Got it this time. Thanks for your attention.
I have extracted portion of an HTML file, now I need to extract all href values from that HTML, I am about to use regex for that but can you give me a hint which node to use for such kind of regex extraction? And how to add the extracted items to a list?

Hey @DanBoyDan,

You could try the HTML node that has options to extract HTML entities based on selectors as long as the HTML is valid and complete.

Hello @Jon,
Thanks for your response. I tried to use the HTML node, however it only does support selectors as you said, not regex, or at least I don’t see how can I use regex to extract the hrefs from the html source. Can you show an example if you don’t mind?

Hey @DanBoyDan,

Below is a workflow I use to get the hrefs from our integrations page, I have changed it to save the response as a file rather than json but hopefully this helps.

Hey @Jon,

Thanks for your hints and time again.
This is actually my first time building something with N8N and I have some understanding problems as of how some of the nodes behave and work.

I am trying to build a single automation, what it does:

  • goes to website of ElectrumLTC
  • checks if there is new version
  • if there is new version online which is different from the local version then it goes again to the website, scrapes the href values in part of the downloaded HTML, if not - it exits
  • creates new folder with the new version
  • downloads all new version files in that folder
  • reports Job done
  • exit task

With your guidance I managed to go further into the creation and got it this far:

Now I am stuck again, I extracted the href values and now I don’t know how to loop trough the lists of file and download them. Practically I do not know how to process from this point, but I guess I do something wrong again with the last “Item List” node.
I get the hrefs in the last HTML2 node, then I don’t see the list doing something any further for some reason.

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