Get templates from Zoho Sign

Note:

  • Each time the zoho.sign.getTemplates 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.sign.getTemplates 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. 

Overview

The zoho.sign.getTemplates task is used to get the list of all templates from Zoho Sign.

Syntax

<response> = zoho.sign.getTemplates([<query_value>],[<connection>]);

where:

ParamsData typeDescription
<response>KEY-VALUEThe templates details that contain the template owner name, template ID and other templates specific information.

<query_value>

(optional)

KEY-VALUEThe query values. The keys to this parameter need to be provided as specified in the Zoho Sign API.

<connection>

(optional)*

TEXT

The name of the connection.

*Note: This param is not applicable to Zoho Creator and mandatory in Zoho Cliq.

Example

The following script fetches all templates from Zoho Sign:

 response = zoho.sign.getTemplates();

where:

response
The KEY-VALUE response that represents the template details.

Response

Success response

  • The success response will be returned in the following format:

     {
     "code":0,
     "templates":[
     {
     "owner_email":"shawn@zylker.com",
     "created_time":1572858733743,
     "email_reminders":true,
     "document_ids":[
     {
     "document_name":"art-background-blue-1037996.jpg",
     "document_size":1095706,
     "document_order":"0",
     "total_pages":1,
     "document_id":"10696000000010002"
     },
     {
     "document_name":"CRM_V2_equivalent_tasks.png",
     "document_size":96995,
     "document_order":"1",
     "total_pages":1,
     "document_id":"10696000000009014"
     }
     ],
     "notes":"",
     "reminder_period":5,
     "owner_id":"10696000000009003",
     "description":"",
     "template_name":"art-background-blue-1037996.jpg",
     "modified_time":1572865144905,
     "is_deleted":false,
     "expiration_days":15,
     "is_sequential":true,
     "template_id":"10696000000010001",
     "validity":-1,
     "request_type_name":"Others",
     "owner_first_name":"Shawn",
     "request_type_id":"10696000000000187",
     "owner_last_name":"M",
     "actions":[
     {
     "ishost":false,
     "verify_recipient":false,
     "role":"Role 1",
     "action_id":"10696000000010014",
     "action_type":"SIGN",
     "private_notes":"",
     "recipient_email":"hailee@zylker.com",
     "signing_order":1,
     "recipient_name":"Hailee",
     "recipient_phonenumber":"",
     "recipient_countrycode":""
     }
     ]
     },
     {
     "owner_email":"shawn@zylker.com",
     "created_time":1572860148596,
     "email_reminders":true,
     "document_ids":[
     {
     "document_name":"CRM_V2_equivalent_tasks.png",
     "document_size":96995,
     "document_order":"0",
     "total_pages":1,
     "document_id":"10696000000009027"
     }
     ],
     "notes":"",
     "reminder_period":5,
     "owner_id":"10696000000009003",
     "description":"",
     "template_name":"CRM_V2_equivalent_tasks.png",
     "modified_time":1572871750953,
     "is_deleted":false,
     "expiration_days":15,
     "is_sequential":true,
     "template_id":"10696000000009026",
     "validity":-1,
     "request_type_name":"Others",
     "owner_first_name":"Shawn",
     "request_type_id":"10696000000000187",
     "owner_last_name":"M",
     "actions":[
     {
     "ishost":false,
     "verify_recipient":false,
     "role":"Role 1",
     "action_id":"10696000000010023",
     "action_type":"SIGN",
     "private_notes":"",
     "recipient_email":"justin@zylker.com",
     "signing_order":1,
     "recipient_name":"Justin",
     "recipient_phonenumber":"",
     "recipient_countrycode":""
     },
     {
     "ishost":false,
     "verify_recipient":false,
     "role":"Role 2",
     "action_id":"10696000000010065",
     "action_type":"APPROVER",
     "private_notes":"",
     "recipient_email":"ben@zylker.com",
     "signing_order":2,
     "recipient_name":"Ben",
     "recipient_phonenumber":"",
     "recipient_countrycode":""
     }
     ]
     }
     ],
     "message":"Template list retrieved successfully",
     "page_context":{
     "sort_column":"template_name",
     "has_more_rows":false,
     "start_index":1,
     "total_count":2,
     "sort_order":"ASC",
     "row_count":2
     },
     "status":"success"
     }

To fetch the template ID from the response returned, execute the following script.

 res = <response>.get("templates").get(0).get("document_ids");
 for each var in res
 {
 info var.get("document_id");
 }

​Related Links