Create Record in Zoho Project
Table of Contents
Description
The zoho.projects.create task creates a new record in the specified Zoho Projects module.
Syntax
<response> = zoho.projects.create(<portal>, <project_id>, <module>, <data_map>, [<connection>]);
where:
Params | Data type | Description |
<response> | KEY-VALUE | The details of the records that will be created in the specified Zoho Projects module. |
<portal> | TEXT/ NUMBER | The name or ID of the portal. Note: You can get the name or ID of the portal using the get portals task. Click here to learn more about it. |
<project_id> | NUMBER | The ID of the project. Note: You can get project_id using the get project details task. Click here to learn more about it. |
<module> | TEXT | The name of the module in which the record needs to be created. Allowed values:
|
<data_map> | KEY-VALUE | The parameters, as specified in the Zoho Projects API. The API documents for all the allowed modules are listed below: |
<connection> (optional) | TEXT | The link name of the connection. Note: This parameter is applicable to all Zoho services that have connections support, except Zoho Creator. |
Example
The following script creates a record in the Zoho Projects module - Tasks with the specified values:
values_map = Map(); values_map.put("name", "Document Review"); response = zoho.projects.create("zylker", 548XXXXXXXXXXX771, "tasks", values_map);
where:
response
"zylker"
548XXXXXXXXXXX771
"tasks"
values_map
Response Format
Success Response
The success response will be returned in the following format:
{
{
"tasks": [
{
"milestone_id": "548XXXXXXXXXXX092",
"link": {
"timesheet": {
"url": "https://projects.zoho.com/restapi/portal/zylker/projects/548XXXXXXXXXXX771/tasks/548XXXXXXXXXXX011/logs/"
},
"self": {
"url": "https://projects.zoho.com/restapi/portal/zylker/projects/548XXXXXXXXXXX771/tasks/548XXXXXXXXXXX011/"
}
},
"is_comment_added": false,
"duration": "0",
"last_updated_time_long": 1566296841000,
"is_forum_associated": false,
"details": {
"owners": [
{
"name": "Unassigned"
}
]
},
"id": 548XXXXXXXXXXX011,
"key": "OR1-T6",
"created_person": "Shawn",
"created_time_long": 1566296841183,
"created_time": "08-20-2019",
"is_reminder_set": false,
"is_recurrence_set": false,
"created_time_format": "08-20-2019 03:57:21 PM",
"subtasks": false,
"work": "0:00",
"isparent": false,
"duration_type": "days",
"work_type": "work_hrs_per_day",
"task_followers": {
"FOLUSERS": "",
"FOLLOWERSIZE": -1,
"FOLLOWERS": [
]
},
"completed": false,
"priority": "None",
"created_by": "58131170",
"percent_complete": "0",
"last_updated_time": "08-20-2019",
"name": "Document Review",
"id_string": "548XXXXXXXXXXX011",
"last_updated_time_format": "08-20-2019 03:57:21 PM",
"tasklist": {
"name": "General",
"id": "548XXXXXXXXXXX003"
},
"order_sequence": 2,
"status": {
"name": "Open",
"id": "548XXXXXXXXXXX001",
"type": "open",
"color_code": ""
}
}
]
}
Failure Response
The failure response for invalid project ID will be returned in the following format:
{
"error": {
"code": 6404,
"message": "Resource Not Found"
}
}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 invalid portal ID will be returned in the following format:
{
"error": {
"code": 6500,
"message": "General Error"
}
}The failure response for missing mandatory field in input values will be returned in the following format:
{
"error": {
"code": 6831,
"message": "Input Parameter Missing"
}