Skip to content

Read File

Type: read-file  ·  Package: Filesystem Activities v1.0.0  ·  Output: string

Reads the entire contents of a text file and returns it as a string. Use it to read .txt files, templates, logs, configurations or any plain text content.

Opens the file at the given path and returns all its contents as a single string. If the file does not exist, the activity fails. Save the result in an output variable.

ParameterEditorDescription
pathexpressionPath of the file to read.
ParameterEditorDescription
encodingtextFile encoding. By default "utf-8".

Returns a string with the contents of the file.

Read File path = = asset("plantilla_correo.txt") → output: plantilla
Set Variable name = cuerpo value = = replace(plantilla, "{nombre}", cliente.nombre)