Skip to main content

Persist Data Component

Persist small amounts of data that will be available in subsequent executions

Component key: persist-data

Description#

The persist data component provides functionality to persist small amounts of data between integration executions. This is helpful if you want to save a bit of data during an integration invocation, and use that data in a subsequent execution.

For details on how to persist data between integration invocations, see the building integrations article

Persisted data is scoped per-instance

Persisted data is scoped per-instance. So, the same integration deployed to two different customers would have two distinct state stores. One instance is not able to read from the other instance's persisted data.

Actions#

Add Value To Set#

Add a value to the set with the specified key, creating the set as needed, return the set | key: addValueToSet

InputKeyNotesExample

Key

data
/ Required
keyInputThis is the key that will be used to refer to the stored valueExample Key

Value

data
/ Required
valueInputThis is the value that will be storedExample Value

Output Example Payload#

{  "data": {    "exampleKey": null  },  "state": {}}

Append Value To List#

Append a value to the list with the specified key, creating the list as needed, and return the list | key: appendValueToList

InputKeyNotesExample

Key

data
/ Required
keyInputThis is the key that will be used to refer to the stored valueExample Key

Value

data
/ Required
valueInputThis is the value that will be storedExample Value

Output Example Payload#

{  "data": [    "Example Value 1",    "Example Value 2"  ],  "state": {}}

Get Value#

Get the value with the specified key, returning the specified default value if key not present | key: getValue

InputKeyNotesExample

Default Value

data
defaultValueInputThis is the value that will be returned if there is no value presentExample Default Value

Key

data
/ Required
keyInputThis is the key that will be used to refer to the stored valueExample Key

Output Example Payload#

{  "data": "Example Saved Value"}

Remove Value#

Remove the value with the specified key and return the value | key: removeValue

InputKeyNotesExample

Key

data
/ Required
keyInputThis is the key that will be used to refer to the stored valueExample Key

Remove Value From List#

Remove the value from the list with the specified key and return the list | key: removeValueFromList

InputKeyNotesExample

Key

data
/ Required
keyInputThis is the key that will be used to refer to the stored valueExample Key

Value

data
/ Required
valueInputThis is the value that will be storedExample Value

Output Example Payload#

{  "data": [    "Example Value 1"  ],  "state": {}}

Remove Value From Set#

Remove the value from the set with the specified key | key: removeValueFromSet

InputKeyNotesExample

Key

data
/ Required
keyInputThis is the key that will be used to refer to the stored valueExample Key

Value

data
/ Required
valueInputThis is the value that will be storedExample Value

Output Example Payload#

{  "data": {    "exampleKey": null  },  "state": {}}

Save Current Time#

Save the current time in UTC using the specified key and return it | key: saveCurrentTime

InputKeyNotesExample

Key

data
/ Required
keyInputThis is the key that will be used to refer to the stored valueExample Key

Output Example Payload#

{  "data": "2021-03-06T18:52:59.370Z",  "state": {}}

Save Value#

Save a value with the specified key for use at a later time and return it | key: saveValue

InputKeyNotesExample

Key

data
/ Required
keyInputThis is the key that will be used to refer to the stored valueExample Key

Value

data
/ Required
valueInputThis is the value that will be storedExample Value

Output Example Payload#

{  "data": "Example Saved Value",  "state": {}}