Skip to content
Docs

Store a File

Store a File puts a file into one of your workspace’s file stores. It either writes text you give it, or copies a file that already exists somewhere the workspace can reach: an inbound email attachment, or an object in another store. You find it on the node picker’s Storage shelf.

The node has one input handle and one output handle.

File stores are managed under Data → Files in the panel. A store is the container; the path you set in key is where the file lives inside it.

The source field decides what is written.

  • Text (text) writes the value of contents as the file’s bytes. Use it for anything a flow can render as a string: a generated report, a JSON payload, a rendered template.
  • A reference (reference) treats contents as the name of a file that already exists, and copies its bytes into this store. A flow cannot carry bytes through an expression, so filing an attachment that just arrived is something this node does rather than something you write.

A copy inherits the source file’s filename and mediaType unless you set them here. That inheritance matters: a copied invoice that lands as application/octet-stream is one nothing downstream can route.

The Store a File node's settings form, with the fields described below
The Store a File node's settings form, with the fields described below
FieldTypeDefaultDescription
File store (objectStoreId)string ✦ (required) — The file store to write into.
Key (key)string ✦ (required) — Where the file lives in the store, e.g. invoices/2026/08/inv-1042.pdf.
Source (source)one of text, reference ✦ (optional) text What to write: the text in the field below, or an existing file it names.
Contents (contents)string ✦ (optional) — The text to write, or the reference to copy from.
Filename (filename)string ✦ (optional) — The name a person sees when they download it. Defaults to the last segment of the path.
Media type (mediaType)string ✦ (optional) — The media type, e.g. application/pdf. Defaults to what the copied file declared; for text you write, it is worked out from the contents and the file name, so a .csv is recorded as text/csv.
Delete after (days) (expiresInDays)integer ✦ (optional) — Days until the file is deleted. Empty or 0 keeps it until someone deletes it.

Fields marked ✦ accept expressions.

Try this node — run it once against your own workspace, with your credentials, without building a flow first.

key is the path inside the store, for example invoices/2026/08/inv-1042.pdf. It is what you address the file by later, and it is unique per store. Renaming a file changes this value and nothing else, so a path is safe to reorganise.

filename is separate on purpose. It is metadata, used for the name a browser saves the file under, and it never has to be unique. Leave it empty and the last segment of key is used.

An object reference, wrapped in object:

{
"object": {
"id": "01K3...",
"storeId": "01K2...",
"versionId": "01K3...",
"key": "invoices/2026/08/inv-1042.pdf",
"filename": "inv-1042.pdf",
"mediaType": "application/pdf",
"sizeBytes": 48213,
"checksum": "9f86d0..."
}
}

Never the bytes. A node’s output is stored in the run log and carried in job payloads, so every file node in this family emits a reference and reads one.

Pass versionId downstream when the file must not change under a later step: an id means “whatever is current when you read it”, and a durable run may read it hours after this node wrote it.

Filing an attachment from an Email Trigger run:

  1. Set Source to reference.
  2. Set Contents to the attachment, for example {{ $start->attachments[0]->id }}.
  3. Set Key to where it belongs, for example inbox/{{ $start->from }}/{{ $start->attachments[0]->filename }}.
  4. Leave Filename and Media type empty so the attachment’s own are kept.
  • Writing is subject to the store’s max_object_bytes limit.
  • A path already in use is overwritten, producing a new version of the same file rather than a second file.
  • The node writes; it does not read. To get a file’s contents into flow data, use Read a File as Data or Read a File as Text.