Keeping records on your customers and business prospects is essential for tracking data, conducting follow-ups, and running a business smoothly. When you use two separate applications, and store relevant data in each, checking and tracking data becomes more difficult.
Integrating applications that contain customer data is an effective solution for easily synchronizing and managing data across both applications. In this post, we'll look at how to integrate Zoho CRM with Zoho Workdrive in order to synchronize and manage Workdrive files and folders associated with a CRM contact across both applications.
Consider the following scenario: You've converted a lead to a contact in Zoho CRM. Now, you must associate files with that contact, such as legal documents or proofs. To do this, you can create a team folder where every team member can access and manage the contact's folders and files.
In order to store contact-specific files, you can create a new folder (within the team folder) for each WorkDrive contact by clicking a button within their CRM record. You can even create a widget for uploading files to the contact's Workdrive folder from within CRM.
Create a connector for Zoho Workdrive and add connector APIs
- Create a new connector in your Zoho Workdrive extension using the Connectors feature under Utilities in the left-side panel of the Zoho Developer console.
The connector details for the above example are as follows:
Request Token URL | https://accounts.zoho.com/oauth/v2/auth?scope=,WorkDrive.users.READ,WorkDrive.files.CREATE,
WorkDrive.teamfolders.CREATE&access_type=offline
|
Access Token URL | https://accounts.zoho.com/oauth/v2/token |
Refresh Token URL | https://accounts.zoho.com/oauth/v2/token |
Scopes | WorkDrive.users.READ,WorkDrive.files.CREATE,
WorkDrive.teamfolders.CREATE
|
The Zoho Workdrive REST APIs we added for our example are as follows:
Connector API Name | Method type | URL |
Get ZUID | GET | https://www.zohoapis.com/workdrive/api/v1/users/me |
Get all teams of a user | GET | https://www.zohoapis.com/workdrive/api/v1/users/${zuid}/teams |
Create team folder | POST | https://www.zohoapis.com/workdrive/api/v1/teamfolders |
Create new folder | POST | https://www.zohoapis.com/workdrive/api/v1/files |
File upload | POST | https://www.zohoapis.com/workdrive/api/v1/upload?filename=${file_name}&parent_id=${file_parent_id}&override-name-exist=true |
Create a settings widget to build team folder and assign them to Workdrive teams
- Create a settings widget to select a team to manage a contact's folders and files.
- We'll also create a CRM variable called "Team Folder ID" to store the assigned team's ID information for future operations.
Settings widget.js code snippet
Util={};
var teamidvalue;
//Subscribe to the EmbeddedApp onPageLoad event before initializing the widget
ZOHO.embeddedApp.on("PageLoad",function(data)
{
var data = {
}
//Invoking the 'Get ZUID' API to retrieve the user's ZUID
ZOHO.CRM.CONNECTOR.invokeAPI("xxx.workdrive.getzuid",data)
.then(function(dataa){
console.log(dataa);
response = dataa.response
responsejson=JSON.parse(response);
zuiddata=responsejson.data;
zuid=zuiddata.id;
var data = {
"zuid" : zuid
}
//Invoking the 'Get all teams of a user' API to fetch all the teams of a user
ZOHO.CRM.CONNECTOR.invokeAPI("xxx.workdrive.getallteamsofauser",data)
.then(function(dataa){
console.log(dataa);
response = dataa.response;
responsejson=JSON.parse(response);
teamdata=responsejson.data;
for (i = 0; i < teamdata.length; i++)
{
teamid=teamdata[i].id;
attributes=teamdata[i].attributes;
teamname=attributes.name;
var teamlist = document.getElementById("teamlist");
var option = document.createElement("OPTION");
option.innerHTML = teamname;
option.value = teamid;
teamlist.appendChild(option);
}
})
})
})
Util.getvalues=function()
{
//Retrieving the value chosen in the teamlist
teamidvalue=document.getElementById("teamlist").value;
/*Constructing data and passing to 'Create team folder' API to create a team folder called "CRM Contacts test"*/
var data = {
"extension_team_folder_name" : "CRM Contacts test",
"parent_id":teamidvalue
}
ZOHO.CRM.CONNECTOR.invokeAPI("xxx.workdrive.createteamfolder",data)
.then(function(dataa){
console.log(dataa);
response = dataa.response;
responsejson=JSON.parse(response);
teamfolderdata=responsejson.data;
teamfolderid=teamfolderdata.id;
//Set the ID of the team selected in the teamlist to the "Team Folder ID" CRM variable
var variableMap = { "apiname": "xxx__Team_Folder_ID", "value": teamfolderid};
ZOHO.CRM.CONNECTOR.invokeAPI("crm.set", variableMap);
ZOHO.CRM.API.getOrgVariable("xxx__Team_Folder_ID").then(function(data){
console.log(data);
});
});
}
|
Create a button in the Contacts module to make a new Workdrive folder for a contact
- Create a button called "Create a new workdrive Folder" using the Links & Buttons feature available in the Components section of the Zoho Developer console. Then, write a function to perform the desired action.
- For our use case, since we're creating a new folder specific to a contact inside a WorkDrive team folder, we'll create the folder with the Full Name of the Zoho CRM contact.
- We'll also create a custom field in the Contacts module called "Folder ID" to store the ID of the new Workdrive folder to perform future operations.
Create a new Workdrive folder: Function code snippet
//Fetching the current contact details and retrieving the Full Name and custom field folder ID of the contact
response = zoho.crm.getRecordById("Contacts",contact.get("Contacts.ID").toLong());
Fullname = response.get("Full_Name");
contactfolderid = response.get("xxx__Folder_ID");
if(contactfolderid == null)
{
/*Invoking the 'Create new folder' API to get create a folder in Workdrive for the Zoho CRM contact with the name as their Full Name*/
parentfolderid = zoho.crm.getOrgVariable("xxx__Team_Folder_ID");
dynamic_map = Map();
dynamic_map.put("name",Fullname);
dynamic_map.put("folder_parent_id",parentfolderid);
newfolderresp = zoho.crm.invokeConnector("xxx.workdrive.createnewfolder",dynamic_map);
newfolderresponse = newfolderresp.get("response");
newfolderdata = newfolderresponse.get("data");
newfolderid = newfolderdata.get("id");
contactinfo = {"xxx__Folder_ID":newfolderid};
/* Updating the 'Folder ID' custom field in contact's record with the new folder ID obtained from the response*/
folderresponse=zoho.crm.updateRecord("Contacts",contact.get("Contacts.ID").toLong(),contactinfo);
return "A new workdrive folder has been created with the ID - " + newfolderid;
}
else
{
return "Folder already present for contact in Workdrive";
}
|
- The above code snippet fetches the record details for the current contact to retrieve the customer's Full Name.
- The Workdrive parent folder ID (set using the settings widget), where the new folder for the contact will be created, is then retrieved using the getOrgVariable deluge task .
- The parent folder ID and the contact's Full Name are delivered to the Create new workdrive folder API to create a new folder for the contact in Workdrive.
- The ID of the new folder is then updated in the "Folder ID" custom field using updateRecord task.
Create a button in the Contacts module to upload files to a contact's Workdrive folder and associate it with a widget
- Create a button called "Upload file to Workdrive" using the Links & Buttons feature available in the Components section of the Zoho Developer console, then associate a widget to perform the desired action.
Upload file to workdrive - widget.html - Please find the attachment for the widget html code.
- The code snippet fetches the record details of the current contact, from which the custom field 'Folder ID' value is retrieved.
- The input file selected is also checked for its file type and name.
- The Folder ID and the file name are then constructed and passed as parameters to invoke the 'Upload File to Workdrive' API.
Sample output
- After installing the extension, authorize the Zoho Workdrive connector.
- Go to Settings on the extension configuration page.
- Choose a team to manage the contact's folders and files. Click Save.
- A new team folder, CRM Contacts test, is created in Zoho Workdrive for the chosen team.
- Go to the Contacts module. Click on the Create a new workdrive folder button on the record's view page.
- A new folder is created in workdrive with the name of your contact.
- Once the folder is created, the custom field, Folder ID is also automatically updated with the new folder ID value.
- Now, click on the Upload file to Workdrive button on the record's view page.
- The widget appears. Choose a file and click the Upload file to Workdrive button. The file will be uploaded to Workdrive.
Using this method, you can integrate Zoho CRM with Zoho Workdrive through an extension to perform necessaryfunctionalities for your business. We hope you find this information helpful!
In our next post, we will show you how to track, view, and access these Workdrive files within Zoho CRM. Keep following this space for more advice!
SEE ALSO
Recent Topics
[Free Webinar] Learning Table Series - Creator for the Education Industry
Hello Everyone! We're thrilled to invite you to the Learning Table Series—a year-long initiative to demonstrate how Zoho Creator can transform industries with innovative and automated solutions. Each month focuses on a specific industry, and this time,
Remove the [## XXXX ###] from subject replies
For our organisation we would like to have the [## XXXX ###] removed from subject replies. Cheers, Jurgen 365VitaalWerken
Self Client Authorization Issue
Hi. Trying to test the api integration for Zoho Desk with the Self Client - Client Credintials flow method. I've created the self client, obtained the client id and secret, inputted "Desk.tickets.ALL" as my scope, and "ZohoDesk.[My Zoho Desk Org ID]"
How Can I Easily Access and Manage My GEPCO Online Bill Using Zoho Sheets?
Hello everyone, I'm looking for an efficient way to access and manage my GEPCO online bills. I've heard that Zoho Sheets can be a powerful tool for organizing and tracking bills, but I'm not sure how to set it up for this specific purpose. Does anyone
All notes disappeared
I've been using the notebook app for over five years on my phone without being logged into an account. A few days ago I opened the app and all my notes had disappeared. Since then I tried restarting my phone, updating the app and logging into my account,
How to add tags to a record with jS SDK 1.2/ZohoEmbededAppSDK
Hello Is it possible to add tags to a record with jS SDK : https://live.zwidgets.com/js-sdk/1.2/ZohoEmbededAppSDK.min.js ZOHO.CRM.API.updateRecord Thanks for insights
URGENT: Zoho Forms reCAPTCHA v2 Spam Issue
Hello Everyone, We are encountering a critical issue with Zoho Forms despite having reCAPTCHA v2 enabled. Our business is accessibility-focused, and we are receiving a high volume of spam submissions, which is significantly affecting our workflow and
View all Products by pipeline deal
Very good CRM I use it everyday only problem is modules not being interconnected especially products module. The main problem of products module are separated from contacts and company modules and only being connected to the Deals module. This way there's
Add "Lead Image" in Bulk?
Each of our Leads is accompanied with a URL containing a photo of the lead when they come in. We currently have to manually download then upload the photo to the lead. This is a HUGE waste of time. Is there any way to AUTOMATICALLY add the photos to the
Map fields from CRM record to Finance Suite/Books Invoice fields
I'm trying to auto-fill unique record specific field inputs that I have in my Contacts and Deals modules onto Invoices created from the record's finance suite related list upon creation. One example is a field called "Job Number" that I have in my Contact
What's New in Zoho Analytics - December 2024
Hello Users! We’re excited to bring you a roundup of the latest features and improvements in Zoho Analytics. These updates are designed to elevate your data analytics experience, making it more powerful, interactive, and seamless. Let’s dive in! Expanded
trying to access CRM Variables with JS SDK
Hello i built a widget with Sigma, i create CRM VARIABLES in custom properties. I try to access them in function : ZOHO.embeddedApp.on("PageLoad",function(data) with : ZOHO.CRM.CONFIG.getVariable("mycrmvariable").then(function(data){ console.log("mycrmvariable
Writing on sketch cards is bugged when zoomed in
When zoomed in, it writes a noticeable distance above or to the side of where you're actually trying to write. The further you're zoomed in, the more noticeable it is. Zooming is also entirely absent on the desktop version.
Private Project
Hi, I would like to know if a user can create a Private project that only he's able to see it. Not even the ADMIN user. Thanks
Accordion in tabs to create FAQs, etc.
Accordion elements do not seem to be able to be placed in the tabs. It would be useful to be able to do this. Thank you.
Which are the IP addresses to use for 'split delivery' with Office 365? (Zoho mail inbound gateway)
Hi, I'm trying to set up 'split delivery' (email routing) with Office 365. I'm following the instructions to set up Office 365 as the primary server (https://www.zoho.com/mail/help/adminconsole/coexistence-with-office365.html) One of the prerequisites
Zoho Projects 2024 Recap
Dear Users, As we conclude another remarkable year, it's the time to reflect on the journey we've just completed. The year 2024, defined by significant milestones, challenges, achievements, and important lessons. Every moment has contributed to the story
Custom Fields at Line Level
Hi, is there an ability to add custom fields at line level? I need to track the start and the end date for each product within an invoice and I can't seem to find an option to do this.
Zoho API Error Code 7019 when adding job.
Hello, I am following the documentation found here. https://www.zoho.com/people/api/timesheet/adding-jobs.html Regardless of how I try and post the data (including just using the example requests), I receive back the response {'response': {'message':
How to see changes with ZOHO.CRM.API.updateRecord(config) without reload page
hello got a widget in account, trigger with a button i copy data to account when click on a button, in my popup All is working well. But i need to reload the page to see the update. How can i see the changes without reloading page, only when close the
How to call a Creator function which is in a different Creator application?
How to call a Creator function which is in a different Creator application?
Unable to send message; Reason: 554 5.1.8 Email Outgoing Blocked
My account is mino@flawless-frames.com, or flawlessframesstudio@gmail.com Could you please unblock my account, I've got restricted from sending more emails
Stock Count
The stock count is a nice new feature, but we cannot figure out how to: 1. Use it without assigning to a person, we have a team or one of multiple do stock counts as do most any company. 2. Add any extra fields to what the "counter" sees. The most important
Move a Contact from Current Account to a NEW Account
I do not believe the functionality to Move a Contact from a Current Account to a New Account is not available. Please someone tell me I am missing something! I have been through designing, developing, using and selling CRM systems for over 25 years and had this functionality20+ years ago in other CRMs. In the real world people move from one organisation to another. In the sales, finance and technical world it is nice to see the communication history with that person in their old account and also
Force Specific Layout for CRM Contacts Portal
Hello: We're in trial on ZOHO One and looking at the CRM Portal (just for the contacts module). We have a client layout set up for Contacts that is working well for our internally, but for the portal we don't want to require (make mandatory) some of the
Automatic Removal of Departments and Groups for Inactive Employees in Zoho One
Hi Zoho One Team, We hope you're doing well. Currently, when an employee is marked as inactive in Zoho One, they remain listed as a member of their department and associated groups. This creates a challenge in maintaining accurate records and ensuring
Change eMail Template for Event-Invitations
Hello ZOHO-CRM Team How I can change the eMail Template for Event-Invitations? I work with the German Version of the Free Version. I know how I can modify eMail alerts or Signature Templates, but where I can other eMails modify you send out? Thank you for your answer. Regards, Juerg
Zoho Social integration with Zoho Flow
Is there any plans for Zoho Social integration with Zoho Flow?
Zoho CRM Widget and translations
Hi everyone! We're building a Widget with zoho-extension-toolkit, how is localization supposed to work? "zet init" created a translations/en.json file, but what should go inside it and how is it supposed to be accessed from the Widget/javascript? Thanks
Bienvenue à Zoho FSM : l'optimisation des opérations locales qui offre une expérience de service impeccable
Nous sommes ravis de vous présenter Zoho FSM, la plateforme de gestion des services terrain de bout en bout. Les solutions de gestion des services locaux s'adressent aux organisations qui effectuent des activités d'installation, de réparation et de maintenance
Adding tag to specific record as an acion in a workflow
Hi! I've created the following workflow in the module 'Leads'. When a record meets the criteria, there should be a tag added to the specific record in the module 'Contacts'. In the module 'Leads', there is a look-up field named 'Kandidaat' which is connected
Trying to catch error with ZOHO.CRM.HTTP.get (Response Code)
Hello, I'm trying to get response header from ZOHO.CRM.HTTP.get, in order to catch error like 404 or something else but it seems that ZOHO.CRM.HTTP.get() method only returns the body of the response, and I see no way to access the headers returned. Is
FSM - How to ADD PHOTOS to Estimates & Invoices
How can you add photos to estimates and invoices that are being emailed to the client so the can see what you are estimating and your completed work?
Free developer edition of Zoho CRM
A question for Zoho and other developers: How can you set up a demonstration version of a Zoho CRM implementation to show employers/clients what can be achieved? Do you pay for Zoho CRM Enterprise/Zoho One for this purpose? Does Zoho offer a free version
Can I add Conditional merge tags on my Templates?
Hi I was wondering if I can use Conditional Mail Merge tags inside my Email templates/Quotes etc within the CRM? In spanish and in our business we use gender and academic degree salutations , ie: Dr., Dra., Sr., Srta., so the beginning of an email / letter
Where are scheduled emails stored?
After you schedule an email to go out through the CRM, how do you go about changing that scheduled email? Or even where can I see the list of emails scheduled to go out? They are not listed in my Zoho Mail account in Outbox which has been the only answer
CRM Home Page Dashboard, how can i add zoho desk cases?
How can i see which tickets are in my group as a dashboard component on the home tab in zoho crm? I don't see any way of adding this.
Custom Module missing SDK function fetchRelatedRecords(...) in a Client Script
Good day, We have added a new module with a Multi-Lookup relation to Contacts. When we tried to use the fetchRelatedRecords(id, related_list_api_name) function to get Related Records it is missing for our new custom module. https://js.zohocdn.com/crm/5124797/documentation/DotSDK/Modules.html
Assistance with Setting Default Values for Zoho Chat Custom Fields
I am currently using the Zoho Chat JavaScript API to successfully add custom fields to the chat interface. While the implementation of these fields has been smooth, I am now looking to set default values for these custom fields. However, I couldn't find
Subform Client Script
Good day, I have a subform where users can subscribe to various magazines. I would like to prevent the user from selecting the same magazine twice when adding a new row. Is there a way to prevent the user from doing this? (Can it be done via a client
Next Page