top of page
  • Writer's pictureHugh Marshall

Maintaining a synchronised client folder structure

Updated: Mar 26

In my previous article (Folder Magic: Automatically create structured Client folders in Zoho WorkDrive from Zoho CRM), I showed you how you can add automation within Zoho CRM, that builds out a client folder structure within Zoho WorkDrive. Building upon that foundation, today's exploration takes us further as I demonstrate how to incorporate supplementary automation to maintain a synchronised client folder structure. This expansion will revolve around the dynamic renaming and deletion of Zoho WorkDrive folders, all orchestrated in response to record actions within Zoho CRM.

How It Works

For each module where WorkDrive folder automation is implemented, we're introducing workflow automation to address specific tasks. It's important to highlight that these enhancements can be implemented independently, providing flexibility and adaptability to your needs.


When a field that contributes to the composition of a folder's name on a record is modified within Zoho CRM, our integration seamlessly updates the corresponding folder's name within Zoho WorkDrive. This ensures that your folder structure remains synchronised and organised, reflecting real-time changes in your CRM records.


As you interact with your CRM and records are deleted, our automation takes care of the corresponding folders in Zoho WorkDrive. No manual intervention is required – when a record is removed in CRM, the corresponding folder is automatically deleted in WorkDrive, streamlining your workflow and ensuring consistency between platforms.

This approach not only enhances your automation capabilities but also reduces manual effort and potential errors, contributing to a smoother and more efficient workflow.


To optimise the automation process and streamline the workflow process, we will be adopting a repeatable approach for renaming and deleting folders within WorkDrive. Rather than duplicating functions for each workflow scenario, we've crafted two standalone functions that can be triggered seamlessly through a webhook action from the workflow.

This strategic move not only reduces the integrations complexity but also enhances efficiency by centralising the control of the renaming and deleting processes.


We will be creating 2 standalone functions for this automation and the code is provided below.

To create a function go to Settings > Developer Space > Functions

  1. Click New Function

  2. Enter a Function Name (No Spaces)

  3. Enter a Display Name

  4. Set the Category to Standalone

  5. Click Create

  6. Enter code below

  7. Click Save

We need to expose these functions by API so that we can trigger them from a webhook action.

To expose a function via REST API go to Settings > Developer Space > Functions

  1. Click the ellipsis next to the function

  2. Select REST API

  3. Check the OAuth2 Toggle

  4. Copy the URL that appears

Renaming WorkDrive Folder Function Code


  • newFolderName (String)

  • workdriveFolderId (String)

Deleting WorkDrive Folder Function Code


  • workdriveFolderId (String)


Now that the functions are setup and exposed by API we can configure our workflows and webhook actions to trigger them.

To setup a webhook action inside a workflow

  1. Under instant actions in a workflow select Webhook

  2. Click New Webhook

  3. Enter the Webhook Name / Description

  4. Set the Method to GET

  5. The URL To Notify is the OAuth URL of the function

  6. Set the Authorization Type to Connection and select the crm_connection

  7. Module Parameters are the values we are passing to the function which you can set to a field in the module.

    1. workdriveFolderId

    2. newFolderName

      1. If your folder name is made up of multiple fields use User defined Format instead of module parameters, and use the # key to insert merge fields.

  8. Click Save and Associate

Screenshot 1 of creating a Webhook Action
Screenshot 1 of creating a Webhook Action


Screenshot of Update Deal Folder Workflow

Ensure that your renaming workflow is triggering whenever any of the fields used to make up the folders name are modified. In my example its only the deal name, but ensure you select the option for this workflow to repeat every time the field(s) are modified. We only need to trigger this workflow for records that have a corresponding WorkDrive Folder so ensure the condition of WorkDrive Folder ID isn't empty.


Screenshot of Delete Deal Folder Workflow

The deleting function will need to be triggered when a record is deleted. We only need to trigger this workflow for records that have a corresponding WorkDrive Folder so ensure the condition of WorkDrive Folder ID isn't empty.

I hope this article has helped you enhance your Zoho CRM and Zoho WorkDrive Folder automation and take it to the next level. By adding this to your CRM your folder structure will remain automatically synchronised with your CRM.

Looking to take this automation to the next level, check out my follow up article on how to display the WorkDrive folder contents inside a related list on the record.

Need Help? Contact us!




Looking for further Assistance

If you are looking for further assistance with Zoho applications feel free to contact us to see what we can do for you.

bottom of page