Limitations and Best Practices
Understand workflow limitations, common pitfalls, and best practices for building reliable automations.
Understanding the limitations of workflows and following best practices will help you build reliable, efficient automations that perform well at scale.
Workflow Limitations
Execution Time
Workflows have a maximum execution time. Long-running workflows that exceed this limit will be terminated. To avoid this:
- Keep workflows focused on specific tasks
- Avoid complex calculations that could be done elsewhere
- Use external APIs for heavy data processing
Message Size
Each node in a workflow can only process a limited amount of data per execution:
- Keep payload sizes small and efficient
- Avoid sending large binary data through workflows
- Use datastreams for storing large volumes of historical data
Rate Limits
Workflows are subject to execution rate limits based on your plan and configuration:
- Frequent triggers (e.g., every data point) can accumulate quickly
- Monitor your workflow execution count
- Consider aggregating data before processing in workflows
Concurrent Executions
There is a limit to how many workflow instances can run simultaneously:
- High-volume devices may hit concurrency limits
- Stagger triggers where possible
- Use batch processing for large datasets
Common Pitfalls
Infinite Loops
A workflow can accidentally trigger itself, creating an infinite loop:
Device sends data → Workflow updates attribute → Datastream change trigger → Workflow runs againHow to avoid:
- Check if a workflow's output could trigger its own input
- Use conditional logic to prevent re-processing the same data
- Add delay nodes between actions that could cause feedback loops
Over-Triggering
Running a workflow on every single data point can overwhelm the system:
Bad: Trigger on every data received (thousands per minute)
Good: Trigger on datastream change with threshold filtering
Better: Use a schedule to batch-process data at intervalsHow to avoid:
- Use threshold or condition nodes to filter unnecessary executions
- Aggregate data before it reaches the workflow
- Use schedules instead of real-time triggers when possible
Missing Error Handling
Workflows that fail silently can cause data loss or broken automations:
How to avoid:
- Always consider what happens when a node fails
- Use notification nodes to alert on failures
- Test workflows with invalid or missing data
Complex Nested Logic
Overly complex workflows with deeply nested conditions are hard to maintain:
How to avoid:
- Keep workflows simple and focused on one task
- Break complex logic into multiple smaller workflows
- Use descriptive node names and labels
Best Practices
1. Plan Your Workflow First
Before building, sketch out your workflow logic:
- What triggers the workflow?
- What data does it need?
- What actions should it take?
- What are the failure scenarios?
2. Use Descriptive Names
Name your workflows and nodes clearly:
Good: "Alert on High Temperature"
Bad: "Workflow 1"3. Test with Sample Data
Always test workflows with realistic sample data before deploying to production:
- Use test devices with known data patterns
- Verify all node outputs match expectations
- Test edge cases (empty data, extreme values, missing fields)
4. Monitor Workflow Execution
Regularly check workflow execution logs:
- Look for failed executions
- Identify workflows that run too frequently
- Check execution times for performance issues
5. Keep Workflows Modular
Instead of one massive workflow, use multiple focused workflows:
Instead of:
One workflow that: monitors temperature, humidity, pressure,
sends emails, updates dashboards, and calls APIs
Use:
Workflow 1: "Temperature Alert" — monitors temperature only
Workflow 2: "Humidity Report" — processes humidity data
Workflow 3: "API Sync" — syncs data to external system6. Document Your Workflows
Add documentation for complex workflows:
- Document the purpose and logic in the workflow description
- Comment complex node configurations
- Keep track of workflow versions and changes
7. Use Variables Efficiently
- Reuse variables across nodes instead of recalculating
- Keep variable names descriptive and consistent
- Avoid deeply nested variable references
8. Handle Missing Data
Always account for missing or null values:
- Use condition nodes to check for required data
- Provide default values where appropriate
- Log warnings when expected data is missing
Performance Tips
Optimize Data Queries
When using the Get History node:
- Limit the time range to only what you need
- Use specific datastream filters instead of fetching all data
- Set appropriate limit counts for returned records
Reduce API Calls
When using the HTTP Request node:
- Batch multiple operations into a single request when possible
- Cache frequently accessed data instead of re-fetching
- Use appropriate HTTP methods (GET for reading, POST for writing)
Efficient MQTT Publishing
When using the MQTT Publish node:
- Publish multiple values in a single JSON payload
- Avoid publishing empty or unchanged data
- Use appropriate QoS levels (QoS 0 for non-critical data)
Security Considerations
API Credentials
Never hardcode credentials in workflows:
- Use environment variables or secure storage for API keys
- Rotate credentials regularly
- Limit API key permissions to only what's needed
Data Privacy
Be mindful of what data flows through your workflows:
- Avoid processing sensitive personal data unnecessarily
- Encrypt data when sending to external systems
- Follow data retention policies
MQTT Security
When publishing to MQTT topics:
- Verify topic paths are correct to avoid data leaks
- Use the correct QoS levels for sensitive data
- Be aware that MQTT messages are visible to anyone subscribed to the topic
Troubleshooting
Workflow Not Triggering
- Verify the trigger configuration is correct
- Check that the trigger conditions are being met
- Ensure the workflow is activated (not in draft mode)
Node Not Receiving Data
- Check the connections between nodes
- Verify variable paths are correct
- Look for nodes that may be filtering out data
Unexpected Behavior
- Review the workflow execution log for errors
- Check node configurations for incorrect settings
- Test with simplified data to isolate the issue
Summary
| Do | Don't |
|---|---|
| Keep workflows focused and simple | Create overly complex monolithic workflows |
| Test with sample data before deploying | Deploy untested workflows to production |
| Monitor execution logs regularly | Ignore workflow failures |
| Use descriptive names and documentation | Leave workflows undocumented |
| Handle errors and edge cases | Assume all data will be valid |