Node Red - Write file data into Pac write node

Keep in mind that as your users change the table data, this flow will break in different (and fun) ways.
Also you wont need that delay node if you switch the construction from parallel as you have, to serial like this:

Its never (ever) a good idea to do parallel reads like that with Node-RED as it places a really large sudden load on the controller as it tries to do all those RESTful calls to the controller to get the data.
As the data changes, the RESTful response will change.

This post will help you with a whole bunch of resources:

Note the one comment toward the bottom that exactly replicates your setup…I have found in the past that if you fetch ‘all at once’ (triggering several PAC Read nodes at once), especially when reading tables, you can get connection errors. Daisy chaining from a single Inject node, as Beno shows in his example flow, overcame this problem.

Saving each PAC table into its own file would be another way around this issue.
Don’t forget you can use the time function to create a time stamp directory so the user knows exactly his latest data.

(Simply use your file write node vs the email one).

So, bottom line, you are very close to having things break, before you deploy into production, you really should rearrange it from parallel to serial so you don’t get any surprises down the road.

1 Like