PROCESIO
OverviewPlatform ActionsIntegrations & DemosMarketplaceCustom ActionsDeveloperโ€™s Guide

File To String

Reads the whole content of a text file into a text variable.

File To String reads a file and gives you its content as text. Use it to read a .txt, .csv, .json, .xml or .html file that a user uploaded or that another action produced, so that you can parse it or send it further.

Add the action

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

The File To String action properties: File, Encoding and Content

Inputs and outputs

FieldDirectionTypeRequiredWhat to put / what you get
FileInputFileYesThe file to read.
EncodingInputOptionYesThe character set the file was saved in. Default UTF8. Also: UTF32, ASCII, Unicode (UTF-16), BigEndianUnicode, Latin1 and Windows code pages 1250โ€“1258.
ContentOutputTextYesThe content of the file.

Example

A file hello.txt saved as UTF-8 with the lines Hello, PROCESIO! and Second line ฤƒรฎศ™:

EncodingContent
UTF8Hello, PROCESIO! and Second line ฤƒรฎศ™ on two lines
Latin1Hello, PROCESIO! is right, but each letter with a diacritic turns into two other characters (รฎ becomes รƒยฎ)

Good to know

  • Pick the encoding the file was saved in. A wrong choice does not fail the step; it only gives wrong characters.
  • A byte order mark (BOM) at the start of the file is recognised and not included in Content.
  • Line breaks are kept as they are in the file.
  • The action is meant for text. A binary file (PDF, image, Excel, zip) gives unreadable text; use File To Base64 to carry such a file as text.
  • To turn the text into an object, follow with a JSON action. To read several files at once, use Read Files Content.

On this page