Save Data
The Save Data action is used to save certain data into Flow's storage which can then be used by future flow runs. Saved data can be retrieved using the Fetch Data action by any flow within the same workspace.
Field | Description |
Group Name | The group name is used to represent a group of data items you would like to save and can be used in other calls when referencing the set of data |
Record Name | The record name represents the name of the record that the data would be saved under and could be a variable such as <userid> |
Time To Live | How long to keep the data row stored. You can enter @Forever to set an indefinite time while any other number would represent the number of minutes to keep the data stored before automatically deleting it. You can also use other helper functions here such as @1hour etc. Note that the row, record-group-key, is deleted after the set amounts of minutes, from the moment the row was first saved. So if set to 5 minutes, then the entire row will be deleted 5 minutes after the first save. |
Key | The name of the key to save the data under. You can set several Key,Value pairs using one Save Date stage. To create a rolling counter for X minutes, you must save using a unique value per row as the key and then query (query data stage) the count of rows in that group+record |
Value | The value for the provided key |
Let's take an example of how you can use group, record and key names to store your data efficiently. Assume you want to track the total deposits and total withdrawals made by a user you would set something like the following:
GroupName: Payment
RecordName: <UserId>
Key: Deposits
Value: <DepositAmount>
Key: Withdrawals
Value: <WithdrawalAmount>
Set the Time to live to @Forever to get lifetime values (from the first save)
To create a rolling counter instead:
GroupName: Payments_Deposits
RecordName: <UserId>
Key: @UnixMillis
Value: <DepositAmount>
Time to live: @7days
Then use a "query data" stage after this to get the last 7 days deposits for that userID