Particle Trigger
The Particle Trigger fires a workflow whenever an event is received on the selected Particle integration or the integration receives a connection event.
Node Properties
The Particle Trigger requires choosing a Particle integration, as well as at least one of the following events on which to fire the trigger:
- Trigger on a connection
- Trigger on a message (checked by default)
- Trigger on a disconnection
- Trigger on a failure to connect
After selecting a Particle integration, a summary of the event names that will cause the trigger to fire will appear beneath the selector.
Payload
The trigger’s initial payload includes a data
object with the following properties:
coreid
: A string representing the ID of the Particle device that published the event.data
: A string value associated with the published event.name
: The name of the event as a string.published_at
: An ISO date string indicating when the event was published.ttl
: An integer representing the TTL (time to live) of the published event, in seconds.
In the general case, a Particle Trigger’s initial payload looks like the following:
{
"applicationId": "555555555555eeeeeeeeeeee",
"applicationName": "My Great Application",
"data": {
"coreid": "myParticleDeviceId",
"data": "myEventValue",
"disconnectReason": "Connection Lost",
"failureReason": "Unauthorized",
"eventNames": [
"event_name",
"another_event_name"
],
"name": "myEventName",
"published_at": "2017-02-19T17:25:55.409Z",
"ttl": 60,
"type": "connect|message|disconnect|failure"
},
"flowId": "333333333333cccccccccccc",
"flowName": "My Great Workflow",
"flowVersion": "myFlowVersion",
"globals": {
"aJsonGlobal": {
"key": "value"
},
"aNumberGlobal": 42,
"aStringGlobal": "My value"
},
"relayId": "<ID of the integration>",
"relayType": "integration",
"time": Fri Feb 19 2016 17:26:00 GMT-0500 (EST),
"triggerId": "<ID of the integration>",
"triggerType": "integration"
}
Related Nodes
Was this page helpful?
Still looking for help? You can also search the WEGnology Forums or submit your question there.