Send a Document for E-Signature with Zoho Sign from Zoho Creator

Send Documents for E-Signature with Zoho Sign from Zoho Creator

Of the three e-signature integrations in this library, this is the shortest — because Zoho Sign has native Deluge tasks and you never touch invokeurl. Save a record in Creator, and the contract goes out for signature with the client’s details already merged in.

The lightest touch in this section. This script was written recently and its structure was already right — the duplicate-send guard, the template merge-field mapping, and the response check all survive unchanged. Three things were tightened: the field_data map now includes the empty field_boolean_data and field_date_data keys the API expects, the action carries a role so it binds to the right template placeholder, and booleans are passed as real booleans rather than the strings "false" and "true". A named connection is also passed explicitly.

Before you start

  • A template in Zoho Sign with your signature and merge fields already placed, and its template ID.
  • The template’s action_id and role name. Fetch them once from GET /api/v1/templates/{template_id}.
  • A Zoho OAuth connection named zoho_sign_connection with ZohoSign.documents.CREATE and ZohoSign.templates.READ.
  • Three write-back fields: ZOHO_SIGN_REQ_ID, ZOHO_SIGN_DOCUMENT_ID, ZOHO_SIGN_RESPONSE.

Deluge script

// Trigger: On Success (after the record is saved in Creator)
// ============================================
// ZOHO SIGN — Send a document for e-signature
// ============================================

// Step 1: Do not send twice
if(input.ZOHO_SIGN_DOCUMENT_ID == null || input.ZOHO_SIGN_DOCUMENT_ID == "")
{
    // Step 2: Map Creator fields onto the template's merge fields
    fieldTextData = Map();
    fieldTextData.put("Client Name",input.Client_Name);
    fieldTextData.put("Client Email",input.Client_Email);
    fieldTextData.put("Contract Amount",input.Contract_Amount.toString());
    fieldTextData.put("Contract Date",zoho.currentdate.toString("MMM dd, yyyy"));
    fieldTextData.put("Company Name",input.Company_Name);

    fieldData = Map();
    fieldData.put("field_text_data",fieldTextData);
    fieldData.put("field_boolean_data",Map());
    fieldData.put("field_date_data",Map());

    // Step 3: Fill the template's existing action with a real recipient
    eachAction = Map();
    eachAction.put("action_id","YOUR_ACTION_ID");     // from the template
    eachAction.put("action_type","SIGN");
    eachAction.put("role","Client");                  // must match the template role
    eachAction.put("recipient_name",input.Client_Name);
    eachAction.put("recipient_email",input.Client_Email);
    eachAction.put("verify_recipient",false);

    actionList = List();
    actionList.add(eachAction);

    templates = Map();
    templates.put("request_name",input.Contract_Name);
    templates.put("field_data",fieldData);
    templates.put("actions",actionList);

    submitMap = Map();
    submitMap.put("templates",templates);

    parameters = Map();
    parameters.put("data",submitMap);
    parameters.put("is_quicksend",true);

    // Step 4: Native Deluge task. No invokeurl needed.
    response = zoho.sign.createUsingTemplate("YOUR_TEMPLATE_ID",parameters,"zoho_sign_connection");

    // Step 5: Write the identifiers back
    respStr = response.toString();
    if(respStr.contains("request_id"))
    {
        requests = response.get("requests");
        input.ZOHO_SIGN_REQ_ID = requests.get("request_id");
        input.ZOHO_SIGN_DOCUMENT_ID = requests.get("document_ids").get(0).get("document_id");
        input.ZOHO_SIGN_RESPONSE = respStr;
        info "Zoho Sign request sent: " + input.ZOHO_SIGN_REQ_ID;
    }
    else
    {
        input.ZOHO_SIGN_RESPONSE = "ERROR: " + respStr;
        info "Zoho Sign error: " + respStr;
    }
}
else
{
    info "Already sent. Document ID: " + input.ZOHO_SIGN_DOCUMENT_ID;
}

Notes

  • Use a template, not a raw file. The file-based route (POST /api/v1/requests then /submit) makes you specify every field placement by page number and pixel coordinate, and that is where most integrations break. A template has the placements baked in.
  • You cannot add signers. The number of actions is fixed by the template — you fill in who each existing role is, you do not append new ones.
  • is_quicksend controls delivery. true sends straight away; false leaves it in Zoho Sign for a human to review first.
  • Datacentres matter. Zoho Sign lives at sign.zoho.com, .eu, .in, .com.au, .jp, and sign.zohocloud.ca for Canada. Your OAuth token has to come from the matching accounts.zoho.<dc> domain. The native Deluge task handles this; direct invokeurl calls do not.
  • Fall back to invokeurl for the rest. Recalling a request, sending reminders and downloading the completed PDF have no native task — call them with connection:"zoho_sign_connection". The auth header is Zoho-oauthtoken, not Bearer.

This script is part of the free Creator Scripts Deluge Library.

All 39 Deluge scripts, the full Zoho Creator course, and every downloadable asset are now free. Get free access →