Inject


The Inject node triggers a flow manually or by intervals using a custom msg or CSV file, which is used for debugging or function expansions.

Node Type

Input.

Input and Output Ability

This node does not have an entry point and has 1 exit point. The output is JSON.

Node Properties

../../_images/inject.png


Name

The name for this node.


Msg Data Format

The format used to trigger the flow, currently supports JSON and File.

  • JSON

    Msg Payload

    The custom msg used for triggering the flow. The msg will be displayed in the msg of the output msg.


  • File

    File (.csv)

    The CSV file used for triggering the flow. The maximum file size is 16M. Click the Upload icon upload to upload the file, or click the Download icon download to download the file that has been uploaded. The information of the file will be displayed in the metadata of the output msg, and can be used by the next node using the expression ${metadata.files}.


Recurrence

Determine the trigger frequency of the flow. The options are as per the below.

  • None: Trigger the flow manually. After the flow is published and running, you can manually trigger the flow by clicking the Execute button below.

  • Interval: Automatically trigger the flow for the specified intervals (minutes/hours) within the specified time period (minutes/hours/days). The timing will start after you publish the flow. For example, if set to trigger every 10 minutes ending in 1 day, the flow will trigger every 10 minutes from the time it is published until 1 day later.


Description

The description for this node.

Limitations

  • The format used to trigger the flow only supports JSON and CSV file.

  • Maximum CSV file size: 16M

  • Maximum number of records in mapping file: 150,000

Samples

Input Sample

This node does not receive any input msg.

Output Sample

JSON

The output msg is the custom msg given in Msg Payload.


{
  "MetaData": {},
  "Body": [
    {
      "externalId": "externalId",
      "timestamp": 24214324324,
      "measurepoints": {
        "speed": 32,
        "heat": 40
      }
    }
  ]
}

File

The output msg is the information of the file, contained in the metadata. The File node or the CSV node can be used subsequently to obtain the contents of the file.

{
  "MetaData": {
    "files": "[\"/tmp/CSV File.csv1713481347581904.inject\"]"
  },
  "Body": {}
}