Description:
The GoogleDriveDeleteFile workflow step deletes a specified file in Google Drive.
The step supports:
- Selecting an OAuth provider.
- Specifying the path of the file to delete.
- Returning a True or False result for subsequent workflow processing.
Inputs
- selOAuthProvider - The Select OAuth provider property specifies the OAuth provider used for the Google Drive operation.
- destinationFilePath - The Path to delete file property specifies the path of the Google Drive file that should be deleted.
Returns
- True – The True return path can be connected to the next workflow activity when the file-deletion operation produces the positive result.
- False – The False return path can be connected to an alternate workflow path when the operation produces the negative result.
Usage:
The GoogleDriveDeleteFile step is typically placed after a workflow has determined that a Google Drive file is no longer required and can be removed.
A typical workflow pattern is:
Identify File → GoogleDriveDeleteFile → Continue Process
The step uses the selected OAuth provider and configured file path for the Google Drive deletion operation.
The step can be used to:
- Remove temporary workflow files.
- Delete obsolete documents.
- Clean up files after processing.
- Remove files as part of a document lifecycle.
- Delete files after a business process is completed.
- Maintain an organized Google Drive structure.
- Route the workflow based on the deletion result.
A typical workflow pattern is:
Determine File → Delete File → Continue / Alternate Handling
As with the reference SearchAndReplaceString step, the operation can be positioned between workflow activities and its result used to determine which subsequent activity executes.

To use this step, configure Google Drive with Flowwright OAuth connections.

A sample Google OAuth configuration is provided here for reference.

Typical Workflow Suggestions:
Delete a Temporary File
Use the step to remove a temporary file created during workflow processing.
Example:
Create Temporary File → Process File → GoogleDriveDeleteFile → Complete
This is useful when a file is required only during an intermediate stage of the workflow.
Clean Up After Document Processing
Use GoogleDriveDeleteFile after a document has completed processing.
Example:
Process Document → Save Required Results → GoogleDriveDeleteFile → Complete Workflow
This provides an explicit cleanup stage in the workflow.
Delete an Obsolete Document
Use the step when a document is determined to be obsolete.
Example:
Determine Document Status → GoogleDriveDeleteFile → Update Status
The configured file path identifies the document to be removed.
Delete a File After Approval
Use the step when an approval decision determines that an existing file should no longer be retained.
Example:
Approval → Determine Cleanup Requirement → GoogleDriveDeleteFile → Continue
You can incorporate the deletion into the appropriate post-approval workflow path.
Delete a File After a Business Process
Use this step when a business process has completed and an associated file is no longer needed.
Example:
Complete Business Process → GoogleDriveDeleteFile → End
This can help remove files created solely for the duration of the process.
Clean Up Failed Processing
Use the step as part of a cleanup path after an unsuccessful processing operation.
Example:
Process File → Error Handling → GoogleDriveDeleteFile → Log Result
This allows the workflow to explicitly remove an intermediate file when cleanup is appropriate.
Remove Temporary Generated Documents
Use the step to clean up documents generated during an intermediate workflow stage.
Example:
Generate Temporary Document → Perform Processing → GoogleDriveDeleteFile → Continue
You can remove the temporary document after you've used its contents.
Maintain Document Lifecycle
Use GoogleDriveDeleteFile as part of an automated document lifecycle.
Example:
Document Lifecycle Decision → GoogleDriveDeleteFile → Continue
This can help automate removal when a document reaches a defined workflow state.
Delete a File Before Moving to the Next Stage
Use the deletion operation as a transition between two workflow stages.
Example:
Complete Current Stage → GoogleDriveDeleteFile → Start Next Stage
The deletion becomes an explicit part of the workflow, not an external manual task.
Use the Result to Control Workflow Routing
Use the True and False outputs as separate workflow paths.
Example:
Identify File → GoogleDriveDeleteFile
True → Continue Process
False → Alternate/Error Handling
This makes the deletion operation a decision point in the workflow.
Delete Multiple Files
Use multiple GoogleDriveDeleteFile steps when you need to remove several files.
Example:
Cleanup Start → Delete Temporary Report → Delete Temporary Document → Complete
Each step can specify the appropriate file path.
Delete a File as Part of Archive Cleanup
Use the step when a workflow has completed an archival operation and an original or temporary file should subsequently be removed.
Example:
Archive Processing → GoogleDriveDeleteFile → Complete
You can perform the deletion after the workflow reaches the appropriate cleanup stage.
Use Workflow Values to Identify the File
When the file path is determined from information available during workflow execution, supply that value to Path to delete file.
Example:
Get Document Information → Determine File Path → GoogleDriveDeleteFile → Continue
The file path is a required string input to the step.
Delete Files in Scheduled Cleanup Workflows
Use the step in scheduled workflows that periodically clean up files.
Example:
Scheduled Start → Identify Files → GoogleDriveDeleteFile → Complete
This provides a repeatable, automated cleanup process.
Example:
Let’s build and execute the “GoogleDriveDeleteFileDef” example.
- Create a new process definition named “GoogleDriveDeleteFileDef” and open it in Designer mode.
- Drag a “GoogleDriveDeleteFile” step to the canvas.
- Connect the dots between the “Start” step and “GoogleDriveDeleteFile” steps, as shown above.
- Select the line between the steps to configure the “Connection Properties”. The default property values are “None, True, False, Error, and Evaluate”. Depending on the step’s purpose, you can configure additional values.
- Click the “GoogleDriveDeleteFile” step to configure its “Required” properties. Provide a name for the step. Select the OAuth provider from the dropdown list. Enter the file name and path to delete. Click the Save button. Note: Click the "AI Predict" button to have the Copilot add new process steps that match your process description.

