This activity is used to read contents of a text file.
Similar to other activities related to reading files, an 'Assign value to variable' action block connected to this block will also appear upon adding this block to the workflow. This variable will store the contents of the read file.
However, using the 'Assign value to variable' activity is not strictly necessary in this case. It is safe to delete this block and handle the result any other way. For example, if you want to send the content of the text file in an email 'as is', i.e. without changing the content in any way then you could use the 'Send email' activity right after 'Read text file' and specify the Save the previous step result option in the Body parameter.
The file size must not exceed 2 Gb.
This activity has two parameters: File type and Path. Both of them are required.
Speaking of File type, there are two options. You can either choose any common text tile format such as .txt, .log, .ini and others or JSON format.
File type parameter
The Path parameter lets you define the location of the file you are going to read. As usual, it can be set manually, dynamically or by saving the previous step result. Also, you can specify the needed file using Explorer by clicking the 'Pick' button.
Let us have a look at how the read text is represented. In this case we used 'Assign value to variable' action.
This is the source file we used for an example.
An example of a file to read
And this is how its contents are displayed in the variable.
The text from the file is written into this variable
A few notes about JSON format.
This is how a simple JSON file can look like in a variable.
The source JSON file
The variable with the file contents