Twitter node starting before msg.payload is configured

I am using the twitter node. Previously I "hardcoded" the accounts in the "for" field of the Twitter node. That worked.

Now I want to read the accounts from a file, which I do in an function node before calling the Twitter node, yet the twitter node starts before the msg.payload is set, and the twitter node gives an error:
14 Sep 11:43:31 - [error] [twitter in:Twitter] User option selected but no users specified
14 Sep 11:43:31 - [info] Started flows

Note also how the message appears even before the "Started flows" is coming.
I have a msg node that prints the msg.payload, always coming after the twitter node.
How to ensure the msg.payload is set and read by twitter node, before twitter node starts???

I tried runtimeSyncDelivery: true in settings.js but that don't seem to work. Also the twitter node doesn't seem to accept a "refresh" of msg.payload for the "for" field.

14 Sep 11:43:30 - [info] Node-RED version: v1.0.3
14 Sep 11:43:30 - [info] Node.js version: v12.18.3
And twitter node 1.2.0

Best Regards,
Menno Bot

Just to inform I fixed this problem by:

  • Putting the twitter in node on a dedicated flow. This flow has nothing but the twitter node and a link out to the main flow
  • In the main flow, read (GET) the above flow, modify the twitter-in object in the json with the new tags (using function node) and write (PUT) the flow back.

This seem to work ok. Only side effect is that the browser will complain if the flow gets updated whilst you are in developer view.

Best Regards,

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