跳转到内容
Agentic Workflowdocs
v0.8.2免费安装

节点 / builtin / core

Data Store

Remember values between workflow runs

核心 扩展程序网页应用

此内容尚不支持你的语言。

Remember values from one run of a workflow to the next.

工作流 · price-on-page-watch.awf 6 个步骤

Price On Page Watch:包含 6 个步骤的工作流,从 When the price changes 开始,到 Remember this price 结束。

Every other node starts each run knowing nothing. Data Store keeps named values (keys) that survive between runs, so “only tell me what changed”, “carry on from the page I stopped at” and “stop after N calls” become possible. Pick one of six Operation choices:

  • Get: read a key.
  • Set: store Value under a key, replacing what was there.
  • Delete: remove a key.
  • Increment: add Increment By to a number. A key that does not exist yet starts at 0, so a counter needs no setup step.
  • List keys: return every key in the current scope.
  • Clear all: remove every key in the current scope.

Scope decides who sees the keys. This workflow only (the default) keeps them private to this workflow. Shared with all workflows lets every workflow you own read and overwrite them.

Values are stored in this browser profile and work without an account. Nothing is sent anywhere: the same workflow on another device has its own separate store, and clearing the extension’s data clears these entries too.

  • Keep the last-seen ID or timestamp so a watcher only reports new items.
  • Save a page cursor to resume a paginated source on the next run.
  • Count calls across runs, for example to stop after 100 requests a day.
  • Share one setting between several workflows with the shared scope.

To remove duplicates across runs without building it yourself, Remove Duplicates already uses the Data Store. For values that only matter during one run, use Set Variable.

设置项类型作用
Operation ChoiceWhat to do to the store. Options: Get, Set, Delete, Increment, List keys, Clear all. 默认值:Get
Scope ChoiceWhich keys this node can see. Options: This workflow only, Shared with all workflows. 默认值:This workflow only
Key TextName of the value to store or read.
Value ValueThe value to store. Used by Set.
Value Format ChoiceHow to read text typed into Value. Options: Text, Number, True / false, JSON. 默认值:Text
Increment By NumberHow much to add. Use a negative number to count down. 默认值:1
  • Key is needed by every operation except List keys and Clear all. Up to 512 characters.
  • Value Format only applies to text typed into Value. A value that comes from an expression, such as {{ $input.id }}, is stored as it already is (a number stays a number, an object stays an object).
  • Limits per scope: 500 keys, 128 KB per value, 5 MB in total. Nothing is ever removed to make room; the node fails with a message instead.
  • Output

The output depends on the operation:

  • Get: { key, found, value }. found tells a missing key apart from a stored null; branch on found, not on value.
  • Set: { key, value } with the stored value.
  • Delete: { key, deleted }, where deleted says whether there was a value to remove.
  • Increment: { key, value } with the new total.
  • List keys: one item per key, each { key, value, lastModified }.
  • Clear all: { cleared }, the number of keys removed.

Open the Stored data tab in the canvas side panel, with the database button in the canvas controls or View stored values in a Data Store node’s settings. It lists every key this workflow stored, with its value, type and last change, and lets you Delete one key or Clear all (useful to make a watcher alert again). It refreshes after each run and has a refresh button for background runs. It appears once the workflow is saved and has a Data Store node, or still has stored keys.

Keys in the shared scope are managed in Settings → Preferences → Data store, where you can also view and clear all stored values.

None. This node needs no connection and has no slots for other nodes.

Get notified only when an API returns a new latest item:

  1. Schedule trigger, every hour.
  2. Http Request, GET https://api.example.com/latest.
  3. Data Store, Operation Get, Key last-seen-id.
  4. IF: {{ $('Http Request').data.id }} is not equal to {{ $input.value }}.
  5. On true: Browser Notification, then Data Store, Operation Set, Key last-seen-id, Value {{ $('Http Request').data.id }}.
  • “The get operation needs a key.” (or set, delete, increment). Key is empty or only spaces. Fill it in.
  • “This node is scoped to the current workflow but no workflow is running.” You tested the node on its own. Run the whole workflow, or switch Scope to Shared with all workflows.
  • “Value “…” is not a number. Change the value, or the value format.“ Value Format is Number (or True / false, or JSON) but the typed text does not match. Fix the text or pick Text.
  • “This store already holds 500 keys, the maximum allowed.” or a byte-limit message. Delete keys you no longer need, from the Stored data tab or with Delete.
  • An imported or copied workflow does not see the old keys. Keys in This workflow only belong to the original workflow. Use the shared scope for values several workflows must read.
Get an alert when a price on a page drops 中级 · 8 分钟 无需设置
编辑此页

最近更新:

Was this page useful?
向 Aria 询问“Data Store”