KeyValue icon

KeyValue

Store and retrieve key-value pairs on the filesystem

Actions20

Record → Write

AI-generated

Summary

Write creates or overwrites a record (a file) within a specified directory under the key as the filename. Optionally, it prepends YAML frontmatter metadata including tags, description, and updated timestamp to the stored content.

Inputs

  • Directory Name (required) — Specifies the target directory (a subdirectory under ~/.n8n-keyvalue) where the record will be written.
  • Key (required) — The record key, used as the filename under the directory.
  • Value — The content to store in the record. Plain text is stored as-is; JSON objects or arrays are detected and stored as JSON string.
  • Frontmatter — Optional YAML frontmatter metadata to prepend to the file, including tags (comma-separated), description text, and an ISO 8601 updated timestamp (or current time if omitted).

Output shape

a single record with a JSON object

The output JSON includes the directory, key, the stored value (parsed JSON or string), and a 'written' flag set to true indicating success.

Examples

Example 1: Write a text record with frontmatter tags and description

Set Directory Name to 'my_directory', Key to 'record_key', Value to 'record value', and provide Tags and Description in Frontmatter.

Links

Discussion