Node-RED

App · 11 actions

Work with Node-RED, the flow-based automation tool: call a flow's HTTP endpoint and use its answer, trigger an inject node, read context values, list, back up, add, enable, disable and delete flows, restart them, and check the server. Start a workflow when someone deploys flows.

Actions

ActionWhat it does
Add flowAdd a flow to Node-RED from its export (Export in Node-RED's menu, or Get flow's) and deploy it, as a new tab with new node IDs.
Call flow endpointSend a request to a flow's own HTTP endpoint (an http in node) and get its answer, so a workflow can use logic built in Node-RED.
Delete flowDelete a flow and its nodes from Node-RED and deploy.
Disable flowSwitch a flow off and deploy it, so its nodes stop running until it's enabled again.
Enable flowSwitch a disabled flow back on and deploy it, as the Disabled button in the flow's properties in the editor does.
Get context valueRead a value a flow keeps in Node-RED's context, such as a sensor reading or a counter, from global context or one flow's.
Get flowGet one flow with its nodes, and its export as JSON: keep it as a backup, or add it to another Node-RED with Add flow.
Get server infoGet Node-RED's version, the Node.js it runs on, its memory use and the node modules installed, such as for a weekly check.
List flowsList Node-RED's flows (the editor's tabs), with how many nodes each has, its HTTP endpoints and whether it's enabled; optionally with every flow exported as JSON, for a backup.
Restart flowsStop and start every flow, as Node-RED's Deploy > Restart Flows does, such as after a device reconnects.
Trigger inject nodeRun a flow from one of its inject nodes, as clicking its button in the editor does, with its own payload or one you give.

Add flow

Add a flow to Node-RED from its export (Export in Node-RED's menu, or Get flow's) and deploy it, as a new tab with new node IDs.

Inputs

Flow exportflow_jsontextRequired
The flow as JSON, as Node-RED's Export or Get flow gives it.
Namelabeltext
A name for the new flow. Leave blank for the export's own.
Add it disableddisabledtrue/false
Add the flow switched off, to enable it later.Default: false.

Outputs

config_nodes_reusednumber
Configuration nodes in the export this Node-RED already had, used as they are
disabledtrue/false
True when it was added disabled
idtext
The new flow's ID
labeltext
Its name
node_countnumber
How many nodes it has
Example output
{
  "config_nodes_reused": 0,
  "disabled": false,
  "id": "6d5c4b3a29180f7e",
  "label": "Order checks (copy)",
  "node_count": 5
}

Call flow endpoint

Send a request to a flow's own HTTP endpoint (an http in node) and get its answer, so a workflow can use logic built in Node-RED. Fails when the flow answers with an error status.

Inputs

EndpointpathtextRequired
The URL set in the flow's http in node, such as /orders/check, optionally after its method: POST /orders/check.
Methodmethodtext
The HTTP method. As the endpoint is set up uses the http in node's own.One of: auto (As the endpoint is set up), GET, POST, PUT, PATCH, DELETE. Default: auto.
Bodybodyobject
What to send, as JSON: names and values, such as order: A-1042. Text that isn't JSON is sent as text. The flow gets it in msg.payload.
Queryqueryobject
Names and values to add to the address, such as id: 42. The flow gets them in msg.req.query.
Headersheadersobject
Extra request headers, by name, such as X-Source: Lodol.
Wait up to (seconds)timeout_secondsnumber
How long to wait for the flow to answer. Defaults to 60.From 1 to 300.

Outputs

bodyobject
What the flow answered: read as JSON (an object, a list, a number) when it is JSON, otherwise the text
content_typetext
The answer's content type, such as application/json
headersobject
The answer's headers, by name
methodtext
The method the flow was called with, such as POST
oktrue/false
True when the status is 2xx
status_codenumber
The HTTP status the flow answered with, such as 200
texttext
What the flow answered, as text
urltext
The address called
Example output
{
  "body": {
    "in_stock": true,
    "order": "A-1042",
    "ship_by": "2026-11-12"
  },
  "content_type": "application/json; charset=utf-8",
  "headers": {
    "Content-Type": "application/json; charset=utf-8"
  },
  "method": "POST",
  "ok": true,
  "status_code": 200,
  "text": "{\"order\":\"A-1042\",\"in_stock\":true,\"ship_by\":\"2026-11-12\"}",
  "url": "https://nodered.example.com/orders/check"
}

Delete flow

Delete a flow and its nodes from Node-RED and deploy. Nothing is deleted when it isn't there.

Inputs

FlowflowtextRequired
The flow (a tab in the editor): its name or ID.

Outputs

deletedtrue/false
False when Node-RED had no such flow, so nothing was deleted
idtext
The flow's ID
labeltext
Its name
node_countnumber
How many nodes were deleted with it
Example output
{
  "deleted": true,
  "id": "6d5c4b3a29180f7e",
  "label": "Order checks (copy)",
  "node_count": 5
}

