Create Project in Zoho Projects
Table of Contents
Note:
- Each time the zoho.projects.createProject integration task is executed, it triggers an API request in the back-end. This call is deducted from the external calls limit available for the service from which the task is executed, based on your pricing plan.
- Only actual executions that receive a response (whether success or failure) are counted, not the number of times the task appears in the script. For example, if zoho.projects.createProject integration task is placed inside a for each task that iterates five times, the number of external calls consumed will be five, even though the task appears only once in the script.
Description
The zoho.projects.createProject task creates a project in the specified portal of Zoho Projects.
Syntax
<response>=zoho.projects.createProject(<portal>, [<values>], [<connection>]);
where:
| Params | Data type | Description |
| <response> | KEY-VALUE | The details of the project that will be created. |
| <portal> | TEXT | The name of the portal in which the project needs to be created. Note: You can get the name or ID of the portal using the get portals task. Click here to learn more about it. |
| <values> | KEY-VALUE | The values of the project that needs to be created. The keys to this parameter are provided as specified in the Zoho Projects API. |
<connection> (optional) | TEXT | The link name of the connection. |
Note:
In integration tasks, the parameters must be in the defined order as given in the syntax, for the Deluge task to be executed. If you choose to use an optional parameter, ensure that all preceding parameters in the syntax are explicitly specified. If a preceding optional parameter is not required, a null value can be assigned instead, to maintain the defined syntax order.
For example, in the below syntax, options_map and connection are optional parameters:
<variable> = zoho.crm.v8.task (<module_name>, <record_details>, <options_map>, <connection>);
If you want to use the connection parameter, module_name, record_details and options_map must be specified in the
exact order as the syntax. You can assign an empty map to the options_map parameter if it is not required.
Example
The following script creates a new project in the Zoho Projects portal - zylker:
new_project = Map(); new_project . put("name", "Sales"); response = zoho.projects.createProject("zylker", new_project);
where:
response"zylker"new_projectResponse Format
Success Response
The success response will be returned in the following format:
{
"projects": [
{
"is_strict": "no",
"project_percent": "0",
"role": "admin",
"bug_count": {
"closed": 0,
"open": 0
},
"IS_BUG_ENABLED": true,
"owner_id": "58XXXX70",
"taskbug_prefix": "SA1",
"link": {
"activity": {
"url": "https://projects.zoho.com/restapi/portal/zylker/projects/548XXXXXXXXXXX005/activities/"
},
"document": {
"url": "https://projects.zoho.com/restapi/portal/zylker/projects/548XXXXXXXXXXX005/documents/"
},
"forum": {
"url": "https://projects.zoho.com/restapi/portal/zylker/projects/548XXXXXXXXXXX005/forums/"
},
"timesheet": {
"url": "https://projects.zoho.com/restapi/portal/zylker/projects/548XXXXXXXXXXX005/logs/"
},
"task": {
"url": "https://projects.zoho.com/restapi/portal/zylker/projects/548XXXXXXXXXXX005/tasks/"
},
"folder": {
"url": "https://projects.zoho.com/restapi/portal/zylker/projects/548XXXXXXXXXXX005/folders/"
},
"milestone": {
"url": "https://projects.zoho.com/restapi/portal/zylker/projects/548XXXXXXXXXXX005/milestones/"
},
"bug": {
"url": "https://projects.zoho.com/restapi/portal/zylker/projects/548XXXXXXXXXXX005/bugs/"
},
"self": {
"url": "https://projects.zoho.com/restapi/portal/zylker/projects/548XXXXXXXXXXX005/"
},
"tasklist": {
"url": "https://projects.zoho.com/restapi/portal/zylker/projects/548XXXXXXXXXXX005/tasklists/"
},
"event": {
"url": "https://projects.zoho.com/restapi/portal/zylker/projects/548XXXXXXXXXXX005/events/"
},
"user": {
"url": "https://projects.zoho.com/restapi/portal/zylker/projects/548XXXXXXXXXXX005/users/"
},
"status": {
"url": "https://projects.zoho.com/restapi/portal/zylker/projects/548XXXXXXXXXXX005/statuses/"
}
},
"custom_status_id": "548XXXXXXXXXXX089",
"milestone_count": {
"closed": 0,
"open": 0
},
"updated_date_long": 156XXXXXXX812,
"show_project_overview": false,
"task_count": {
"closed": 0,
"open": 0
},
"updated_date_format": "08-13-2019 04:32:05 PM",
"workspace_id": "o5cfkXXXXXXXXXXXXXXXXXXXXXXXXXXX99595",
"custom_status_name": "zp.projstatus.active",
"bug_defaultview": "6",
"billing_status": "Billable",
"id": 548XXXXXXXXXXX005,
"key": "TE-3",
"is_chat_enabled": true,
"custom_status_color": "#33927d",
"owner_name": "Shawn",
"created_date_long": 1565694125812,
"created_date_format": "08-13-2019 04:32:05 PM",
"profile_id": 548XXXXXXXXXXX320,
"enabled_tabs": [
"dashboard",
"projectfeed",
"tasks",
"bugs",
"milestones",
"calendar",
"documents",
"timesheet",
"invoices",
"users",
"reports"
],
"name": "Sales",
"is_public": "no",
"id_string": "548XXXXXXXXXXX005",
"created_date": "08-13-2019",
"updated_date": "08-13-2019",
"bug_prefix": "SA1-I",
"cascade_setting": {
"date": false,
"percentage": false,
"workHours": false,
"logHours": false,
"plan": true
},
"layout_details": {
"task": {
"name": "default",
"id": "548XXXXXXXXXXX005"
},
"project": {
"name": "zp.customfields.defaultlayout",
"id": "548XXXXXXXXXXX008"
}
},
"status": "active"
}
]
}
Failure Response
The failure response for invalid portal name will be returned in the following format:
{
{
"error": {
"code": 6504,
"message": "Domain Not Available"
}
}The failure response for missing mandatory field in input values will be returned in the following format:
{
{
"error": {
"code": 6831,
"message": "Input Parameter Missing"
}
}