docusignapidocusignconnectdocusign-sdk

Issue Triggering Workflow with Maestro API: Unable to Retrieve TriggerURL and TriggerWorkflow Errors


We’re trying to build an app using the Maestro API. We’re following the documentation on your webpage.

We started with your documentation on How to trigger a Maestro workflow. Here, we:

  1. Are able to the authentication token
  2. Are able to construct your API headers

The problem starts with step 3 onwards. We couldn’t retrieve the triggerURL using the server code, however we can get the workflow definitions using the getWorkflowDefinitions API reference.

Then we tried to trigger the workflow using the triggerWorkflow API reference, and we ran into errors. We used the following payload:

{
  "instanceName": "New Docusign Instance",
  "payload": {
    "abcEmail": "abc@example.com",
    "abcName": "ABC",
    "xyzEmail": "xyz@example.com",
    "xyzName": "XYZ",
    "xyzCode": "IN11"
  }
}

Please let me know of any extra details you require


Solution

  • UPDATE: in addition to the general information below you are missing a property in your JSON.

    The correct JSON should look like this:

    {
      "instanceName": "New Docusign Instance",
      "participants": {},
      "payload": {
        "abcEmail": "abc@example.com",
        "abcName": "ABC",
        "xyzEmail": "xyz@example.com",
        "xyzName": "XYZ",
        "xyzCode": "IN11"
      },
      "metadata": {
        "customAttributes": {}
      }
    }
    

    First, you didn't explain what error messages you are getting, please let us know.

    You need to do the following:

    First call getWorkflowDefinition which returns the triggerURI, you said you couldn't do that, but you need to do that in order to continue.

    Call /aow-manage/v1.0/management/accounts/{accountId}/workflowDefinitions/{workflowDefinitionId} and make sure to replace your accountId and workflowDefinitionId (that is the ID or GUID of your specific workflow)

    Then you make a POST call to the triggerURI you obtained with a JSON body similar to the one that you had in your answer. That will work, I tried it myself.

    Highly recommend you download our quickstart code and run this example from there, you can pick one of 8 coding languages.