TotalBase
Steps

Files

Read and create files, parse and generate CSV or JSON.

In the admin: Workflows › a Workflow › a step

The Files steps work with TotalBase's Files: read one, store a new one, turn a CSV or JSON file into data, or data into CSV or JSON.

StepDoesResult, as {{step.data}}
Read fileRead an existing file{ name, filename, mimeType, size, content }, the content in base64
Create fileStore content as a new file{ asset, name, mimeType, size }
Parse CSV / JSONTurn a file's content into datathe parsed data
Generate CSV / JSONTurn data into CSV or JSON text{ format, content }

Read file

Field
FileRequired. A file picked with Browse, or its id from another step: {{create_file.data.asset}}

The content comes back in base64, ready for a Create file with Encoding Base64, or for an HTTP request body.

Create file

Field
NameRequired. The file's name, with {{…}}
Content typeThe file's type, text/plain by default
FolderWhere the file is stored. None: the root
EncodingText, stored as UTF-8, or Base64, for binary content from another step, such as a PDF
ContentRequired. Text, or base64 when Encoding says so, with {{…}}

The file goes through the Files module like an upload: its type and size rules apply, and the executor is recorded as who created it. The new file's id is {{step.data.asset}}, which a Send email step attaches or a Create records step stores in a column.

Order completed stores the PDF it generated:

FieldValue
Name{{start.data.number}}.pdf
Content typeapplication/pdf
EncodingBase64
Content{{pdf.data.content}}

Parse CSV / JSON

Field
FileRequired. The file to read
Formatcsv or json

A JSON file becomes its value. A CSV file becomes a list of objects, one per line, keyed by the header row: standard CSV (RFC 4180), comma-separated, with a header row. Other delimiters aren't supported. A file that doesn't parse fails the step.

The list goes straight into a Create records step's Records ({{parse.data}}), or through a For each item when each row needs its own steps.

Generate CSV / JSON

Field
Formatcsv or json
DataThe value to write. CSV takes a list of objects, a column per key; anything else gives an empty CSV

It only produces text, in {{step.data.content}}; it stores nothing. Follow it with a Create file to keep the result, with Encoding Text.

Permissions

The steps act on files as the executor, under the same rules as the Files API (see Who can see a file):

StepNeeds
Read file, Parse CSV / JSONnothing for a public file; otherwise READ on files, within the executor's row filter
Create fileCREATE on files
Generate CSV / JSONnothing: it touches no file

A refusal fails the step with FILE_ACCESS_DENIED, checked before the content is read. An administrator executor, the Workflows system account included, has full access.

Keep binary content out of the history

A file's base64 content is part of a step's result, so a Detailed history would keep it in each step that carries it, up to the history size limit. Prefer passing a file's id between steps, and returning { "asset": "{{save_pdf.data.asset}}" } rather than the content itself.

Next steps