Disable flow

Switch a flow off and deploy it, so its nodes stop running until it's enabled again.

Inputs

FlowflowtextRequired
The flow (a tab in the editor): its name or ID.

Outputs

changedtrue/false
False when the flow was already as asked, so nothing was deployed
disabledtrue/false
True when the flow is disabled
endpointslist
The HTTP endpoints its http in nodes serve, such as POST /orders
idtext
The flow's ID
infotext
The flow's description
inject_nodesnumber
How many inject nodes it has
labeltext
The flow's name, as its tab shows it
node_countnumber
How many nodes it has
Example output
{
  "changed": true,
  "disabled": true,
  "endpoints": [
    "POST /orders/check"
  ],
  "id": "4b1d7e2c9a8f0e36",
  "info": "Answers stock checks for the shop.",
  "inject_nodes": 1,
  "label": "Order checks",
  "node_count": 5
}

Enable flow

Switch a disabled flow back on and deploy it, as the Disabled button in the flow's properties in the editor does.

Inputs

FlowflowtextRequired
The flow (a tab in the editor): its name or ID.

Outputs

changedtrue/false
False when the flow was already as asked, so nothing was deployed
disabledtrue/false
True when the flow is disabled
endpointslist
The HTTP endpoints its http in nodes serve, such as POST /orders
idtext
The flow's ID
infotext
The flow's description
inject_nodesnumber
How many inject nodes it has
labeltext
The flow's name, as its tab shows it
node_countnumber
How many nodes it has
Example output
{
  "changed": true,
  "disabled": false,
  "endpoints": [
    "POST /orders/check"
  ],
  "id": "4b1d7e2c9a8f0e36",
  "info": "Answers stock checks for the shop.",
  "inject_nodes": 1,
  "label": "Order checks",
  "node_count": 5
}

Get context value

Read a value a flow keeps in Node-RED's context, such as a sensor reading or a counter, from global context or one flow's.

Inputs

NamekeytextRequired
The context variable's name, as the flow sets it, such as temperature.
Scopescopetext
Global context, shared by every flow, or one flow's context.One of: global, flow. Default: global.
Flowflowtext
The flow whose context to read, when the scope is Flow.
Context storestoretext
The context store, such as file, when Node-RED has more than one. Leave blank for the default.

Outputs

existstrue/false
False when the variable isn't set
flowtext
The flow's name, for a flow's context
flow_idtext
The flow's ID, for a flow's context
formattext
What Node-RED says it is, such as number, Object or string[12]
keytext
The context variable's name
scopetext
global or flow
shortenedtrue/false
True when Node-RED shortened the value, as it does past 1,000 characters or items
storetext
The context store it was read from, such as memory
texttext
The value as text (JSON for an object or list)
valueobject
The value: a number, text, true or false, an object or a list
Example output
{
  "exists": true,
  "flow": "",
  "flow_id": "",
  "format": "number",
  "key": "boilerTemperature",
  "scope": "global",
  "shortened": false,
  "store": "memory",
  "text": "61.5",
  "value": 61.5
}

Get flow

Get one flow with its nodes, and its export as JSON: keep it as a backup, or add it to another Node-RED with Add flow.

Inputs

FlowflowtextRequired
The flow (a tab in the editor): its name or ID.

Outputs

config_nodeslist
Configuration nodes shared by every flow that the flow's nodes use, such as an MQTT broker
disabledtrue/false
True when the flow is disabled
endpointslist
The HTTP endpoints its http in nodes serve, such as POST /orders
exporttext
The flow as JSON, as Node-RED's Export makes it: keep it as a backup, import it in the editor, or add it again with Add flow
idtext
The flow's ID
infotext
The flow's description
inject_nodesnumber
How many inject nodes it has
labeltext
The flow's name, as its tab shows it
node_countnumber
How many nodes it has
nodeslist
The flow's nodes, as Node-RED stores them: each with its id, type, name and settings
Example output
{
  "config_nodes": [],
  "disabled": false,
  "endpoints": [
    "POST /orders/check"
  ],
  "export": "[{\"id\": \"4b1d7e2c9a8f0e36\", \"type\": \"tab\", \"label\": \"Order checks\"}]",
  "id": "4b1d7e2c9a8f0e36",
  "info": "Answers stock checks for the shop.",
  "inject_nodes": 1,
  "label": "Order checks",
  "node_count": 5,
  "nodes": [
    {
      "id": "1a2b3c4d5e6f7081",
      "method": "post",
      "name": "",
      "type": "http in",
      "url": "/orders/check",
      "wires": [
        [
          "2b3c4d5e6f708192"
        ]
      ],
      "z": "4b1d7e2c9a8f0e36"
    }
  ]
}

