Client message
Starts a run when a client sends a message of the type you pick. Add conditions to start only on the readings that matter, and a hold to start only when they keep mattering.
trigger:clientHow it looks
Settings
| Setting | Required | What it does |
|---|---|---|
| ClientclientRef | Yes | The client to listen to. |
| Message typetype | Yes | The type the board sends, like temperature. * starts on any type. |
| Conditionsfilter | No | Checked against the message before a run starts, like celsius > 30. A run starts only when they hold. A condition that can't be checked counts as not matching, so a bad reading never starts a run by accident. |
| Hold forholdSeconds | No | The conditions must keep holding this long before a run starts, up to 24 hours. After that the trigger stays quiet until a message stops matching. Needs conditions. |
| If it fires while a run is still goingconcurrencyPolicy | No | Queue by default. See Runs that overlap below. |
| Correlation keycorrelationKey | No | Which runs count as the same for the setting above. Left empty, the client and message type. Set it to share one line with another trigger. |
Ports
| Port | The run leaves by it when |
|---|---|
default | Always. The message is the run's input. |
What it adds to the run
Later nodes can read these, in a condition or as {{name}} in a text field.
| Value | Holds |
|---|---|
trigger | The message the board sent. Its values are under trigger.payload, so {{trigger.payload.celsius}} in a later node is the reading. |
triggeredAt | When the trigger fired. |
Example
Fridge door left open
- Message type
door, conditionopen == true. - Hold for 10 minutes.
- Connect a Telegram node. You hear about it once, ten minutes in, not on every reading, and again only after the door has closed and opened.
Runs that overlap
What happens when the trigger fires again while a run with the same correlation key is still going.
| Setting | What happens |
|---|---|
| Queuedefault | The new event waits. When the run finishes, the oldest waiting event starts the next one. Events wait up to 24 hours. |
| Allow parallel | Another run starts alongside. |
| Drop if running | The new event is dropped. |
| Cancel existing | The running one is cancelled and a new one starts. |
Problems you might see
| Code | Means |
|---|---|
INVALID_CLIENT_REF | The client isn't one in this workspace. Shown when you publish. |
HOLD_REQUIRES_FILTER | Hold for is set without any conditions to hold. |
INVALID_HOLD_DURATION | Hold for is negative or over 24 hours. |
Problems found when you publish stop the publish and point at the node. Problems while a run is going fail the node, and its On failure setting decides what happens next. See the error codes for the API's own.
See also
Checks a condition, or several joined with and or or, and leaves by true or false.
Outtruefalsecontrol:logicSends a command to a client. Can wait for the client to confirm and leave by what happened.
Outdefaultor, when waitingackedfailedtimeoutaction:clientMessageSends a message to a Telegram chat through your bot.
Outdefaultaction:telegram