Delete Files (Files) v1.0.0 Help
Deletes a file specified with a file path or via URL from the Files service.
How can I use this Step?
This Step is useful for deleting a single file from the Files service. You define the file path or the URL to the file, and when the Step is executed, the file is deleted. 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 or Flow authentication token related to the OneReach.ai account you want to access.
File settings
The following options to specify the file that will be deleted are available:
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.
Note: In case the provided file status does not match the current status of the file, 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 button, 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 as 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
By default, in case 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.
Note: the not found exit is removed from the Flow tree if a different exit is selected.
Cross account settings
By default, a user can delete a file only from their own OneReach.ai account. To delete a file from a different OneReach.ai account, please do the following:
- Make sure that your OneReach.ai account has the Super Admin role. To check your role, go to the Action desk -> Users. The role is defined under the name of the user. If the role isn't Super Admin, reach out to OneReach.ai support to change it.
- Go to the General tab of the Flow, then open Deployment settings -> Flow permissions level and select Super Admin.
- Turn on the use custom authentication token toggle.
- 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. Please, 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. An option to Copy account ID can be found in the Profile settings of the OneReach.ai window under the Current account label.
- Save and activate the Flow.
Merge field settings
The output data of the Step will be stored under the name provided in the merge field name. If the file was successfully deleted, it will contain the deleted
property equal true
. In case the flow proceeds down the not found exit, the merge field value would be null
.
See below an example of the merge field object's structure:
{
"deleted": true
}
{
"deleted": true
}
Error handling
Handle error is on by default and adds an error exit to the Step. The Flow will proceed down this exit if any error was encountered during the execution of the Step, e.g. the file path is invalid.
Reporting
Step event is reported once the Flow exits the Step. It collects the data which can be used further in reports. You can specify tags to organize the collected data.
Services dependencies
- flow builder v2.24.2
- event-manager v2.0.1
- deployer 2.3.1
Release notes
v1.0.0
- Initial release