Skip to content
English
  • There are no suggestions because the search field is empty.

File a ticket from a scheduled check

Run a periodic sensor measurement against a threshold and file a ticket when the measurement crosses it. Tickets opened this way carry source: "workflow" so they sit alongside health-monitor tickets in the Tickets page and route through the same trigger fan-out. For ops teams who want signal-noise tickets without writing per-device workflows.

What this workflow does

  • A Schedule trigger fires on a clock (every N minutes, hourly, daily, …).
  • A Find Devices condition picks the devices in a chosen space (with descendants on) that report the sensor type you care about.
  • A Sensor Window Aggregate action averages a recent window of those readings.
  • An If condition routes to true when the average crosses your threshold.
  • An Open Ticket action files a ticket on the true path with a markdown description and a stable subjectId so repeat runs can be correlated.

Workflow canvas: Schedule → Find Devices (sensorTypes=[CO2], recurse=on) → Sensor Window Aggregate (aggregator=avg, window=15m) → If (value > threshold) → Open Ticket. Highlight the found edge out of Find Devices and the true edge of If.

Prerequisites

  • Workflows enabled for your org. See Enable workflows for your org.
  • Tickets enabled for your org. See Tickets.
  • A workflow service account with permission to file tickets (the same service account workflows use for state mutations). See Service account setup.
  • At least one integration reporting the sensor type you want to monitor in the chosen space.

Build it

1. Create the workflow

Workflows → New workflow → name Auto-file ticket when CO2 stays high → Create.

2. Add the Schedule trigger

  1. Add nodeTriggersSchedule.
  2. Schedule type: Every N minutes → 15. Timezone: your org's.

3. Add Find Devices

  1. Add nodeConditionsFind Devices.
  2. Settings:
    • Space — pick the building, floor, or room you want to monitor.
    • Include descendantson so every room under the chosen space is covered.
    • Sensor typesCO2.
    • Leave Integration, Vendor, Model, and Tag empty unless you want to scope further.
  3. Connect the Schedule trigger to Find Devices.

4. Add Sensor Window Aggregate

  1. Add nodeActionsSensor Window Aggregate.
  2. Settings:
    • Devices — data-reference pick findDevices.deviceIds.
    • Sensor typeCO2.
    • AggregatorAverage.
    • Window15m.
  3. Connect Find Devices' found port to this action.

5. Add the If condition for the threshold

  1. Add nodeConditionsIf.
  2. One row:
    • Value 1 — data reference, the sensor aggregate's value.
    • Operationnumber greater than.
    • Value 21200.
  3. Connect the Sensor Window Aggregate's output to the If's input.

6. Add the Open Ticket action

  1. Add nodeActionsOpen Ticket.
  2. Settings:
    • TitleCO2 above 1200 ppm in Meeting Room A (or templated: CO2 above {{ .sensorWindowAggregate.value }}ppm).
    • Subject kindspace.
    • Subject idspc-meeting-room-a (the space the reading covers).
    • Subject nameMeeting Room A.
    • Kindair_quality (free-form; pick a string your filtering will look for).
    • DescriptionMarkdown variant. Body:

      ## CO2 reading
      - **Average over 15 minutes:** {{ .sensorWindowAggregate.value }} ppm
      - **Threshold:** 1200 ppm

      ### Things to check
      - [ ] Open windows or run ventilation
      - [ ] Confirm the sensor is reading correctly
      - [ ] Reschedule the meeting if attendance is large
    • Extra{"firedAt": "{{ .trigger.firedAt.timestamp }}"} so workflow authors can grep for the firing run later.
  3. Connect the true port of If to the action.

7. Save and enable

Click Save, leave Enabled on.

Variations

  • Don't double-file. The action files a fresh ticket every time If routes true — so a sustained high reading produces multiple tickets. Add a stateful condition (e.g. Cooldown keyed on the space id) to gate the action, or branch on ticket.kind in a downstream Resolve Ticket workflow when the next reading clears the threshold.
  • Different sensor. Swap CO2 for TEMP, VOC, PM2_5 etc. on both Find Devices and Sensor Window Aggregate. Adjust threshold and window accordingly. Average smooths bursts; Maximum fires on any spike.
  • Subject = "other". For tickets about non-Neowit entities (an external service, a customer account), set Subject kind to other and use the originating system's primary key as Subject id. Workflow authors can grep for the id later.

When it doesn't fire

  • Trigger never fired. Check the Schedule's timezone and cadence. The first fire happens at the next clock tick, not immediately on save.
  • Find Devices routed none. The chosen space has no devices reporting the configured sensor type — check the device list in the org.
  • If routed false. Confirm the sensor aggregate's output isn't null (empty windows fail the task). Lower the window or relax the threshold.
  • Ticket opened but timeline is empty. Confirm the workflow service account's id is non-empty; the actor on the open event is workflow:<sa-id> and an empty suffix is harder to read in the audit log.

Related