Skip to main content

Store - App storage data (store)

Learn about app storage and how to use it in your apps.


Store is a JSON object that stores and persists the states of data on app level and is referenced with store. Data added to store can be re-used by any future executions of actions and workflows in that app.

Store persists data as a collection of key-value pairs, where each unique key is associated with a value typed string, number, boolean, array or map.

store object is empty when you add a new app. It is built through executed functions in the actions of that app. As you add new data to store, that data becomes accessible by the future executions of actions and workflows in that app.

Adding data to store

To add data to app storage, use .put() method in a function as below:

store.put('key','value')

key is a string, while value can be string or a JSON object. You can construct the key and its value from that action's components.

If you dynamically refer to a component, the value that is put into the store is the value that component takes while the action is running. For example, if you refer to an input, the value given to that input is put into the store at action execution.

Caution

Adding a function and adding that function to run steps is the only way to add data to store. .put() method is not executed when written in double curlies — {{ }} and your action throws an error once it is executed.

If you add multiple data to an app's store with the same key, it takes the value on the last executed function-- whether or not functions are added to the same or different actions in the same app.

Multiple data with the same key

Assume that

  • MyFunction includes store.put('myKey','myValue').
  • And MyNewFunction includes store.put('myKey','myNewValue').
  • And MyNewFunction is executed after MyFunction.

The value of myKey becomes myNewValue at function execution, any previous value is overwritten.

Getting data from store

To get data from app store, use .get() method as below:

store.get('key')

The data in an app's store can be accessed by any action and workflow in that app. You can access it through a function or when written in double curlies — {{ }}.