A Singapore Government Agency Website

Storage

Beta Feature: This node is currently in beta. Features and functionality may be subject to changes.

The Storage Node allows you to persist and retrieve file data across workflow executions within the same project. It stores files as base64-encoded data and makes them accessible to subsequent workflows by filename path.

Supported operations:

  • Deposit — Save a file (base64-encoded) into project-scoped storage under a given filename path
  • Retrieve — Fetch the most recently deposited version of a file by filename path

How Does It Work?

The Storage Node operates at the project level — files are scoped to the namespace and project of the executing workflow. A deposit stores the file and records its metadata (filename, file size). A retrieve looks up the latest deposited version of that filename and returns its content.

Setup Steps:

  1. Build your workflow using Graph Edit Mode (minimum setup: input node → storage node → output node, but you can add more nodes as needed)
  2. Click on the storage node settings to open its configuration
  3. Select the Operation (Deposit or Retrieve)
  4. Enter the Filename — this is the path used to identify the file in storage (e.g., reports/summary.pdf or data.json)
  5. For Deposit: provide the base64Data field with the base64-encoded file content

Deposit

Saves a file into project-scoped storage. The filename can include path segments (e.g., folder/subfolder/file.csv) to organise files logically.

Output:

{
  "filename": "reports/summary.pdf",
  "fileSizeBytes": 204800,
  "mimeType": "application/pdf",
  "storageId": "cm1abc123...",
  "base64Data": "<<base64-encoded-file-data>>"
}

Retrieve

Fetches the most recently deposited version of a file matching the given filename path within the same project. If no matching deposit exists, the node returns empty values.

Output:

{
  "base64Data": "<<base64-encoded-file-data>>",
  "filename": "summary.pdf",
  "fileSizeBytes": 204800
}

Note: The filename in the retrieve output is the leaf filename only (e.g., summary.pdf), not the full path used to deposit.

Filename Path Rules

The filename field accepts a path string that identifies the file in storage. The following rules apply:

  • Must not be empty
  • Maximum length of 1024 characters
  • Must not contain control characters
  • Must not contain . or .. path segments
  • Must not end with / — the final segment must be a filename
  • A leading / is accepted and stripped automatically
  • Consecutive slashes (e.g., folder//file.txt) are collapsed to a single slash

Valid examples:

reports/monthly/summary.pdf
data.json
invoices/2024/invoice-001.pdf

Invalid examples:

folder/../secret.txt   ❌ ".." segment not allowed
documents/             ❌ must not end with "/"

Examples

Depositing a Generated Report

This example saves a PDF report generated by a previous node into storage for later retrieval.

Node Settings

  • Operation: Deposit
  • Filename: reports/monthly-summary.pdf
  • base64Data: {{{ pdfNode.base64Data }}}

Output:

{
  "filename": "reports/monthly-summary.pdf",
  "fileSizeBytes": 51200,
  "mimeType": "application/pdf",
  "storageId": "cm1abc123xyz",
  "base64Data": "<<base64-encoded-pdf-data>>"
}

Retrieving a Previously Deposited File

This example fetches the latest version of a file that was previously deposited.

Node Settings

  • Operation: Retrieve
  • Filename: reports/monthly-summary.pdf

Output:

{
  "base64Data": "<<base64-encoded-pdf-data>>",
  "filename": "monthly-summary.pdf",
  "fileSizeBytes": 51200
}

If no matching file has been deposited, the node returns:

{
  "base64Data": "",
  "filename": "",
  "fileSizeBytes": 0
}

Simulation Behaviour

During simulation:

  • Deposit returns a mock output with storageId: "simulated". The file is not persisted.
  • Retrieve returns a mock base64 payload (aGVsbG8=, which decodes to "hello") since the depositing is not available during simulation.

When to Use It?

Use Storage Node when:

  • You need to persist a generated file (e.g., a report or export) and retrieve it in a later workflow execution.
  • You want to share file data across multiple workflows within the same project.
  • You are building a pipeline where one workflow deposits a file and another retrieves and processes it.
  • You need to store intermediate file artifacts for audit, reporting, or downstream integrations.
Chat with me!
Bot Launcher