> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fetchhive.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Data Store

> Give a workflow memory between runs, so it knows what it has already handled

Use the **Data Store** steps when a workflow needs to remember something from one run to the next. A scheduled workflow that reviews new signups every day can remember who it has already emailed. A workflow that reads a news feed can remember which articles it has already seen.

A data store is a named list of records. Each record has a key, such as an email address or a URL, and a value, which is a small piece of JSON. You don't create a store first. The first step that saves to a store name creates it.

Data Store steps cost 0 tasks.

## The five steps

Add these steps from the **Data Store** group in **Search steps...**.

| Step | What it does |
| - | - |
| **Only New Items** | Takes a list and returns only the items this workflow has not seen in an earlier run. It remembers them for next time. |
| **Save Record** | Saves a record under a key, or updates the record that is already there. |
| **Get Record** | Reads one record by its key and tells you whether it was found. |
| **Find Records** | Returns the records that match your filters. |
| **Delete Record** | Deletes one record by its key. |

Every step has a **Data store** field. Steps that use the same name in the same workspace share the same records, even across different workflows.

## Only New Items [#only-new-items](#only-new-items)

This is the quickest way to stop a workflow repeating itself. Put it right after a step that returns a list.

| Option | Required | Description |
| - | - | - |
| Data store | Yes | The name of the store that remembers the items. |
| Items | Yes | A variable that holds a list, such as `{{step_1.output.items}}`. Up to 1,000 items per run. |
| Field that identifies an item | No | The field that makes an item unique, such as `id`, `url` or `email`. Leave it empty when the items are plain text. |
| Delete after (days) | No | How long an item stays remembered. After that it counts as new again. Leave empty to remember items forever. |

Output:

| Field | Description |
| - | - |
| `items` | The items that are new. Use this list in the next steps. |
| `new_count` | How many items are new. |
| `seen_count` | How many items were left out because the workflow had seen them before. |

## Save Record [#save-record](#save-record)

| Option | Required | Description |
| - | - | - |
| Data store | Yes | The name of the store. |
| Record key | Yes | What identifies the record, such as `{{step_1.output.email}}`. |
| Value | No | JSON with the fields to remember, up to 64 KB. Variables are filled in when the step runs. |
| If the record already exists | No | **Replace it** makes the saved value exactly the new value. **Update its fields** adds or changes the fields you give and keeps the others. The default is **Replace it**. |
| Delete after (days) | No | Removes the record automatically after this many days. Leave empty to keep it. |

Output: `key`, `created` (`true` when the record is new, `false` when it was updated), `value` and `expires_at`.

## Get Record [#get-record](#get-record)

| Option | Required | Description |
| - | - | - |
| Data store | Yes | The name of the store. |
| Record key | Yes | The key to look up. |

Output: `found` (`true` or `false`), `key`, `value`, `created_at`, `updated_at` and `expires_at`. When nothing is found the step still succeeds, with `found` set to `false`, so a **Condition** step can branch on it:

```text theme={null}
{{step_2.output.found}}
```

## Find Records [#find-records](#find-records)

| Option | Required | Description |
| - | - | - |
| Data store | Yes | The name of the store. |
| Filters | No | A record is returned when it matches every filter. With no filters, every record is returned, up to the limit. |
| Order | No | **Oldest first**, **Newest first**, **Recently updated first** or **By key (A to Z)**. |
| Most records | No | Up to 500. The default is 50. |

A filter compares a top-level field of the saved value, such as `status`. Use `_key`, `_created_at` or `_updated_at` to filter on the record itself. Dates compare correctly when they are saved in ISO format, such as `2026-11-28` or `2026-11-28T09:00:00Z`.

Output: `count` and `records`. Each record has `key`, `value`, `created_at` and `updated_at`.

## Delete Record [#delete-record](#delete-record)

| Option | Required | Description |
| - | - | - |
| Data store | Yes | The name of the store. |
| Record key | Yes | The key to delete. |

Output: `key` and `deleted` (`false` when there was no such record).

## Live and draft records [#live-and-draft](#live-and-draft)

Every store has two separate copies:

* **Live** records are read and written by your deployed and scheduled runs, API runs and pipeline runs.
* **Draft** records are read and written by test runs in the workflow editor, including **Run** on a single step.

Testing a workflow in the editor doesn't change live records. So you can test a "have I emailed this person?" workflow as often as you like without marking real people as emailed.

## How do I see what a workflow has stored? [#data-stores-page](#data-stores-page)

Open **Tools** and choose **Data Stores**. Pick **Live** or **Draft**, choose a store, and you see its records. From there you can:

* Search records by key.
* Click **Add record** to add one by hand.
* Open the menu on a record to **Edit** or **Delete** it.
* Click **Delete store** to remove every record in the store.

This is the place to look when a workflow skipped something and you want to know why.

## Example

A workflow that runs every morning and emails each new signup once.

1. Add the step that fetches signups. It returns a list in `{{step_1.output.items}}`.
2. Add **Only New Items**. Set **Data store** to `Signups`, **Items** to `{{step_1.output.items}}` and **Field that identifies an item** to `email`.
3. Add the steps that write and send the email, using `{{step_2.output.items}}`.

On the first run every signup is new. On later runs only the signups that arrived since the last run come through.

To remember more than "seen", use **Save Record** after sending, with **Record key** set to the email address and a **Value** such as:

```json theme={null}
{
  "status": "emailed",
  "emailed_at": "{{_current_datetime}}"
}
```

Later, **Find Records** with the filter `status` **Equals** `emailed` returns everyone you have emailed.

## Limits

| Plan | Records the account can hold |
| - | - |
| Developer | 1,000 |
| Growth | 25,000 |
| Pro | 250,000 |

* The limit counts every record in the account, across all workspaces and both the live and draft copies.
* At the limit, steps can still read and update records. A step that adds a new record fails until you free up room.
* To free up room, delete records or stores you no longer need, or set **Delete after (days)** so records remove themselves.
* A value can be up to 64 KB. A key can be up to 512 characters.

## Notes

* A store name can use letters, numbers, spaces, dots, dashes and underscores.
* **RSS Feed** has its own **New items only** option. You don't need a Data Store step for that.
* If a step is retried after a failure, **Only New Items** returns the same items again for that run, so nothing is lost.

See also: [Condition](https://docs.fetchhive.com/workflows/steps/utility/condition.md), [Data Transform](https://docs.fetchhive.com/workflows/steps/utility/data-transform.md), [RSS Feed](https://docs.fetchhive.com/workflows/steps/web-research/rss-feed.md), and [Testing and Iteration](https://docs.fetchhive.com/workflows/testing-and-iteration.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.