Get server info

Get Node-RED's version, the Node.js it runs on, its memory use and the node modules installed, such as for a weekly check.

Inputs

None.

Outputs

containerisedtrue/false
True when it runs in a container, such as Docker
context_storeslist
Its context stores, such as memory or file
flow_countnumber
How many flows it has
flows_runningtrue/false
True while Node-RED's flows are started
http_node_roottext
Where the flows' HTTP endpoints start, such as /
memory_mbnumber
Memory Node-RED uses, in MB; 0 when it doesn't say
module_countnumber
How many node modules are installed
moduleslist
The node modules installed, Node-RED's own first
node_js_versiontext
The Node.js version it runs on, such as v22.11.0
permissionstext
What that user may do: * for everything, read to only read
platformtext
The operating system, such as linux
usertext
The Node-RED user the connection signs in as; empty with no sign-in
versiontext
Node-RED's version, such as 4.1.2
Example output
{
  "containerised": true,
  "context_stores": [
    "memory"
  ],
  "flow_count": 3,
  "flows_running": true,
  "http_node_root": "/",
  "memory_mb": 112.4,
  "module_count": 2,
  "modules": [
    {
      "enabled": true,
      "module": "node-red",
      "node_types": 41,
      "version": "4.1.2"
    },
    {
      "enabled": true,
      "module": "node-red-contrib-home-assistant-websocket",
      "node_types": 23,
      "version": "0.77.1"
    }
  ],
  "node_js_version": "v22.11.0",
  "permissions": "*",
  "platform": "linux",
  "user": "admin",
  "version": "4.1.2"
}

List flows

List Node-RED's flows (the editor's tabs), with how many nodes each has, its HTTP endpoints and whether it's enabled; optionally with every flow exported as JSON, for a backup.

Inputs

Enabled or disabledstatetext
Only enabled flows, or only disabled ones.One of: any, enabled, disabled. Default: any.
Include exportinclude_exporttrue/false
Also return every flow, subflow and configuration node as JSON, as Node-RED's Export makes it, such as to save a backup.Default: false.

Outputs

countnumber
How many flows are listed
disabled_countnumber
How many of them are disabled
enabled_countnumber
How many of them are enabled
exporttext
Every flow, subflow and configuration node as JSON, as Node-RED's Export makes it, when asked for; empty otherwise
flowslist
The flows (tabs), in the editor's order
revtext
The current deploy's revision; it changes at every deploy
subflow_countnumber
How many subflows Node-RED has
Example output
{
  "count": 2,
  "disabled_count": 1,
  "enabled_count": 1,
  "export": "",
  "flows": [
    {
      "disabled": false,
      "endpoints": [
        "POST /orders/check"
      ],
      "id": "4b1d7e2c9a8f0e36",
      "info": "Answers stock checks for the shop.",
      "inject_nodes": 1,
      "label": "Order checks",
      "node_count": 5
    },
    {
      "disabled": true,
      "endpoints": [],
      "id": "9e0a4c7d2b1f8e53",
      "info": "",
      "inject_nodes": 1,
      "label": "Old heating schedule",
      "node_count": 2
    }
  ],
  "rev": "52f63b979e660e1930061fcbb35348a3",
  "subflow_count": 0
}

Restart flows

Stop and start every flow, as Node-RED's Deploy > Restart Flows does, such as after a device reconnects.

Inputs

None.

Outputs

flow_countnumber
How many flows Node-RED has
restartedtrue/false
True once Node-RED restarted its flows
restarted_attext
When they were restarted (ISO 8601, UTC)
revtext
The deploy's revision
Example output
{
  "flow_count": 3,
  "restarted": true,
  "restarted_at": "2026-11-09T07:00:00Z",
  "rev": "41697916d6ae1a4a1cc3e4c7ac80bcb2"
}

Trigger inject node

Run a flow from one of its inject nodes, as clicking its button in the editor does, with its own payload or one you give.

Inputs

Inject nodeinject_nodetextRequired
The inject node: its name or ID.
Payloadpayloadtext
A payload to send instead of the node's own: text, or JSON such as {"room": "office"}. Leave blank for the node's own.

Outputs

flowtext
The name of the flow it's in
flow_idtext
The ID of the flow it's in
nametext
The inject node's name
node_idtext
The inject node's ID
payload_giventrue/false
True when the step sent a payload of its own
triggeredtrue/false
True once Node-RED took the trigger
triggered_attext
When it was triggered (ISO 8601, UTC)
Example output
{
  "flow": "Nightly backup",
  "flow_id": "4b1d7e2c9a8f0e36",
  "name": "Run backup",
  "node_id": "8f3c2a1b9d0e4f57",
  "payload_given": false,
  "triggered": true,
  "triggered_at": "2026-11-09T07:00:00Z"
}

On this page