Skip to content

Delete File

This Step helps delete a single file from the Files service. You define the file path or URL to the file, and the file is deleted when the Step is executed. To delete a file in another OneReach.ai account, use Cross-account settings.

Prerequisites

To access another OneReach.ai account, make sure you meet the following requirements:

  • Your account has the Super Admin role
  • Your Flow has the Super Admin Flow permission level
  • You have an Account ID or User/Flow Authentication token related to the OneReach.ai account you want to access

File settings

  • Define the file path to the file and select its current status
  • Define the file URL

File path

The file path can be defined in the file path field in the folder/filename.extension format. Use / as the divider.

Provide the current status of the selected file as private or public. The status can be found and changed in the Files service after selecting the file.

TIP

If the provided file status does not match the file's current status, the file will not be deleted, and the Flow will proceed down the "not found" exit.

Alternatively, you can provide the file path via Files of your OneReach.ai account: click the Select file, then choose the file in the popup window. The file status of the selected file will be updated automatically.

File URL

The file URL is expected to be a valid link to the file. It must start with https:// and can be found in the Files service after selecting the file.

Conflict handling

If the defined path doesn't exist, the Flow will proceed down the "not found" exit. Select the next or error option in the dropdown to take the Flow down the respective exit.

TIP

The "not found" exit is removed from the Flow tree if a different exit is selected.

Cross-account settings

By default, you can upload a file only to your OneReach.ai account. To upload a file to a different OneReach.ai account, do the following:

  1. Make sure that your OneReach.ai account has the Super Admin role. To check your role, go to Action desk -> Users. The role is defined under the user name. If your role isn't Super Admin, contact OneReach.ai support to change it.
  2. Go to the General tab of the Flow, then open Deployment settings -> Flow permissions level and select Super Admin.
  3. Turn on the Use custom authentication token toggle.
  4. Choose one of the access types and provide respective data:
  • For the Authentication token type, select the USER or FLOW type and provide the respective token. Reach out to OneReach.ai support to obtain the value for this token.
  • For the Account ID type, provide the Account ID of the user you wish to access. The Account ID value is a unique UUID v4 format string value generated for each OneReach.ai account. You can find the option to Copy the account ID in the Profile settings of the OneReach.ai window under the Current account label.
  1. Save and activate the Flow.

Merge field settings

The Step returns the result as a JSON object and stores it in the Merge field. If the file was successfully deleted, the Merge field will contain the deleted property equal true. In case the Flow proceeds down the "not found" exit, the Merge field value would be null. To learn more about Merge fields, their types, and how to work with them, follow this link.

See below an example of the Merge field object's structure:

JSON
{
  "deleted": true
}
{
  "deleted": true
}

Error handling

By default, the Step handles errors using a separate exit. If an error occurs during the Step execution, the Flow proceeds down the error exit, e.g., the file path is invalid. For more information on error handling, follow this link.

Reporting

The Step automatically generates Reporting events during its execution, allowing for real-time tracking and analysis of its performance and user interactions. To learn more about Reporting events, follow this link.