Delete a Drive file
The "Delete a Drive file" robot deletes a Drive file by its ID in Bitrix24 (Alaio) business processes and robots. By default the file goes to the recycle bin and can be restored; the Permanently flag erases the file for good, bypassing the bin. It returns a Success Y/N flag.
The robot tidies Drive up from a process: it deletes a file by ID. The safe default sends the file to the recycle bin, from which it can be brought back; the Permanently mode erases the file finally and suits scheduled cleanups, but calls for care: such a file cannot be restored. Typical use cases: delete the draft after the final contract version is signed; purge temporary export files on a process schedule; remove an outdated price list after publishing the new one. If the file is not found, Success = N is returned. Use the returned Y/N flag in the condition of the next step of the business process.
What input parameters does the robot accept?
| Parameter | Type | Required? | Default |
|---|---|---|---|
| Drive file ID | int | yes | |
| Permanently, bypassing the recycle bin (Y/N, default N) | string | — |
What does the robot return?
| Parameter | Type |
|---|---|
| Success (Y/N) | string |
Scenario: cleaning drafts after signing
- A deal enters the Contract signed stage
- The robot deletes the draft file from Drive (to the recycle bin)
- When Success = Y only the final version remains in the deal folder