Docs
Sign in

Write to Storage

Write to Storage saves text or a file from the run as an object in project storage.

Screenshot to add: The Write to storage settings panel with project, bucket, key, content and the two toggles.

When to use it

Use it to keep something your workflow produced, such as a log, a report or a PDF. The node holds no credential or URL. It writes as whoever ran the workflow, using the same storage access that person has in the storage browser. If that user's project has no write access to the bucket, the node fails and nothing is written.

Settings

FieldWhat it doesNotes
ProjectWhose storage access appliesDefault follows the workflow's project, or the running user's personal project if the workflow has none. The running user must belong to it. A stored file shows in the run page's Documents tab through this project
BucketThe bucket to write toPlaceholder e.g. run-files. Supports Jinja2. Buckets you can see appear as buttons you can click
KeyThe object pathPlaceholder runs/{{ run_id }}/job.log. {{ run_id }} and {{ workflow }} are available. Supports Jinja2
ContentThe text to writeSupports Jinja2, for example {{ webhook_payload.log }}. For a binary file, the base64 of its bytes. Up to 2 MB of text (about 1.5 MB of file when base64)
Content typeThe kind of contentDefault text/plain
Content is base64 (binary file)Decodes the content into a real fileStarts on for any content type that is not text, JSON, CSV, XML or YAML. Invalid base64 fails the node
Replace the object if the key already exists (otherwise the node fails)Allows overwritingOff by default
Output keyWhere the result is savedDefault stored_object

If the project resolves to a personal one, the panel shows a warning that personal projects have no storage.

Inputs and outputs

  • Input: one connection at the top.
  • Output: one connection at the bottom. Later nodes can read {{ stored_object.bucket }} and {{ stored_object.key }} (using your own output key), and {{ stored_object.project_id }} for a Job node's stored object file.
  • The card shows bucket/key, or "Choose a bucket and key" until they are set.

Example

Illustrative. Set Bucket to a bucket you can write to, Key to runs/{{ run_id }}/summary.txt, and Content to the text from an earlier node. Every run then saves its own file.

Tips

  • Include {{ run_id }} in the Key so runs do not clash.
  • Leave the replace option off unless you want the node to overwrite.
  • For a PDF or image, set the right Content type and turn on Content is base64 (binary file).