Persist Data Component
Persist small amounts of data that will be available later in the execution or in subsequent executions of the Instance
Component key: persist-data
Description
The persist data component provides functionality to persist small amounts of data for use during an integration execution or in subsequent integration executions. This is helpful if you want to save a bit of data during an integration invocation for use in a later step, or in a subsequent execution.
For details on how to persist data between flow invocations, see the building integrations article.
Data can be persisted in three ways:
- For just the duration of the execution.
Data persists ephemerally for only as long as a flow runs.
You might use the
Execution -
actions, for example, as an accumulator in a loop. - Between executions of a specific flow.
Data persists between instance executions and is scoped for a specific flow.
One flow cannot access another flow's data.
The
Flow -
actions are handy for saving data from one flow's run, and referencing it in a subsequent run of that same flow. - Globally, for all flows in an instance.
Data persists between instance executions and is scoped for the entire instance.
The
Cross Flow -
actions let flows within an instance reference one another's persisted data.
When an execution starts, it loads persisted data from storage. When the execution finishes, it writes out its state to storage if any state was changed.
Note that if two executions run at the same time, the execution that finishes last will overwrite any state that the first execution wrote.
Viewing Persisted Data Usage
The Get Persist Data Usage Metrics action will yield the size of flow, cross-flow and integration-scoped persisted data in bytes.
Empty persisted data will yield a size of 2 bytes, which represents an empy object {}
.
The maximum amount of data you can persist is 64 MB (or 67108864 bytes).
Actions
Cross Flow - Add Value To Set
Add a value to the set with the specified key, creating the set as needed | key: addCrossFlowValueToSet
Input | Notes | Example |
---|---|---|
Key data / Required keyInput | This is the key that will be used to refer to the stored value | Example Key |
Value data / Required valueInput | This is the value that will be stored | Example Value |
Cross Flow - Append Value To List
Append a value to the list with the specified key, creating the list as needed | key: appendCrossFlowValueToList
Input | Notes | Example |
---|---|---|
Key data / Required keyInput | This is the key that will be used to refer to the stored value | Example Key |
Value data / Required valueInput | This is the value that will be stored | Example Value |
Cross Flow - Clear All State
Delete all cross-flow state stored for this instance | key: removeCrossFlowState
Cross Flow - Decrement Value
Decrement the stored integer value with the specified key by the specified amount | key: decrementCrossFlowValue
Input | Default | Notes | Example |
---|---|---|---|
Amount data amountInput | 1 | This is the amount that will be used for incrementing/decrementing | 1 |
Key data / Required keyInput | This is the key that will be used to refer to the stored value | Example Key |
Cross Flow - Get Value
Get the value with the specified key, returning the specified default value if key not present | key: getCrossFlowValue
Input | Notes | Example |
---|---|---|
Default Value data defaultValueInput | This is the value that will be returned if there is no value present | Example Default Value |
Key data / Required keyInput | This is the key that will be used to refer to the stored value | Example Key |
Example Payload for Cross Flow - Get Value
{
"data": "Example Saved Value"
}
Cross Flow - Increment Value
Increment the stored integer value with the specified key by the specified amount | key: incrementCrossFlowValue
Input | Default | Notes | Example |
---|---|---|---|
Amount data amountInput | 1 | This is the amount that will be used for incrementing/decrementing | 1 |
Key data / Required keyInput | This is the key that will be used to refer to the stored value | Example Key |
Cross Flow - List Keys
List all keys persisted at the cross-flow level | key: listCrossFlowKeys
Cross Flow - Remove Value
Remove the value with the specified key | key: removeCrossFlowValue
Input | Notes | Example |
---|---|---|
Dynamic Keys string Value List dynamicKeys | Use this input if you need to provide multiple keys. Please take note that this action favors this input instead of the regular key input, which it ignores. | key1, key2 |
Key data keyInput | This is the key that will be used to refer to the stored value | Example Key |
Cross Flow - Remove Value From List
Remove the value from the list with the specified key | key: removeCrossFlowValueFromList
Input | Notes | Example |
---|---|---|
Key data / Required keyInput | This is the key that will be used to refer to the stored value | Example Key |
Value data / Required valueInput | This is the value that will be removed | Example Value |
Cross Flow - Remove Value From Set
Remove the value from the set with the specified key | key: removeCrossFlowValueFromSet
Input | Notes | Example |
---|---|---|
Key data / Required keyInput | This is the key that will be used to refer to the stored value | Example Key |
Value data / Required valueInput | This is the value that will be removed | Example Value |
Cross Flow - Save Current Time
Save the current time in UTC using the specified key | key: saveCrossFlowCurrentTime
Input | Notes | Example |
---|---|---|
Key data / Required keyInput | This is the key that will be used to refer to the stored value | Example Key |
Cross Flow - Save Value
Save a value with the specified key for use at a later time | key: saveCrossFlowValue
Input | Notes | Example |
---|---|---|
Dynamic Values string Key Value List dynamicValues | Use this input if you need to provide multiple keys and values. Please take note that this action favors this input instead of the regular key/value inputs, which it ignores. | key1: value1, key2: value2 |
Key data keyInput | This is the key that will be used to refer to the stored value | Example Key |
Value data valueInput | This is the value that will be stored | Example Value |
Execution - Add Value To Set
Add a value to the set with the specified key, creating the set as needed | key: addExecutionValueToSet
Input | Notes | Example |
---|---|---|
Key data / Required keyInput | This is the key that will be used to refer to the stored value | Example Key |
Value data / Required valueInput | This is the value that will be stored | Example Value |
Execution - Append Value To List
Append a value to the list with the specified key, creating the list as needed | key: appendExecutionValueToList
Input | Notes | Example |
---|---|---|
Key data / Required keyInput | This is the key that will be used to refer to the stored value | Example Key |
Value data / Required valueInput | This is the value that will be stored | Example Value |
Execution - Clear All State
Delete all execution state | key: removeExecutionState
Execution - Decrement Value
Decrement the stored integer value with the specified key by the specified amount | key: decrementExecutionValue
Input | Default | Notes | Example |
---|---|---|---|
Amount data amountInput | 1 | This is the amount that will be used for incrementing/decrementing | 1 |
Key data / Required keyInput | This is the key that will be used to refer to the stored value | Example Key |
Execution - Get Value
Get the value with the specified key, returning the specified default value if key not present | key: getExecutionValue
Input | Notes | Example |
---|---|---|
Default Value data defaultValueInput | This is the value that will be returned if there is no value present | Example Default Value |
Key data / Required keyInput | This is the key that will be used to refer to the stored value | Example Key |
Example Payload for Execution - Get Value
{
"data": "Example Saved Value"
}
Execution - Increment Value
Increment the stored integer value with the specified key by the specified amount | key: incrementExecutionValue
Input | Default | Notes | Example |
---|---|---|---|
Amount data amountInput | 1 | This is the amount that will be used for incrementing/decrementing | 1 |
Key data / Required keyInput | This is the key that will be used to refer to the stored value | Example Key |
Execution - List Keys
List all keys persisted at the execution level | key: listExecutionKeys
Execution - Remove Value
Remove the value with the specified key | key: removeExecutionValue
Input | Notes | Example |
---|---|---|
Dynamic Keys string Value List dynamicKeys | Use this input if you need to provide multiple keys. Please take note that this action favors this input instead of the regular key input, which it ignores. | key1, key2 |
Key data keyInput | This is the key that will be used to refer to the stored value | Example Key |
Execution - Remove Value From List
Remove the value from the list with the specified key | key: removeExecutionValueFromList
Input | Notes | Example |
---|---|---|
Key data / Required keyInput | This is the key that will be used to refer to the stored value | Example Key |
Value data / Required valueInput | This is the value that will be removed | Example Value |
Execution - Remove Value From Set
Remove the value from the set with the specified key | key: removeExecutionValueFromSet
Input | Notes | Example |
---|---|---|
Key data / Required keyInput | This is the key that will be used to refer to the stored value | Example Key |
Value data / Required valueInput | This is the value that will be removed | Example Value |
Execution - Save Current Time
Save the current time in UTC using the specified key | key: saveExecutionCurrentTime
Input | Notes | Example |
---|---|---|
Key data / Required keyInput | This is the key that will be used to refer to the stored value | Example Key |
Execution - Save Value
Save a value with the specified key for use at a later time | key: saveExecutionValue
Input | Notes | Example |
---|---|---|
Dynamic Values string Key Value List dynamicValues | Use this input if you need to provide multiple keys and values. Please take note that this action favors this input instead of the regular key/value inputs, which it ignores. | key1: value1, key2: value2 |
Key data keyInput | This is the key that will be used to refer to the stored value | Example Key |
Value data valueInput | This is the value that will be stored | Example Value |
Flow - Add Value To Set
Add a value to the set with the specified key, creating the set as needed | key: addInstanceValueToSet
Input | Notes | Example |
---|---|---|
Key data / Required keyInput | This is the key that will be used to refer to the stored value | Example Key |
Value data / Required valueInput | This is the value that will be stored | Example Value |
Flow - Append Value To List
Append a value to the list with the specified key, creating the list as needed | key: appendInstanceValueToList
Input | Notes | Example |
---|---|---|
Key data / Required keyInput | This is the key that will be used to refer to the stored value | Example Key |
Value data / Required valueInput | This is the value that will be stored | Example Value |
Flow - Clear All State
Delete all flow state stored for this instance | key: removeInstanceState
Flow - Decrement Value
Decrement the stored integer value with the specified key by the specified amount | key: decrementInstanceValue
Input | Default | Notes | Example |
---|---|---|---|
Amount data amountInput | 1 | This is the amount that will be used for incrementing/decrementing | 1 |
Key data / Required keyInput | This is the key that will be used to refer to the stored value | Example Key |
Flow - Get Value
Get the value with the specified key, returning the specified default value if key not present | key: getInstanceValue
Input | Notes | Example |
---|---|---|
Default Value data defaultValueInput | This is the value that will be returned if there is no value present | Example Default Value |
Key data / Required keyInput | This is the key that will be used to refer to the stored value | Example Key |
Example Payload for Flow - Get Value
{
"data": "Example Saved Value"
}
Flow - Increment Value
Increment the stored integer value with the specified key by the specified amount | key: incrementInstanceValue
Input | Default | Notes | Example |
---|---|---|---|
Amount data amountInput | 1 | This is the amount that will be used for incrementing/decrementing | 1 |
Key data / Required keyInput | This is the key that will be used to refer to the stored value | Example Key |
Flow - List Keys
List all keys persisted at the flow level | key: listInstanceKeys
Flow - Remove Value
Remove the value with the specified key | key: removeInstanceValue
Input | Notes | Example |
---|---|---|
Dynamic Keys string Value List dynamicKeys | Use this input if you need to provide multiple keys. Please take note that this action favors this input instead of the regular key input, which it ignores. | key1, key2 |
Key data keyInput | This is the key that will be used to refer to the stored value | Example Key |
Flow - Remove Value From List
Remove the value from the list with the specified key | key: removeInstanceValueFromList
Input | Notes | Example |
---|---|---|
Key data / Required keyInput | This is the key that will be used to refer to the stored value | Example Key |
Value data / Required valueInput | This is the value that will be removed | Example Value |
Flow - Remove Value From Set
Remove the value from the set with the specified key | key: removeInstanceValueFromSet
Input | Notes | Example |
---|---|---|
Key data / Required keyInput | This is the key that will be used to refer to the stored value | Example Key |
Value data / Required valueInput | This is the value that will be removed | Example Value |
Flow - Save Current Time
Save the current time in UTC using the specified key | key: saveInstanceCurrentTime
Input | Notes | Example |
---|---|---|
Key data / Required keyInput | This is the key that will be used to refer to the stored value | Example Key |
Flow - Save Value
Save a value with the specified key for use at a later time | key: saveInstanceValue
Input | Notes | Example |
---|---|---|
Dynamic Values string Key Value List dynamicValues | Use this input if you need to provide multiple keys and values. Please take note that this action favors this input instead of the regular key/value inputs, which it ignores. | key1: value1, key2: value2 |
Key data keyInput | This is the key that will be used to refer to the stored value | Example Key |
Value data valueInput | This is the value that will be stored | Example Value |
Get Persist Data Usage Metrics
Get usage metrics for persisted data. Persisted data can total 64 MB. | key: getUsage
Example Payload for Get Persist Data Usage Metrics
{
"data": {
"flowStateBytes": 100,
"crossFlowStateBytes": 2,
"integrationFlowStateBytes": 50,
"totalBytes": 152,
"maxAllowedBytes": 67108864
}
}
Integration - Add Value To Set
Add a value to the set with the specified key, creating the set as needed | key: addIntegrationValueToSet
Input | Notes | Example |
---|---|---|
Key data / Required keyInput | This is the key that will be used to refer to the stored value | Example Key |
Value data / Required valueInput | This is the value that will be stored | Example Value |
Integration - Append Value To List
Append a value to the list with the specified key, creating the list as needed | key: appendIntegrationValueToList
Input | Notes | Example |
---|---|---|
Key data / Required keyInput | This is the key that will be used to refer to the stored value | Example Key |
Value data / Required valueInput | This is the value that will be stored | Example Value |
Integration - Clear All State
Delete all integration state stored for all instances of this integration | key: removeIntegrationState
Integration - Decrement Value
Decrement the stored integer value with the specified key by the specified amount | key: decrementIntegrationValue
Input | Default | Notes | Example |
---|---|---|---|
Amount data amountInput | 1 | This is the amount that will be used for incrementing/decrementing | 1 |
Key data / Required keyInput | This is the key that will be used to refer to the stored value | Example Key |
Integration - Get Value
Get the value with the specified key, returning the specified default value if key not present | key: getIntegrationValue
Input | Notes | Example |
---|---|---|
Default Value data defaultValueInput | This is the value that will be returned if there is no value present | Example Default Value |
Key data / Required keyInput | This is the key that will be used to refer to the stored value | Example Key |
Example Payload for Integration - Get Value
{
"data": "Example Saved Value"
}
Integration - Increment Value
Increment the stored integer value with the specified key by the specified amount | key: incrementIntegrationValue
Input | Default | Notes | Example |
---|---|---|---|
Amount data amountInput | 1 | This is the amount that will be used for incrementing/decrementing | 1 |
Key data / Required keyInput | This is the key that will be used to refer to the stored value | Example Key |
Integration - List Keys
List all keys persisted at the integration level | key: listIntegrationKeys
Integration - Remove Value
Remove the value with the specified key | key: removeIntegrationValue
Input | Notes | Example |
---|---|---|
Dynamic Keys string Value List dynamicKeys | Use this input if you need to provide multiple keys. Please take note that this action favors this input instead of the regular key input, which it ignores. | key1, key2 |
Key data keyInput | This is the key that will be used to refer to the stored value | Example Key |
Integration - Remove Value From List
Remove the value from the list with the specified key | key: removeIntegrationValueFromList
Input | Notes | Example |
---|---|---|
Key data / Required keyInput | This is the key that will be used to refer to the stored value | Example Key |
Value data / Required valueInput | This is the value that will be removed | Example Value |
Integration - Remove Value From Set
Remove the value from the set with the specified key | key: removeIntegrationValueFromSet
Input | Notes | Example |
---|---|---|
Key data / Required keyInput | This is the key that will be used to refer to the stored value | Example Key |
Value data / Required valueInput | This is the value that will be removed | Example Value |
Integration - Save Current Time
Save the current time in UTC using the specified key | key: saveIntegrationCurrentTime
Input | Notes | Example |
---|---|---|
Key data / Required keyInput | This is the key that will be used to refer to the stored value | Example Key |
Integration - Save Value
Save a value with the specified key for use at a later time | key: saveIntegrationValue
Input | Notes | Example |
---|---|---|
Dynamic Values string Key Value List dynamicValues | Use this input if you need to provide multiple keys and values. Please take note that this action favors this input instead of the regular key/value inputs, which it ignores. | key1: value1, key2: value2 |
Key data keyInput | This is the key that will be used to refer to the stored value | Example Key |
Value data valueInput | This is the value that will be stored | Example Value |