Create Object
Last updated
Last updated
Use a Create Object node in your Flow to create a single Record of the specified Object Type. To configure a Create Object 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.
Provide an optional Name for the node.
By default a Create Object node will be shown with a label of "create object", 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.
Select a Config for the node.
Note
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.
Specify the Input path to the object that contains the details of the Record you want to create.
Use msg., flow., global., or env variable paths, similar to above
Specify the Output msg. object path for the details of the record that was just created, to be returned to, e.g. msg.myCreatedRecordDetails
.
When the Create Object node is included in the path of your flow, it will create a Record and return its details including _metadata, for further use within your flow as desired.