Automation Action – Embedded Value Store | ThinkAutomation
Automation Action: Embedded Value Store
Save and retrieve a dictionary of key value pairs using the embedded DB.
Used within ThinkAutomation’s workflow automation software, the Embedded Value Store enables automated processes to save and retrieve simple values such as statuses, dates, preferences and reference information without requiring an external database.
Store and Retrieve Values Between Automated Workflows
The Embedded Value Store provides a simple way to retain information that needs to be available between automation executions. Values can be stored against a unique key and retrieved whenever another workflow needs them, without configuring a separate database.
For example, an email address could be used as a key with a value indicating whether the contact is subscribed to a newsletter. When another automation processes that email address, it can retrieve the stored value and use it to determine what happens next.
Get, Set and Delete from a dictionary of key/value pairs using the embedded document database. This action enables you to store any number of key/value pairs against a Collection Name. Values can later be retrieved by their key. You can store any sort of text data for the value. Keys can be any text, up to 1024 characters. For example: You could use a collection called ‘subscribed’ and use email addresses as keys – with the value set to Yes or No. Then do a simple lookup in any of your Automations to see if an email address is subscribed to a newsletter.
Collection Name
Key/value pairs are contained within a Collection. Multiple collections can be used. Collection names can contain letters or numbers only. Key/value pair collections are global to the ThinkAutomation instance (IE: The same collection can be used on all Solutions/Automations).
Operations:
Set
Add or update a key/value pair within the Collection. Specify the Key and Value (both can contain %variable% replacements). If the key already exists then its value will be updated, otherwise a new key/value pair will be created. The Assign To variable will receive the key value (or blank if an error occurred). You can use the Add Now button to manually add key/value pairs.
You can optionally set an Expires After value in seconds. If an expires after value is specified then any Get operation with the same key will return a blank value if the value was set or updated more than the Expires After seconds ago. This is useful when implementing caching. Leave at zero for never expire.
Get
Retrieve an existing value. Specify the Key. The Assign To variable will receive the value – or be set to blank if key does not exist (or has expired).
Delete
Delete an existing value. Specify the Key to delete. The Assign To variable will receive the key value – or blank if the key does not exist. You can use the Delete Now button to manually delete keys.
Drop
Removes all key/value pairs from the specified Collection Name. The Assign To variable will receive the collection name – or blank if the collection does not exist. You can use the Drop Now button to manually drop the collection (all key/value pairs in the collection will be deleted).
Get All
Get all key/value pairs in the specified Collection Name. You can specify a Limit to limit the number of key/value pairs returned. You can also Sort by Key or Value. You can Return Keys, Values or both (in CSV format). The Assign To variable will receive the returned keys/values (one per line). You can use the returned data in a For Each.. Line In loop if you need to perform actions on each value returned.
Get Count
Get the total number of keys for the specified Collection Name. The Assign To variable will receive the count.
Find
This operation allows you to return all Keys, Values or both where the keys Starts With, Ends With or Contains the specified Where Key text. You can specify a Limit to limit the number of key/value pairs returned. You can also Sort by Key or Value. You can Return Keys, Values or both (in CSV format). The Assign To variable will receive the returned keys/values (one per line). You can use the returned data in a For Each.. Line In loop if you need to perform actions on each value returned.
Embedded Value Store or Embedded Data Store?
Use the Embedded Value Store when you simply need to associate a value with a key, such as an email address, ID or reference number. Where an automation needs to store and query more complex structured JSON data, the Embedded Data Store provides a more suitable built-in database solution
This is one action from over 180 actions included with ThinkAutomation. The ThinkAutomation business process automation (BPA) solution is designed to automate on-premises and cloud-based business processes that are triggered from incoming messages. Automate messages received by email, database updates, webhooks, web forms, web chat, SMS messages, Twitter, Teams messages, documents, local files and other messages sources. Create any number of workflow automations using the drag-and-drop low-code designer. Simple fixed pricing, with unlimited message processing reduces overall costs compared to hosted automation solutions.You can also extend ThinkAutomation by creating your own custom automation actions using the built-in designer and C#/VB.net code editor.