Actions45
- Manager Actions
- Mouse Actions
- Keyboard Actions
- Browser Control Actions
- Element Actions
- Image Actions
- Others Actions
- Email Actions
- Developer Actions
- General Debug Actions
Developer → getcode
AI-generatedSummary
Publish a JSON-encoded action payload to a specified MQTT topic with configurable quality of service (QoS), optionally including selected input fields and waiting for a response on a separate MQTT topic before returning output.
Inputs
- Topic (required) — The MQTT topic to which the action payload will be published.
- QoS — The MQTT Quality of Service level for message delivery (0 = at most once, 1 = at least once, 2 = exactly once).
- Include Input Items — If enabled, includes selected fields from the previous node's input items into the published payload under payload.inputItems.
- Include Input Items Fields — Comma- or newline-separated list of field paths from previous input items to include in the payload if Include Input Items is enabled.
- Wait For Response — If enabled, waits for a response message on a specified MQTT topic before returning output.
- Response Topic (required) — MQTT topic to subscribe to for receiving the response message when waiting for a response (required if Wait For Response is true). Defaults to "RES_
". - Response Timeout (ms) — Maximum time in milliseconds to wait for the response message before timing out.
- Parse Response As JSON — Whether to attempt parsing the response message payload as JSON.
Output shape
a list of items matching input items or a single item if no input, each augmented with an mqtt property containing the published topic, action details, sent payload, and optionally the received response if waiting for it
If Wait For Response is enabled, the node subscribes to the Response Topic and waits up to the specified timeout for a message, providing the response data in the output under mqtt.response. If no input items are present, a single output item with mqtt info is returned. Errors during MQTT publish or response waiting cause failure unless 'continueOnFail' is set.
Examples
Example 1: Publish an action payload to the MQTT topic 'playwright/mouse/click' with QoS 1, include 'id' and 'name' fields from input items, and do not wait for any response.
Topic='playwright/mouse/click', QoS=1, Include Input Items=true, Include Input Items Fields='id,name', Wait For Response=false
Example 2: Publish an action and wait for a response on topic 'RES_playwright/mouse/click' with a 10-second timeout, parsing the response as JSON.
Topic='playwright/mouse/click', QoS=1, Wait For Response=true, Response Topic='RES_playwright/mouse/click', Response Timeout (ms)=10000, Parse Response As JSON=true