Write to Storage
Write to Storage saves text or a file from the run as an object in project storage.
Screenshot placeholder
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
| Field | What it does | Notes |
|---|---|---|
| Project | Whose storage access applies | Default 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 |
| Bucket | The bucket to write to | Placeholder e.g. run-files. Supports Jinja2. Buckets you can see appear as buttons you can click |
| Key | The object path | Placeholder runs/{{ run_id }}/job.log. {{ run_id }} and {{ workflow }} are available. Supports Jinja2 |
| Content | The text to write | Supports 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 type | The kind of content | Default text/plain |
| Content is base64 (binary file) | Decodes the content into a real file | Starts 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 overwriting | Off by default |
| Output key | Where the result is saved | Default 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).