Pull Adobe Acrobat Sign Agreements into Zoho Creator with Deluge

Sync Adobe Acrobat Sign Agreements into Zoho Creator

If your agreements live in Adobe Acrobat Sign but your operations live in Zoho, you end up checking two systems to answer one question. This function pulls agreements and their status into a Creator form so you can report on signature progress next to everything else.

Almost none of the original still applies. It was written against EchoSign, which became Adobe Sign and is now Adobe Acrobat Sign, and every layer changed underneath it. The API version went from v4 to v6. Authentication changed: v6 rejects the old Access-Token header and requires Authorization: Bearer. And the host is no longer generic — calls now go to a shard such as api.na4.adobesign.com, and the wrong one returns INVALID_API_ACCESS_POINT. The old api.echosign.com hostnames do still answer, but they are undocumented legacy with no published retirement date.

Two real bugs in the original, worth knowing about. First, it parsed a JSON response with executeXPath, building parallel lists of names, emails and statuses. Second — and this is the one that silently corrupted data — the index counter i was incremented inside the “agreement not already stored” branch, while the loop advanced regardless. The moment one agreement was already in the table, every subsequent record got another agreement’s name, email and status. It also began by deleting the entire table on every run, and compared with a single =. The rewrite reads each field from the agreement object it belongs to, so there is no counter to get out of step.

Before you start

  • An integration key from Acrobat Sign: Account Settings → Acrobat Sign API → API Applications. Integration keys do not expire, which is what makes them workable for an unattended script — Acrobat Sign has no client_credentials grant.
  • An EcoSign_Data form with Agreement_ID, Name, Email, Status.
  • Store the key in a Creator variable. It is shown inline below only for readability.

Deluge function

// ============================================
// ADOBE ACROBAT SIGN -> ZOHO CREATOR
// Pulls agreements and their signed-document URLs into a Creator form.
// ============================================

void Updates.syncAgreements()
{
    INTEGRATION_KEY = "YOUR_ACROBAT_SIGN_INTEGRATION_KEY";

    headerMap = Map();
    headerMap.put("Authorization","Bearer " + INTEGRATION_KEY);

    // --- 1. Find your shard. Wrong shard = INVALID_API_ACCESS_POINT. ---
    baseResp = invokeurl
    [
        url  : "https://api.na1.adobesign.com/api/rest/v6/baseUris"
        type : GET
        headers : headerMap
    ];
    apiBase = baseResp.getJSON("apiAccessPoint");     // e.g. https://api.na4.adobesign.com/
    if(apiBase == null)
    {
        info "Could not resolve Acrobat Sign shard: " + baseResp.toString();
        return;
    }

    // --- 2. List agreements ---
    agreementsResp = invokeurl
    [
        url  : apiBase + "api/rest/v6/agreements"
        type : GET
        headers : headerMap
    ];

    agreements = agreementsResp.getJSON("userAgreementList");
    if(agreements == null)
    {
        info "Acrobat Sign error: " + agreementsResp.toString();
        return;
    }

    // --- 3. Upsert each agreement. No table wipe, no index counter. ---
    for each agreement in agreements
    {
        agreementId = agreement.getJSON("id");
        existing = EcoSign_Data[Agreement_ID == agreementId];

        if(existing.count() == 0)
        {
            // Every field is read from THIS agreement, so nothing can misalign
            signerEmail = "";
            participants = agreement.getJSON("participantSetsInfo");
            if(participants != null && participants.size() > 0)
            {
                members = participants.get(0).getJSON("memberInfos");
                if(members != null && members.size() > 0)
                {
                    signerEmail = members.get(0).getJSON("email");
                }
            }

            insert into EcoSign_Data
            [
                Added_User   = zoho.loginuser
                Agreement_ID = agreementId
                Name         = agreement.getJSON("name")
                Status       = agreement.getJSON("status")
                Email        = signerEmail
            ];
        }
        else
        {
            // Refresh status on agreements already stored
            rec = existing;
            rec.Status = agreement.getJSON("status");
        }
    }
}

Notes

  • The endpoint is baseUris, camelCase. Adobe’s own best-practices page writes it as base_uris — that is the v5 spelling and returns 404 NOT_FOUND on v6. This one costs people an afternoon.
  • Resolve the shard once, then cache it. Any valid shard will answer /baseUris and tell you the right one. Store apiAccessPoint and only look it up again if a call returns INVALID_API_ACCESS_POINT.
  • Do not poll in a loop. Acrobat Sign added dynamic throttling — you will get 429 with a Retry-After header, and there is now a limit on repeated identical GETs. For status changes, use their webhooks and let Acrobat Sign call you.
  • Sending, not just reading. The outbound direction is two calls: POST the file to /api/rest/v6/transientDocuments as multipart, then POST to /api/rest/v6/agreements with that transientDocumentId and "state":"IN_PROCESS". A transient document stays valid about seven days.

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 →

    • Related Articles

    • 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 ...
    • Send Documents for Signature with the Docusign API from Zoho Creator

      This function takes a Zoho Creator record, renders it to PDF, and sends it to a client for signature through Docusign — writing the envelope ID back onto the record so you can track it. Authentication runs through a Creator OAuth connection, so Zoho ...
    • Integrating Zoho Creator with ChatGPT Using Deluge Script

      This script wires an OpenAI chat model directly into a Zoho Creator form. The user types a prompt into a text field, Deluge calls the OpenAI API with invokeurl, and the generated text lands in an output field on the same record — no middleware, no ...
    • Sync Zoho Creator to Zoho Books and Zoho Invoice

      When the quote is approved in Creator, the invoice should already exist in Books. This function finds the customer (creating them if this is their first order), turns a Creator subform into invoice line items, and raises the invoice — writing the ...
    • Send Faxes with the RingCentral API from Zoho Creator

      This function sends a fax from a Zoho Creator record through the RingCentral API: it authenticates, caches the access token so you are not re-authenticating on every call, pulls a PDF from a Creator report, and posts it to RingCentral as a multipart ...