---
sourceDocument: Yokohama ServiceNow AI Platform Capabilities
sourceDocumentLink: https://www.servicenow.com/docs/r/yokohama/servicenow-platform

 Release :

    - yokohama

ft:locale :

    - en-US

ft:publication_title :

    - Yokohama ServiceNow AI Platform Capabilities

ft:clusterId :

    - platcap

bundleId :

    - platcap

workflow :

    - Platform


---

# File Read activity

# File Read activity {#ariaid-title1}

* Release version: Yokohama
* 
* Updated January 30, 2025
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

The File Read activity reads a file on a Linux or UNIX computer.
This activity replaces an SSH activity by the same name available
in releases prior to Geneva. If you have a workflow created in a previous version that uses
the deprecated activity, your workflow will continue to work normally after upgrading to
Geneva. However, all new workflows must use the custom version of this activity. This
activity was built with the [SSH activity designer template](https://www.servicenow.com/docs/Voy9bPRPpW7WXHb_WtSf9w#t_CreateAnSSHActivity "Create an activity that extracts data from a target host that uses the SSH network protocol."), which gives workflow administrators the ability to
store input and output variables in the [databus](https://www.servicenow.com/docs/PrNTwrqX9mIH_QHC_03Elg#t_ReuseDataInTheActivityDesigner "The Data tab in the Workflow Editor lists all custom activities used in the current workflow that produce data and displays that data for reuse in other custom activities.").

To access this activity in the Workflow Editor, select the
Custom tab, and then navigate to Custom ActivitiesGlobalOrchestration - SSH.

## Input variables

{#r_FileReadActivity__table_mhb_stz_zp__entry__2}

| Input variable | Description |
|-|-|
| Hostname | Hostname or IP address of the destination server for SSH activity. |
| Directory | Name of the working directory. |
| File | The name of the file to read. |
[Table 1. File read input variables]

{#r_FileReadActivity__table_mhb_stz_zp}

## Output variables

{#r_FileReadActivity__table_uwg_qp5_2s__entry__2}

| Output variable | Description |
|-|-|
| contents | Content of the file to read. |
| result | Either success or failure. |
| errorMessage | The executionResult.errorMessages from the [Activity designer parsing sources](https://www.servicenow.com/docs/5fX1CXeRKshOet1fu0DglA#r_ActivityDesignerParsingSources "This table lists the parsing sources available with each execution template."). |
[Table 2. File read output variables]

{#r_FileReadActivity__table_uwg_qp5_2s}

## Conditions

{#r_FileReadActivity__table_d5k_rmq_rt__entry__2}

| Condition | Description |
|-|-|
| Success | Activity successfully read the contents of the specified file. |
| Failure | Activity could not read the contents of the specified file. |
[Table 3. File Read conditions]

{#r_FileReadActivity__table_d5k_rmq_rt}

*[\>]: and then


