PROCESIO
OverviewPlatform ActionsIntegrations & DemosMarketplaceCustom ActionsDeveloperโ€™s Guide

List To File

Writes the items of a list one after another into a new file.

List To File writes every item of a list into one new file. Use it to build a text file, a log or a simple export line by line from a list you built in your process.

Add the action

In the Process Designer toolbox, open Documents and pick List To File (or type List To File in the search box).

The List To File action properties: Object List, Filename, Encoding, Line Ending and File

Inputs and outputs

FieldDirectionTypeRequiredWhat to put / what you get
Object ListInputList of Object (JSON) or TextYesThe items to write.
FilenameInputTextYesThe file name with an extension, for example lines.txt.
EncodingInputOptionYesThe character set of the file. Default UTF8. Also: UTF32, ASCII, Unicode (UTF-16), BigEndianUnicode, Latin1 and Windows code pages 1250โ€“1258.
Line EndingInputOptionYesWindows (CRLF) (default), Unix (LF) or Mac (CR).
FileOutputFileYesThe new file.

Example

Object ListFilenameContent of File
["a","b","c"]list.txtabc
["a\n","b\n"] (each item ends with a line break), Line Ending Windows (CRLF)lines.txta and b on two lines, CRLF line breaks
[{"id":1},{"id":2}]list.jsonThe two objects as indented JSON, written one right after the other
[]e.txtThe step fails: "Input error: Input list is null or empty."

The items are written one right after the other, with no separator. To get one item per line, add a line break at the end of each item before you call the action. A list of objects does not become a JSON array; to save a list as valid JSON, use Object To File with the whole list, or Export To CSV for a table.

Good to know

  • Empty (null) items are skipped.
  • Line Ending converts the line breaks inside each item to the style you pick.
  • ASCII and the Windows code pages replace the characters they do not have with ?.
  • A file name without an extension makes the step fail with "Input error: File name must contain a valid extension.".

On this page