Google Drive · Arazzo Workflow
Google Drive Back Up a File Before Permanently Deleting It
Version 1.0.0
Resolve a file, copy it into an archive folder, verify the backup exists, and only then permanently delete the original.
View Spec
View on GitHub
Cloud StorageCollaborationDocument ManagementDriveFilesGoogleStorageArazzoWorkflows
Provider
Workflows
backup-and-delete-file
Archive a copy of a file, verify it, then permanently delete the original.
Reads the file's metadata, copies it into an archive folder under a timestamped-style archive name, confirms the archived copy is readable, and then permanently deletes the original file.
1
resolveFile
getFile
Read the file's metadata to confirm it exists and capture its name and size before anything destructive is attempted.
2
archiveCopy
copyFile
Copy the file into the archive folder under the supplied archive name. This copy is the only recoverable artifact once the original is deleted.
3
verifyBackup
getFile
Read the archived copy back and confirm it is present, untrashed, and filed in the archive folder. This step is the gate on the delete — if the backup cannot be read here, the original must not be destroyed.
4
deleteOriginal
deleteFile
Permanently delete the original file. This bypasses the trash and cannot be undone, which is why it runs only after the archived copy has been read back successfully.