Skip to main content

Write File

Writes text, a value as JSON, or a copy of another file to a new file, and outputs a reference to it, so a later step can read it back, attach it, or send it on. Reach for it to produce a report, an export, or a file another system expects as an upload—or to bring a file that only exists behind a URL into storage.

Fields

FieldDescription
File NameThe file's name, with extension—report.csv, payload.json. Variables can be mixed in to name the file after the data it holds.
ContentWhat to write. Text is written as typed. An object or list bound from an earlier step is written as JSON. A file bound from an earlier step is copied, streamed from wherever it lives.
Content TypeThe file's MIME type. Pick one of the common types offered, type any other, or bind one from an earlier step—the type an HTTP response came back with, say, when a loop writes one file per item. Left blank, it is the source file's type for a copy, application/json for an object or list, else guessed from the file name's extension, else text/plain.

What later steps see

OutputDescription
FileThe written file, as a file reference—its Storage, Path, Content Type, Metadata, and Public URL, a URL the file can be fetched from where the storage offers one. Shown in the variable picker as a file, and what a step with a file input, such as Read File, binds to.
Size (bytes)How many bytes were written.
File NameThe name the file was written under.

Behaviour

Text is written as UTF-8. The file is stored under the automation's own prefix in the site's storage and is deleted when the run that wrote it is archived, so a file exists for as long as its run's history does and no longer.

Was this page helpful?

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.