Integrate Zoho CRM and Zoho Workdrive

Integrate Zoho CRM and Zoho Workdrive

I am having some trouble with my workdrive connection in zoho crm.  What I want to do is this:
1) Create a folder for each account record in workdrive team folder, name it after the account name field
2) For each upload to a record in the deals module, send the file to the corresponding workdrive account folder

I have an oauth connection with WorkDrive.workspace.ALL, WorkDrive.files.Create, and WorkDrive.teamfolders.Create scopes.  I tried to create a button function that would allow me to mass action create the workdrive folders from the accounts module.  The below code gives me the error: id'F6016' , title'URL Rule is not configured' }
 

  1. void automation.createAccountFoldersWorkdrive(int accountId)
  2. {
  3. // Fetch account details
  4. accountDetails = zoho.crm.getRecordById("Accounts", input.accountId);
  5. accountName = accountDetails.get("Account_Name");

  6. // Replace this with your actual "Litigation" folder ID from WorkDrive
  7. litigationFolderId = "fgoh36f8283418f8f4b588e39cab0b6c351d9";

  8. // Step 1: Create Account Folder
  9. createFolderBody = map();
  10. createFolderBody.put("name", accountName);
  11. createFolderBody.put("parent_id", litigationFolderId);

  12. createFolderResponse = invokeurl
  13. [
  14.     url: "https://workdrive.zoho.com/api/v1/folders"
  15.     type: POST
  16.     connection: "workdrive2"
  17.     body: createFolderBody.toString()
  18. ];

  19. info createFolderResponse;

  20. if (createFolderResponse.containsKey("data"))
  21. {
  22.     accountFolderId = createFolderResponse.get("data").get("id");

  23.     subfolderNames = list();
  24.     subfolderNames.add("Appraiser Attachments");
  25.     subfolderNames.add("Attorney Attachments");

  26.     for each  name in subfolderNames
  27.     {
  28.         subfolderBody = map();
  29.         subfolderBody.put("name", name);
  30.         subfolderBody.put("parent_id", accountFolderId);

  31.         subfolderResponse = invokeurl
  32.         [
  33.             url: "https://workdrive.zoho.com/api/v1/folders"
  34.             type: POST
  35.             connection: "workdrive2"
  36.             body: subfolderBody.toString()
  37.         ];

  38.         info "Created subfolder: " + name;
  39.         info subfolderResponse;
  40.     }
  41. }
  42. else
  43. {
  44.     info "Failed to create the account folder.";
  45.     info createFolderResponse.toString();
  46. }

  47. }