New: the AI firewall watches every module and explains each incident in plain words. See how it works

Action blocks

Reference of HTTP request, HTTP response, MQTT out, Webhook, Emit event, Set variable, Timer, flow switching, Run flow, Link out, log and Debug.

Action blocks do something: call another system, publish a message, store a variable, start a timer, hand the message to another flow, or write a log line. The device, alarm and notification actions are on their own pages: IoT data blocks and Alarm, command and notify blocks.

Common behaviour of outbound blocks

HTTP request, MQTT out and Webhook share these rules:

TopicBehaviour
RiskExternal: a deploy that contains one asks for a confirmation
RetriesOnly transient failures retry; 3 attempts by default (retry_* settings), at most 5, with an exponential back-off from 1 s
IdempotencyEvery attempt of one message carries the same key (X-Idempotency-Key, or the MQTT 5 user property idempotency-key), also after a crash or a replay, so a receiver can deduplicate
DeliveryAt least once
BreakerA block whose calls keep failing pauses its calls for a while (circuit_open)
Late messageslate: skip (default; the message stops, counted as Too old) or send (a data feed that must also get the backlog after an outage)
TestsA test run sends nothing and reports what it would have sent
OrderHTTP request and MQTT out calls run separately from the run that made them: the device’s next message does not wait for the answer, and the order of messages after the call is not guaranteed
AddressesPrivate and internal addresses are refused (ssrf_blocked)

HTTP request

Calls an HTTP endpoint and puts the answer into the message. Scheme, host, port, authentication and TLS come only from the endpoint connection, never from the message. See Connections and secrets.

SettingMeaningDefaultValues
endpointThe HTTP endpoint connectionrequired
hostAnother host the endpoint allowsemptya template; must match the endpoint’s allowed hosts
methodHTTP methodGETGET, POST, PUT, PATCH, DELETE, HEAD
pathAppended to the endpoint’s base pathemptya template, 1,024 characters
queryQuery parametersnoneup to 16 rows
headersExtra headersnoneup to 16 rows; Host, Authorization, Cookie, Proxy-*, Content-Length, X-Idempotency-Key and hop-by-hop headers are refused
bodyWhat is sentpayloadpayload, template, none (hidden for GET, HEAD, DELETE)
templateThe body templateemptyup to 4,096 characters
template_formatHow {{ }} values are writtentexttext, json (each value as a JSON value; the body must be JSON)
timeout_msTime per attempt10,0001,000 to 30,000
parseHow the answer is readautoauto, json, text
max_bytesLargest answer64 KiB1 to 256 KiB
response_headersAnswer headers kept in msg.metadata.headersallall, list, none (at most 32 headers, 8 KiB)
max_parallelCalls in flight for this block0 (no cap)0 to 64
inlineKeep the call inside the run, so the device’s next message waits for the answer (the deploy warns)offon, off
retry_*Attempts and back-off3, from 1 s
lateSee aboveskipskip, send

Outputs:

  • out: status below 400. msg.payload is the body, msg.statusCode, msg.contentType, msg.metadata.headers. Redirects are not followed.
  • error: http_status (400 or above, body in msg.payload), timeout, connect, tls, ssrf_blocked, too_large, invalid_json, invalid_value, oauth_failed, function_error, circuit_open, limit. msg.error.attempts says how many attempts were made.

Retried: timeouts, connection failures and HTTP 408, 425, 429 (honouring Retry-After), 500, 502, 503, 504.

For a JSON body built from values, use template_format: json and leave the placeholders unquoted: {"name": {{ msg.payload.name }}, "n": {{ msg.payload.n }}}.

HTTP response

Answers the caller of a synchronous Webhook trigger (reply: response). The first response of a run wins.

SettingMeaningDefaultValues
statusHTTP status (msg.statusCode overrides it)200100 to 599
headersResponse headersnonecontent-type, cache-control, location (3xx), x-* (not x-forwarded-*)
bodyWhat is sentpayloadpayload, template, none
templateBody templateemptyup to 4,096 characters
max_bytesLargest body256 KiBat most 256 KiB

Errors: no_reply_pending, reply_sent, limit. Without a response the caller gets 204; after the hook’s timeout, 504.

MQTT out

Publishes the payload to a topic on your broker, then passes the message on. Text is sent as text, anything else as JSON.

SettingMeaningDefaultValues
brokerThe MQTT broker connectionrequired
topicThe topic{{ msg.topic }}a template, 256 characters; a leading ~/ is the broker’s topic prefix
qosDelivery guarantee00, 1, 2
retainAsk the broker to keep the messageoffon, off
timeout_msTime for the acknowledgement10,0001,000 to 30,000
max_parallelPublishes in flight0 (no cap)0 to 64
retry_*, lateAs above

