Inject Node

Injects a message into a flow either manually or at regular intervals. The message payload can be a variety of types, including strings, JavaScript objects or the current time (default).

Configuration

name optional
unique name for this node
msg.payload select
select the type of injection to the msg.payload.
msg.topic select
first select the format of what should be added to msg.topic then provide input of what should be added. Default is an empty string.
inject once after select
select if injection should be repeated. i.e. select this option if inject should constantly repeat based on the provided time frame.
repeat
select repeat time frame if desired

Outputs

payload various
The configured payload of the message.
topic string
An optional property that can be configured in the node.
_repeat integer
If Repeat is enabled, this property is automatically added and it specifies the frequency in seconds.

Details

The Inject node can initiate a flow with a specific payload value. The default payload is a timestamp of the current time in millisecs since January 1st, 1970.

The node also supports injecting strings, numbers, booleans, JavaScript objects, or flow/global context values.

By default, the node is triggered manually by clicking on its button within the editor. It can also be set to inject at regular intervals or according to a schedule.

It can also be configured to inject once each time the flows are started.

The maximum Interval that can be specified is about 596 hours / 24 days. However if you are looking at intervals greater than one day you should consider using a scheduler node that can cope with power outages and restarts.

Note: The “Interval between times” and “at a specific time” options use the standard cron system. This means that 20 minutes will be at the next hour, 20 minutes past and 40 minutes past - not in 20 minutes time. If you want every 20 minutes from now - use the “interval” option.

Note: To include a newline in a string you must use a Function node to create the payload.

Last updated on Oct 5, 2022

Newsletter

Subscribe to our newsletter to stay updated and to get notified once the platform officially launches:

By subscribing, you agree with Foretale’s Privacy Policy

© foretale - 2022