Delete Folder

Use this step to delete a folder from Google Drive.

Last published at: March 31st, 2026

googleDriveDeleteFolder Step

Description:

The GoogleDriveDeleteFolder workflow step deletes a specified folder in Google Drive.

The step supports:

  • Selecting an OAuth provider.
  • Specifying the folder path 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 destinationFilePath property specifies the file path for the Google Drive operation.
 

 

Returns

  • True – The True return path can be connected to the next workflow activity when the folder-deletion operation produces a positive result.
  • False – The False return path can be connected to the next workflow activity when the folder-deletion operation produces a negative result.
 

 

Usage:

The GoogleDriveDeleteFolder step is typically placed after a workflow has determined that a Google Drive folder is no longer required and can be deleted.

A typical workflow pattern is:

Identify Folder → GoogleDriveDeleteFolder → Continue Process

The step uses the selected OAuth provider and configured folder path to delete the folder.

The step can be used by later workflow activities to:

  • Remove folders that are no longer required.
  • Clean up temporary workflow folders.
  • Remove obsolete project folders.
  • Perform document-management cleanup.
  • Delete folders after a business process is completed.
  • Maintain Google Drive folder organization.
  • Route the workflow based on the deletion result.

A typical workflow pattern is:

Determine Folder → Delete Folder → Continue / Alternate Handling

 

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 Workflow Folder

Use the step to remove a temporary folder created during workflow processing.

Example:

Create Temporary Folder → Process Files → GoogleDriveDeleteFolder → Complete

This can be useful when a workflow creates a temporary folder specifically for intermediate processing.

 

Clean Up After Document Processing

Use GoogleDriveDeleteFolder after documents have completed processing.

Example:

Process Documents → Complete Processing → GoogleDriveDeleteFolder → Complete Workflow

You can remove the folder after the workflow completes the activities that require it.

 

Delete an Obsolete Project Folder

Use the step when a project folder is no longer required.

Example:

Determine Project Status → GoogleDriveDeleteFolder → Update Workflow Status

The folder path identifies the project folder to be deleted.

 

Remove a Temporary Archive Folder

Use this step to remove an intermediate folder after you've handled its contents.

Example:

Process Archive → Move/Process Files → GoogleDriveDeleteFolder → Complete

This can help keep the Google Drive structure organized after processing.

 

Clean Up After a Failed Process

Use the step as part of a cleanup path when a workflow needs to remove an intermediate folder.

Example:

Process Documents → Error Handling → GoogleDriveDeleteFolder → Log Result

Place the deletion in an appropriate workflow cleanup path.

 

Delete a Folder After Approval

Use the step when an approval decision makes an existing folder unnecessary.

Example:

Approval → Determine Cleanup Requirement → GoogleDriveDeleteFolder → Continue

You can delete the folder as part of the post-approval workflow.

 

Delete Folders After a Business Process

Use the step at the end of a process when the associated Google Drive folder is no longer required.

Example:

Complete Business Process → GoogleDriveDeleteFolder → End

This provides a simple cleanup stage for the workflow.

 

Delete a Folder as Part of Document Lifecycle Management

Use the step when folders are managed according to a document lifecycle.

Example:

Document Lifecycle Decision → GoogleDriveDeleteFolder → Continue

For example, a workflow may determine that a temporary or obsolete folder should be removed.

 

Use the Result to Control Workflow Routing

Use the True and False outputs as separate workflow paths.

Example:

Identify Folder → GoogleDriveDeleteFolder

True → Continue Process

False → Alternate/Error Handling

This makes the folder-deletion operation an explicit decision point.

 

Perform Cleanup Before Completing the Workflow

Use the step immediately before the workflow reaches its final state.

Example:

Process Files → Save Required Results → GoogleDriveDeleteFolder → Complete

This ensures folder cleanup is explicitly represented in the workflow.

 

Delete Multiple Folders

Use multiple GoogleDriveDeleteFolder steps when several folders require cleanup.

Example:

Process Data → Delete Temporary Folder → Delete Working Folder → Complete

Configure each step with the appropriate OAuth provider and folder path.

 

Delete a Folder Before a Downstream Activity

Use the step when a folder should no longer exist before the workflow continues.

Example:

Complete Folder Processing → GoogleDriveDeleteFolder → Continue with Next Stage

The deletion becomes a defined transition between workflow stages.

 

Use Workflow Values to Identify the Folder

When the folder path is determined by information available to the workflow, you can supply the path through the configured string property.

Example:

Get Project Information → Determine Folder Path → GoogleDriveDeleteFolder → Continue

The step's folder-path property is a required string input.

 

Example:

Let’s build and execute the “GoogleDriveDeleteFolderDef” example.          

  • Create a new process definition called “GoogleDriveDeleteFolderDef” and open it in Designer mode. 
  • Drag a “GoogleDriveDeleteFolder” step from the toolbox
  • Connect the dots between the “Start” and “GoogleDriveDeleteFolder” 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 “GoogleDriveDeleteFolder” step to configure its “Required” properties. Provide a name for the step. Select the OAuth provider from the dropdown. Enter the folder path to delete. Click the Save button. Note: Click the "AI Predict" button to have Copilot add new process steps that match your process description. 

 

  • The “Logging” configuration is necessary for documentation and also measures workflow progress and percent complete. 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 Folder step, FlowWright uses the configured OAuth provider and folder path to perform the deletion. Verify:
    • The correct OAuth provider was selected.
    • The folder path identifies the intended Google Drive folder.
    • The expected folder 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.
  • Verify the folder path carefully before deleting.
  • Use particular caution when configuring production folder paths.
  • Test the workflow against a representative non-production folder before deployment.
  • Test both the True and False workflow paths.
  • Use meaningful and consistent Google Drive folder structures.
  • Verify that required files or subfolders have been processed before deleting their containing folder.
  • Consider environment-specific OAuth configuration when moving workflows between environments.
  • Use logging to make folder-deletion operations easier to troubleshoot.
  • Connect the False path to an appropriate alternate or error-handling activity.
  • Verify the workflow's folder-selection logic before allowing automated deletion.
  • Review the folder path whenever the Google Drive folder structure changes.
  • Avoid hard-coding production folder 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 deleting the folder.
  • Consider whether any downstream activity still expects the deleted folder to be available.
  • Do not assume that deletion is recursive, that non-empty folders can always be deleted, or that the step automatically handles contained files or subfolders; these behaviors are not defined in the supplied XML.
  • Do not assume behavior for nonexistent folders, insufficient permissions, duplicate paths, special characters, or other Google Drive-specific conditions unless confirmed by the FlowWright implementation.
  • 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.
  • Folder path.
  • Workflow Variable references.
  • Environment-specific OAuth settings.
  • Google Drive folder structure.
  • Required file or folder processing before deletion.
  • Downstream True and False workflow paths.

After verifying the configuration, save the Process Definition before execution.

Click here to download the sample file.