Errors: bad_topic (empty, + or #, or ~/ without a prefix), timeout, connect, auth, ssrf_blocked, node_not_ready, not_configured, circuit_open, limit. Only timeouts and connection failures retry.

Webhook

Sends the message to one of your organisation’s webhook endpoints: signed, retried and listed in the endpoint’s deliveries. This is the guaranteed-delivery path.

SettingMeaningDefaultValues
endpointThe endpointrequiredactive endpoints subscribed to Automation message
topicSent as topic{{ msg.topic }}a template, 256 characters
bodyWhat is sent besides the topicpayloadpayload, payload and metadata
metadata_keysMetadata keys sentnoneat most 20
lateSee aboveskipskip, send

The receiver gets the event automation.message with topic, payload, originator, flowId, flowVersion, nodeId, actor and the listed metadata. out carries msg.metadata.webhook.deliveryId once queued. Errors: endpoint_not_found, endpoint_inactive, enqueue_failed, not_configured, node_not_ready, circuit_open, limit (webhooks not in your plan). See Webhooks.

Emit event

Sends an event that Event triggers with source flow hear, in any flow.

SettingMeaningDefaultValues
kindThe event’s namerequireda lower-case letter first, then lower-case letters, digits, _ and .; up to 32 characters
dataWhat it carriesmsg.payloadany value kind; a non-object is wrapped as { "value": … }

Listeners get msg.payload = the data and msg.topic flow/<kind>. Errors: rate_limited, invalid_value (a bad kind, or “emit: depth”: the fifth step of a chain). A deploy refuses a loop it can see (flow_cycle). A late message emits nothing.

Set variable

Stores a value in a flow or global variable.

SettingMeaningValues
pathThe variableflow.<name> or global.<name>, deeper keys allowed; flow.persist:<name> for the persistent store
valueWhat to storeany value kind; nothing (null) removes it

Errors: invalid_value, limit (store full; the old value stays). Limits: 1 MiB per flow, 4 MiB for global variables. In a test, the test’s own copy is written.

Timer

Starts, restarts or cancels a named timer. When it runs out, every Named timer trigger with that name fires.

SettingMeaningDefaultValues
nameThe timer, shared by all flowsrequired
opStart (again) or cancelstartstart, cancel
msDuration (msg.ms overrides it)1 min0 to 7 days

Starting a running timer restarts it from zero: the watchdog pattern. Error queue_full “too many timers”: the organisation holds 64 timers of 60 s or less, or 10,000 longer ones. A late message starts or cancels nothing.

Enable or disable a flow

Switches another flow on or off, like the switch in the flow list.

SettingMeaningDefaultValues
flowThe flowrequireda deployed flow of the organisation, not this one
stateEnable or disableenableenable, disable

out carries msg.metadata.flow_enable { flow, enabled, changed }. Errors: not_configured, self_reference, not_found, not_approved, conflict, invalid, limit (more than 6 switches a minute). Deploying a flow with this block needs the typed confirmation.

Run flow

Hands the message to another flow’s Flow input and ends this branch.

SettingMeaningValues
flowThe flow to runanother flow of the same host; never a root flow

No out port; nothing comes back. Errors: not_configured, invalid_value (missing, disabled or stopped), forbidden (a root), loop (fifth hop). A flow that other flows run cannot be deleted until those blocks are removed. The message keeps its device, so Save telemetry works in the target flow.

Passes the message to Link in blocks by name, or returns the answer to a Link call.

SettingMeaningDefaultValues
modelink (to Link in blocks) or return (answer the caller)linklink, return
targetsLink in names (link mode)emptyup to 16
nameThe return’s name (return mode)outa return the caller declares

No out port. A missing target is a warning in the debug panel, not an error. A deploy refuses unknown names and loops with no waiting block (cycle_sync).

System log

Writes a line to the flow’s log (Activity > Events > Log, kept 24 hours).

SettingMeaningDefaultValues
textThe line, with {{ }} placeholders{{ msg.payload }}up to 512 characters
levelPriorityinfoinfo, notice, warn, err

Debug

Shows the messages that reach it in the editor’s Activity > Debug tab. No out port.

SettingMeaningDefaultValues
propertyWhat to showmsg.payloadmsg (the whole message) or a path
activeShow messages at allonon, off

Debug entries are kept 24 hours and are visible to people who may debug. The button on the block switches it off and on without saving.

Write to an external time-series database

A block writes one point per message to an external time-series database server of your own, through a database server connection. Settings: the server, the bucket or database, the measurement, up to 16 tags, 1 to 32 fields (with a type: auto, float, int, string, bool), the time (default: the time of the first attempt, the same on every retry), timeout_ms (1,000 to 30,000), retries and late. out carries msg.metadata with the written measurement, fields and tags. For a general integration, the HTTP request block to your own API is often simpler.