# FileStorage connector
FILE AND FOLDER ACCESS
Currently, all users in a workspace can access all FileStorage files and folders in the workspace when they use the FileStorage connector. Workato does not restrict access based on role unless the files are accessed from the FileStorage UI.
The Workato FileStorage connector allows you to work with the file storage entity using the following recipe actions:
- Append to file
- Create directory
- Create file
- Delete directory
- Delete file
- Generate shareable file link
- Get file contents
- Rename/move file
- Search files
# Append to file
This action appends content to an existing file in FileStorage. Like the Create file action, it can be paired with streaming or non-streaming download actions, or with bulk actions and triggers, and so on. This is useful when working with CSV or JSON data, when you have to fetch the contents from the source at a regular frequency (such as daily or hourly) or in batches, and store it in a single intermediary file that can be streamed to the destination. For CSV format files, you must remove the header row at the source action before appending.
HOW TO USE THE APPEND ACTION EFFECTIVELY
The append file action creates a new file if the file is not available in the provided path. As a result, the action can be used in a recipe to create a file in the first run, and to append data to the file in later runs. The recipe does not require adding a separate Create file action to the first run. This can simplify recipe design.
# Input fields
- Select file/File path
- Choose a file or enter the full path of the file where the contents should be appended. If the file does not exist at the provided path at recipe run time, Workato creates a new file.
- Content to append
- Add the contents of the file directly as input, or pass the file reference from a download or a bulk action to append it to the selected file.
# Output fields
- File path
- Complete path of the file to which data was appended.
- Appended size
- The size of the appended file.
# Create directory
This action creates a new directory in Workato FileStorage. Directories are useful for grouping similar files. For example, you could group all marketing files under one directory called marketing
or store all August sales data files within the directory path sales/august
.
# Input fields
- Directory name
- Enter the name of the directory that you plan to create.
- Directory path
- Choose or enter the path where this directory resides. If the path contains missing parent directories, they are created automatically.
# Output fields
- Directory path
- The full path of the created directory.
# Create file
This action uploads and stores the provided file in Workato FileStorage. The action is compatible with both streaming and non-streaming actions and can be used to store large files in FileStorage.
# Input fields
- File name
- Enter the name of the file you plan to upload.
- File path
- Choose a directory or enter the directory path where you plan to create the file. If the path does not exist, Workato returns an error.
- File contents
- Add the contents of the file directly as input, or pass the file reference from a download or a bulk action to create the file.
# Output fields
- File name
- The name of the stored file.
- File path
- Complete path of the stored file.
- File size
- The size of the stored file in bytes.
# Delete directory
This action deletes a directory in FileStorage.
# Input fields
- Directory path/Select file
- Enter the directory path or select the directory you plan to delete.
# Output fields
- Directory name
- Complete path of the deleted directory.
# Delete file
This action deletes a file from FileStorage.
# Input fields
- Select file/File path
- Select the file or enter the full path of the file you plan to delete.
# Output fields
- File path
- The complete path of the deleted file.
# Generate shareable file link
This action allows you to create a temporary authenticated URL for a file in Workato FileStorage that can be shared externally. A third party can download, upload, or append contents to the file for a duration you specify using this URL.
# Input fields
- Scope
- Choose the scope possible in the file: Upload, Download, or Append. For example, Upload allows users to create a new file and upload contents to it. Upload does not work on an existing file.
- Expires in
- Specify the length of time after which the shareable link expires. Defaults to
900
seconds (15 minutes), maximum is604800
seconds (7 days).
# Output fields
- Shareable link
- The URL from which the file can be uploaded, downloaded, or appended, depending on the scope you select.
- File path
- The complete path of the file being shared.
- Expires in (seconds)
- The length of time in seconds after which the shareable link expires.
# Get file contents
This action fetches a file that is stored in FileStorage, and its contents are passed to downstream actions. Like the Create file action, you can pair this action with streaming or non-streaming upload and bulk actions. Be mindful of the size of the file that is transferred, and the acceptance size at the destination end.
# Input fields
- Select file/File path
- Choose or enter the full path of a file to fetch its contents. If the path entered does not exist, Workato returns an error.
# Output fields
- File name
- The name of the stored file.
- File path
- Complete path of the stored file.
- File contents
- Reference to the contents of the file that can be passed to downstream actions for processing and storing.
- File size
- The size of the file in bytes.
- File creation time
- The timestamp when the file was created.
- Last modified time
- The timestamp when the file was last modified.
# Rename/move file
This action allows you to rename a file or move a file to a new destination in FileStorage.
# Input fields
- Source file path
- Choose or enter the path of the source file you plan to move or rename. For example:
directory1/directory2/filename
. Note that the file must exist in the path, or the action returns an error. - Destination directory path
- Choose or enter the directory path where you plan to move the file. To rename the file, provide the same directory path as in the source. For example:
directory1/directory2
. - Destination file name
- Enter the destination file name. To move the file, you can provide either the same name or a different name for the destination file.
# Output fields
- Source file path
- The complete path of the original file.
- Destination file path
- The complete path of the newly renamed or moved file.
# Search files
This action searches directories and subdirectories and returns a list of files with names that match the condition in the response. This is useful for grouping and processing files. The action supports pagination to retrieve large sets of files iteratively.
ALTERNATIVE USE FOR SEARCH FILES ACTION
The search files action can also be used to list all files under a directory and its subdirectories. To do so, choose the directory to list and do not provide any inputs in the File name section.
# Input fields
- Directory path/File path
- Choose or enter the path of the directory to search for matching files. Subdirectories are also included in the search.
- File name
- Condition
- Choose from a set of conditions to make comparisons against the value provided and return results accordingly. Default is set to Equals.
- Value
- Enter the value to search. The operation returns files that match the specified condition and value.
- Page size
- Page size defines the number of file records to fetch in a single set. Default is
50
. A maximum of100
records can be returned. - Page number
- Page offset denotes the specific page number to fetch the associated file records from. Default offset is
0
, which represents the first page.
# Output fields
- Page offset
- Returns the current page number.
- Size of the page
- Returns the number of records in the page.
- Files
- Returns a list of files with the following metadata information:
- File name
- File path
- File size (bytes)
- File creation time
- Last modified time
- List size
- List index
Last updated: 11/3/2023, 3:05:40 PM