Run Action

Use a Run Action node in your Flow to execute an Action, defined for the specified Object Type, on a specific Record of that Object Type. To configure a Run Action node in the Flow Editor, drag it from the Palette to the Workspace canvas, then double-click the node to open and configure its behavior.

  1. Provide an optional Name for the node.

    • By default a Run Action node will be shown with a label of "run action", but the value you provide in the Name field will replace it in the Flow Editor UI making your flow easier to read and understand.

  2. Select a Config for the node.

    • Note

  3. Select a Type Id for the node, a value specified using one of several options.

    • type - choose this option for a dropdown that includes the Display Names of the Object Types you have created in your Contextual tenant. If the dropdown appears empty for you, be sure that your Flow has been initialized with a Config, after which the dropdown will be kept in sync with your tenant.

    • string - choose the string option, and type in a string for the Object Type ID that you want to search, using type is recommended instead of string

    • msg. - choose this option to specify a path in the msg. object that contains the Object Type ID value that you want to perform the search against, e.g. msg.payload.thePropertyWithTheObjectTypeId, msg.event.thePropertyWithTheObjectTypeId, or msg.customObject.thePropertyWithTheObjectTypeId- the msg. object and its content are available to nodes within any flow in the same Flow Editor window (i.e., across multiple tabs in the Node-RED Flow Editor interface).

    • flow. - values in the flow. scope can be set and retrieved by nodes that exist within the same tab of your flow in the Contextual Flow Editor.

    • global. - values in the .global scope are shared, and can be set and retrieved, by nodes across any tab of your flow in the Contextual Flow Editor.

    • env variable - Environmental Variables are a feature of Agents in Contextual. Any Environmental Variables that you define as Label/Value pairs for an Agent that is sending events to a Flow, will be available to the Flow, simply type the Label of the Evironmental Variable from which you want to use the value.

  4. Specify the path to the property that contains the Object Id for which you want to execute the Action.

    • Use string, msg., flow., global., or env variable paths, similar to above

  5. Specify the path to the property that contains the Action Id that you want to execute. The Action Id can be found by inspecting the details of the Object Type Action.

    • Use string, msg., flow., global., or env variable paths, similar to above

  6. Specify the Input path for the object that contains the details of the Record you want to create.

    • Use msg., flow., global., or env variable paths, similar to above

  7. Specify the Output msg. object path for the details of the record to be returned to, e.g. msg.myRetrievedRecordDetails.

When the Run Action node is included in the path of your flow, it will execute an Action on the specified Record if it exists.

Last updated