- The “Logging” configuration is necessary for documentation and to track workflow progress and completion percentage. Configure the step state and percent fields individually, as shown in the images below. Configure the “Logging” using the following properties.

- Save the process definition, create a new instance, and execute it. Render the process instance and click the process step to view its properties. When the workflow reaches the Delete File step, FlowWright uses the configured OAuth provider and file path to perform the deletion. Verify:
- The correct OAuth provider was selected.
- The file path identifies the intended Google Drive file.
- The expected file is removed.
- The workflow follows the expected True or False path.
- Any downstream workflow activity executes as expected.
Tips:
- Select the correct OAuth provider before testing the workflow.
- Carefully verify the file path before deleting it.
- Use particular caution when configuring automated deletion in production.
- Test the workflow with a non-production file before deployment.
- Test both the True and False workflow paths.
- Verify that the file is no longer required before allowing the workflow to delete it.
- Consider environment-specific OAuth configuration when moving workflows between environments.
- Use logging to make file-deletion operations easier to troubleshoot.
- Connect the False path to an appropriate alternate or error-handling activity.
- Verify the workflow's file-selection logic before enabling automated deletion.
- Review the file path whenever the Google Drive folder structure changes.
- Avoid hard-coding production file paths when the workflow needs to operate across environments.
- Use appropriate workflow controls before placing a deletion step into an automated cleanup process.
- Test cleanup workflows with representative data before enabling automatic execution.
- Keep authentication credentials and access tokens out of workflow logging fields.
- Verify downstream workflow behavior after the file has been deleted.
- Consider whether any subsequent workflow activity still expects the deleted file to exist.
- If a file is required later in the workflow, make sure you copy, process, or otherwise preserve it before deleting it.
- Use consistent Google Drive file-management conventions when multiple workflows create and remove files.
- Do not assume how nonexistent files, insufficient permissions, duplicate paths, special characters, or other Google Drive-specific conditions are handled unless confirmed in the FlowWright implementation.
- Do not assume recursive or related folder behavior from this step; the supplied XML defines a file-deletion operation, not folder deletion.
- Do not assume the precise runtime meaning of the True and False returns solely from the XML. The XML identifies the two outputs but does not document their detailed runtime conditions.
Definition Sample:
You may download the sample definition from the link provided and later import it into the FlowWright Process Definition (XML file) or Form Definition (HTML file) page, following the same approach described in the reference documentation. The reference page recommends completing any environment-specific configuration after importing a sample.
Note: Verify and complete any missing configuration after importing the sample, including:
- OAuth provider.
- File path.
- Workflow Variable references.
- Environment-specific OAuth settings.
- Google Drive file structure.
- Required processing or archival activities before deletion.
- Downstream True and False workflow paths.
After verifying the configuration, save the Process Definition before execution.