STORE_DB for persisting data to MariaDB, and POST_ENDPOINT for forwarding messages to HTTP endpoints.
STORE_DB action
TheSTORE_DB action stores each attribute from the payload as a separate record in the data table.
How it works
When a message is processed withSTORE_DB:
- The payload is validated against the flow’s schema
- The flow’s
last_msg_idis incremented - Each key-value pair in the payload creates a new
DataRecord
Data serialization
Complex types (objects and arrays) are JSON-encoded before storage:All values are stored as text in the
attribute_value column, regardless of their original type. Complex types are JSON-encoded.Database schema
Each record in thedata table contains:
Example
Given this payload on theAHT10_SENSOR flow:
| received_at | flow_code | attribute_name | attribute_value | last_msg_id |
|---|---|---|---|---|
| 2026-03-03 10:15:00 | AHT10_SENSOR | temperature | 23.5 | 1 |
| 2026-03-03 10:15:00 | AHT10_SENSOR | humidity | 65.2 | 1 |
All attributes from a single message share the same
last_msg_id and received_at timestamp, allowing you to reconstruct the original message.POST_ENDPOINT action
ThePOST_ENDPOINT action forwards the validated payload to an HTTP endpoint via POST request.
How it works
- The payload is validated against the flow’s schema
- The flow’s
last_msg_idis incremented and committed to the database - The entire payload is sent as JSON to the configured
endpoint_url
Configuration requirements
Flows withPOST_ENDPOINT must have a valid endpoint_url:
Example flow
Request format
The gateway sends a POST request with:- Content-Type:
application/json - Body: The validated payload as JSON
- Timeout: Configured via
http_timeout_secondssetting
Error handling
HTTP errors are logged but do not stop message processing:If the HTTP request fails, the error is logged and the message ID is still incremented. The gateway continues processing other messages.
Choosing an action
UseSTORE_DB when:
- You need to query historical data
- You want to analyze trends over time
- You need a permanent record in your database
POST_ENDPOINT when:
- You’re integrating with external services
- You need real-time processing by another system
- You want to trigger webhooks or notifications