Choose where you’d like to start

Create Record in Zoho Project

Description

The zoho.projects.create task creates a new record in the specified Zoho Projects module.

Note: For security reasons, if you execute Zoho Projects integration tasks for more than 100 times under 2 minutes, you will be restricted to execute any Zoho Projects integration task for the next 30 mins.

Syntax

<response> = zoho.projects.create(<portal>, <project_id>, <module>, <data_map>, [<connection>]);

where:

ParamsData typeDescription

<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:

  • milestones
  • taskLists
  • tasks
  • bugs
  • comments
  • logs

<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
The KEY-VALUE response returned by Zoho Projects. It represents the details of the task that will be created.
"zylker"
The TEXT that represents the name of the portal.
548XXXXXXXXXXX771
The NUMBER that represents the ID of the project.
"tasks"
The TEXT that represents the name of the module in which the record needs to be created.
values_map
The KEY-VALUE variable that holds the values of the new record.

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"
      }

Related Links

Get Started Now

Execute