Key/Value
Store and retrieve key/value records inside the current site environment.
Use this Node when you need to keep a simple lookup table in Flowgear, such as matching a source system identifier to the corresponding identifier in a target system.
Revision History
0.0.0.3 - Current release.
Setup Notes
You can add this Node to a Workflow without configuring authentication or external access.
- Key/value records are scoped to the current site environment. A record written in one environment is not available in another environment, unless you write it there as well.
- Use
Groupto separate unrelated records. For example, you might use one group for customer IDs and another for invoice numbers. - Use stable
Groupnames so you can reuse the same lookup set across multiple Workflows. GroupandKeyare required and each can be up to 1000 characters long.- Values are stored as text. The maximum value size is 32 KB.
Methods
This Node provides two methods:
Set
Use Set to create or update one or more key/value records in a group.
Each item includes a Key, Value, and optional Status. If you do not provide a Status, the Node stores Unknown.
| Parameter | Type | Description |
|---|---|---|
Group |
String | The name of the group that the records belong to. |
Items |
Array | The collection of records to create or update. Each item includes Key, Value, and optional Status. |
Items.Key |
String | The key to create or update. This value is required and can be up to 1000 characters long. |
Items.Value |
String | The value to store for the key. The maximum size is 32 KB. |
Items.Status |
String | Optional status metadata for the record. If omitted or blank, the Node stores Unknown. |
This method does not return any output values.
Get
Use Get to retrieve the latest value each key in a group whose stored tiemstamp falls within a specified range.
DateFrom and DateTo are inclusive. DateFrom must be earlier than or equal to DateTo.
| Parameter | Type | Description |
|---|---|---|
Group |
String | The group to query. |
DateFrom |
DateTime | The inclusive start of the date range to query. |
DateTo |
DateTime | The inclusive end of the date range to query. |
| Return | Type | Description |
|---|---|---|
Items |
Array | The latest matching record for each key in the group, returned in key order. |
Items.Key |
String | The key for the returned record. |
Items.Value |
String | The stored value for the key. |
Items.Status |
String | The status stored with the key. |
Items.Timestamp |
DateTime | The UTC date and time when the record was written. |
Usage Notes
- If you write the same
Keymore than once,Getreturns the latest matching record for that key in the requested date range. - Use the
Statusfield as lightweight metadata when you want to track the state of a record alongside the stored value. - The date range filter is based on the stored UTC timestamp. Use UTC-aware values for
DateFromandDateTowhen you need precise results.
Examples
Store source and target identifiers
After a Workflow creates a record in a target system, use Set to store the source record ID as the Key and the target record ID as the Value.
Later, use Get to look up the latest stored target ID before you send an update.
Track the latest status for a record
Use Set to store the same Key with a new Value or Status each time processing changes.
Use Get with a suitable date range when you need the latest stored state for each key in the group.
Known Issues
Getcannot read legacy compressed values. If a compressed value is encountered, the method fails instead of returning that record.