Introduction
- Why Integrate Zoho Projects with Zoho CRM?
- Prerequisites
- Step 1 — Set Up Custom Fields in Zoho Projects
- Step 2 — Fetch Custom Field API Names via REST API
- Step 3 — Create a Connection in Zoho CRM
- Step 4 — Write the Deluge Script
- Step 5 — Test and Deploy the Function
- Tips, Troubleshooting & Best Practices
- Conclusion
Why Integrate Zoho Projects with Zoho CRM?
- Automatically create projects when a deal reaches a certain stage
- Map deal fields (such as deal name, dates, and custom data) directly to project fields
- Eliminate manual data entry and reduce human error
- Give project managers instant visibility as soon as a deal closes
- Maintain consistent data across both platforms
Who is this guide for?
Prerequisites
- Active subscriptions to both Zoho CRM and Zoho Projects
- Administrator-level access in both applications
- Your Zoho Projects portal name (visible in your Zoho Projects URL)
- Your Zoho Projects portal ID (retrieved from your portal settings or the API)
- Basic understanding of how Zoho CRM layouts and custom fields work
Data centre note:
Step 1 — Set Up Custom Fields in Zoho Projects
How to add custom fields in Zoho Projects
- Log in to your Zoho Projects account and open your portal.
- Click the Settings icon (gear icon) in the top navigation bar.
- Navigate to the Customization tab in the settings menu.
- Under Layouts & Fields, select Projects to edit the project layout.
- Click Add Section to create a logical grouping for your new fields. For this example, name it Projection Details.
- Within that section, add the fields your business needs. In our example, we add: No. of Repeated Orders, Repeat Frequency, Repeat Order Date, and Project Timeline Status.
- Save your layout changes.
Step 2 — Fetch Custom Field API Names via REST API
The API endpoint to use
https://projectsapi.zoho.in/restapi/portal/{portal_name}/projects/customfields/
Replace {portal_name} with your portal’s actual name.For example, if your portal name is honecoredotcom, the URL would be:
https://projectsapi.zoho.in/restapi/portal/honecoredotcom/projects/customfields/
This API call will return the list of API names for the custom fields, which will be needed in the Deluge script.
API Link : https://www.zoho.com/projects/help/rest-api/projects-api.html#alink3
You can test this directly in your browser (if you are logged in to Zoho) or using a tool such as Postman. The response will be a JSON object listing all custom fields associated with your Projects layout, including each field's display name and its API name.
Example: Custom field API names returned
| Field Label (Display Name) | Field Type | API Name |
|---|---|---|
| No. of Repeat Orders | Single Line Text | UDF_CHAR6 |
| Repeat Frequency | Single Line Text | UDF_CHAR9 |
| Repeat Order Date | Date | UDF_DATE1 |
| Project Timeline Status | Single Line Text | UDF_CHAR17 |
| Estimated Target BOM | Single Line Text | UDF_CHAR1 |
Important:The API names shown above are specific to the portal used in this example. Your portal will return different values. Always retrieve the API names from your own portal before writing the Deluge script.
Step 3 — Create an API Connection in Zoho CRM
- In Zoho CRM, click the Settings icon and go to Developer Hub.
- Under Developer Hub, click Connections and then New Connection.
- Choose Zoho OAuth as the connection type.
- Give the connection a name — in this guide, we use "zcrm".
- Under Scopes, add the following scope: zoho.projects.ALL. This grants the script full access to your Zoho Projects data.
- Click Create and Connect and authorize the connection through your Zoho account
Step 4 — Write the Deluge Script
Now that you have your custom field API names and an authorized connection, you are ready to write the Deluge function. This function will:
- Fetch the deal record from Zoho CRM using the Deal ID
- Build a map of project parameters, including standard and custom fields
- Call the Zoho Projects API to create a new project with those parameters
Creating the function in Zoho CRM
- In Zoho CRM, go to Settings → Developer Hub → Functions.
- Click New Function. Give it a descriptive name such as "Create_Project_From_Deal".
- Set the function argument to accept a Dealid parameter (type: String).
- Paste the Deluge code below into the editor.
Sample Deluge Code
Here is a sample Deluge script to fetch the deal details from Zoho CRM and create a new project in Zoho Projects:
Output :-
x
Note:- My Project Standard Layout Custom field API names which I got through the Api Hit :-
(url :"https://projectsapi.zoho.in/restapi/portal/"+"honecoredotcom"+"/projects/customfields/")
Understanding each section of the script
Step 5 — Test and Deploy the Function
Testing the function
- In the Deluge editor, click Test at the top of the page.
- When prompted, enter a valid Deal ID from your Zoho CRM. You can find this in the deal's URL (the long number at the end).
- Click Execute and review the output in the logs panel.
- A successful response will include a projects array in the output with the newly created project's details.
- Log in to Zoho Projects and confirm the project appears with the correct name and custom field values.
Triggering the function automatically
- Go to Settings → Automation → Workflows and create a new workflow for the Deals module.
- Set the workflow trigger condition to Stage is changed to Closed Won.
- Under Actions, select Custom Function and choose your function.
- Map the Dealid argument to ${Deals.Id}.
- Save and activate the workflow.
Tips, Troubleshooting & Best Practices
Best practices for production use
- Store your portal ID and portal name as Zoho CRM custom variables rather than hardcoding them in the script — this makes future updates easier.
- Add error handling using if (resp.get("error") != null) to catch and log API failures gracefully.
- Use the Zoho Projects API documentation to understand all available fields for the project creation endpoint before building complex scripts.
- Test in a sandbox environment before deploying to production, especially if the workflow will trigger on a high volume of deals.
- Keep the info GetProjectDetails debug call commented out in production — it adds unnecessary API calls.
Conclusion
Connecting Zoho Projects with Zoho CRM through Deluge scripting is a powerful way to eliminate manual handoffs between your sales and delivery teams. By following this guide, you have learned how to:
- Create and manage custom fields in the Zoho Projects layout
- Retrieve internal API names using the Zoho Projects REST API
- Build a secure, authorized connection between Zoho CRM and Zoho Projects
- Write and test a Deluge function that creates a project from a deal record
- Automate the entire flow using Zoho CRM workflows
With this foundation in place, you can expand the integration further — for example, updating the project when the deal is updated, or writing back the project URL to the CRM deal record for easy cross-referencing.
%20honecoredotcom%20-%20Task%20Templates%20-%20Google%20Chrome%204_24_2024%209_31_39%20PM%20(1).png)
%20honecoredotcom%20-%20Task%20Templates%20-%20Google%20Chrome%204_24_2024%209_44_50%20PM.png)