Device: Create Trigger Node

The Device: Create Trigger fires a workflow whenever a device is created within your application.

Device: Create Trigger

Node Properties

The trigger does not take any configuration. It will fire for any of the following actions …

Bulk Device Creation

The Device: Create Trigger does not fire for bulk creation events, including bulk creation requests that create only one device. This includes:

Payload

The payload will include the newly created device object under the device property of the data field. In the general case, a Device: Create Trigger workflow payload will look like the following:

{
  "applicationId": "555555555555eeeeeeeeeeee",
  "applicationName": "My Great Application",
  "data": {
    "device": {
      "_etag": "\"567-SY26IHrVRzUBMUwxnY59Fn6vOvo\"",
      "applicationId": "555555555555eeeeeeeeeeee",
      "attributes": {
        "exampleNumber": {
          "attributeTags": {
            "attrTagKey": "tagValue1"
          },
          "dataType": "number",
          "description": "",
          "name": "exampleNumber"
        },
        "exampleString": {
          "attributeTags": {
            "attrTagKey": "tagValue2"
          },
          "dataType": "string",
          "description": "",
          "name": "exampleString"
        }
      },
      "creationDate": "2018-03-16T18:19:03.376Z",
      "description": "",
      "deviceClass": "standalone",
      "deviceId": "222222222222bbbbbbbbbbbb",
      "id": "222222222222bbbbbbbbbbbb",
      "lastUpdated": "2020-08-26T13:09:11.814Z",
      "name": "My Great Device",
      "tags": {
        "aTagKey": [
          "exampleTagValue"
        ],
        "tagWithMultipleValues": [
          "tagValue",
          "anotherTagValue"
        ]
      }
    }
  },
  "flowId": "333333333333cccccccccccc",
  "flowName": "My Great Workflow",
  "flowVersion": "myFlowVersion",
  "globals": {
    "aJsonGlobal": {
      "key": "value"
    },
    "aNumberGlobal": 42,
    "aStringGlobal": "My value"
  },
  "relayId": "333333333333cccccccccccc",
  "relayType": "apiToken|flow|user",
  "time": Fri Feb 19 2016 17:26:00 GMT-0500 (EST),
  "triggerId": "222222222222bbbbbbbbbbbb",
  "triggerType": "deviceCreate"
}

Payload Consumption

Similar to the Event Trigger and Data Table Trigger, invoking the Device: Create Trigger does not constitute a billable payload - nor does the act of creating a device within your application.

Was this page helpful?


Still looking for help? You can also search the WEGnology Forums or submit your question there.