Key-Value Storage (Read) Block
Read values from key-value storage in Scout workflows
The Key-Value Storage (Read) block enables users to retrieve values stored in key-value storage within Scout workflows. This block is essential for accessing stored data, such as user-specific or session-specific information, which can be utilized in subsequent workflow steps.
Configuration (Required)
Key to store the value under. This is the same key you will use to retrieve the value later. This field supports Jinja templating for dynamic key construction.
Output the value as this type. You can use json
for both objects and lists. The default value is text
. Allowed values include:
bool
number
json
text
Outputs
The block outputs the retrieved value from key-value storage, coerced to the specified output type. This output can be used in subsequent workflow steps to facilitate further data processing or integration.
Usage Context
Use this block to access data stored in key-value storage, which can be used in subsequent workflow steps. It is ideal for scenarios where stored data needs to be accessed and utilized within a workflow.
Best Practices
- Ensure the key is correctly formatted and matches the stored key: Proper key formatting ensures successful data retrieval.
- Choose the appropriate output type to match the expected data format: Selecting the correct output type ensures that the retrieved data is in the desired format for further processing.
- Handle potential errors if the key does not exist or the value cannot be coerced to the desired type: Implement error handling to manage cases where the key is missing or the value cannot be converted to the specified type.