In that case, the settings.js file is where you should do that. It has a section that lets you set global variables before Node-RED has started its flows. However, it does mean writing code to read the files rather than relying on flows.
The problem with trying to read files in Node-RED is that the process is asynchronous so it is highly likely that other parts of your flow will have started before the read completes even if you put the flow in the 1st tab.
Node-RED runs on Node.js so the setttings.js has access to the
fs and other core Node.js modules. I think that Node-RED itself also makes use of
fs-extra which is an excellent module that enhances some of the core file handling - so you should be able to simply
require that in settings.js otherwise just add
const fs = require('fs') towards the top of settings.js outside of the
module.exports along with any file reading. Then pass along any required data in the
When reading files, obviously, you want to probably use the "sync" versions of file reads so that the process doesn't just carry on regardless before your reads have finished.