Platform DocumentationPlatform Documentation

User-Defined vs Template Workflows

Understand the difference between user-defined workflows and template workflows, and when to use each.

In CORE, workflows can be created at two different levels: user-defined workflows and template workflows. Understanding the difference between these two types is essential for building efficient, maintainable automations.

Overview

AspectUser-Defined WorkflowsTemplate Workflows
ScopeSpecific to one device instanceApplied to all devices using the template
LocationCreated on individual devicesCreated on the device template
InheritanceNot inheritedAutomatically available on all devices
CustomizationUnique per deviceShared across all devices
Use CaseDevice-specific logicStandard logic for all devices

User-Defined Workflows

User-defined workflows are created on individual device instances. They are specific to that device and do not affect any other device.

When to Use User-Defined Workflows

Use user-defined workflows when the automation logic is unique to a specific device:

  • Device-specific integrations — A device that connects to a unique external API
  • Custom alerts — Alerts that only apply to certain devices
  • One-off automations — Workflows that shouldn't run on all devices
  • Testing — Experiment with new workflow logic on a single device before applying to the template

Example

You have 100 temperature sensors, but one of them is connected to a special external reporting system that the others aren't. You would create a user-defined workflow on that specific device to handle the external reporting.

Characteristics

  • Created and managed in the device view
  • Only runs on the device it's created for
  • Can be modified without affecting other devices
  • Must be created individually on each device that needs it

Template Workflows

Template workflows are created on the device template. They are automatically available on all devices that are created from that template.

When to Use Template Workflows

Use template workflows when the automation logic should apply to all devices of a certain type:

  • Standard data processing — All devices need the same data transformation
  • Common alerts — All devices should alert on the same conditions
  • Default integrations — All devices send data to the same external system
  • Baseline automations — Standard workflows that all devices should have

Example

All your temperature sensors should send an alert when the temperature exceeds 30°C. This is a template workflow because it applies to every device of that type.

Characteristics

  • Created and managed in the device template view
  • Automatically available on all devices created from the template
  • Changes to the template workflow affect all existing devices
  • Provides a consistent baseline for all devices

Key Differences

Scope and Reach

Template Workflow:
  Device Template → "Temperature Alert"
       ↓ (applied to all devices)
  Device A → Has "Temperature Alert"
  Device B → Has "Temperature Alert"
  Device C → Has "Temperature Alert"

User-Defined Workflow:
  Device A → "Temperature Alert" (template)
  Device B → "Temperature Alert" (template)
  Device C → "Temperature Alert" (template)
       ↓ (additional workflow)
  Device B → "Special Integration" (user-defined only)

Modification Impact

ActionTemplate WorkflowUser-Defined Workflow
EditAffects all devicesAffects only one device
DeleteRemoves from all devicesRemoves from one device
CreateNew devices get it automaticallyMust be created per device

Customization

  • Template workflows provide consistency across all devices
  • User-defined workflows allow device-specific customization
  • Both can coexist on the same device

Combining Both Types

A single device can have both template workflows and user-defined workflows:

  1. Template workflows provide the baseline automation that all devices share
  2. User-defined workflows add device-specific logic on top of the template

This combination gives you the best of both worlds:

  • Consistency — All devices have the same core automations
  • Flexibility — Individual devices can have unique behavior when needed

Best Practices

1. Start with Template Workflows

Create standard automations as template workflows first. This ensures all devices have the baseline functionality.

2. Add User-Defined Workflows Only When Needed

Don't create user-defined workflows unless there's a specific reason. Overuse leads to:

  • Increased maintenance overhead
  • Inconsistent behavior across devices
  • Difficulty tracking which workflows run where

3. Document Your Workflows

Clearly document which workflows are template-based and which are user-defined:

Template: "Standard Temperature Alert" — applies to all devices
User-Defined: "Custom API Sync" — only on Device X

4. Plan for Scalability

Consider how your workflow strategy scales:

  • Template workflows scale automatically with new devices
  • User-defined workflows require manual setup on each device
  • For large deployments, prefer template workflows when possible

5. Test Template Changes Carefully

Since template workflow changes affect all devices:

  • Test changes on a single device first
  • Review the impact on existing devices
  • Consider rolling out changes gradually

Migration Guide

Converting User-Defined to Template

If you find yourself creating the same user-defined workflow on multiple devices:

  1. Copy the workflow from one device
  2. Create it as a template workflow
  3. Remove the user-defined workflows from individual devices
  4. Verify all devices are working correctly

Converting Template to User-Defined

If a template workflow needs to be device-specific:

  1. Copy the workflow from the template
  2. Create it as a user-defined workflow on the target device
  3. Remove or modify the template workflow
  4. Update any other devices that still need the original template workflow

Summary

Choose Template Workflows WhenChoose User-Defined Workflows When
Logic applies to all devicesLogic is device-specific
You want consistency across devicesYou need customization
You want automatic provisioningYou're testing new logic
You have many devicesYou have few devices
The logic is standardizedThe logic is unique

On this page