Skip to main content
Newcomer
Nov 3, 2025 4:52 AM UTC
Question

400 Error: UNPROCESSABLE_ENTITY when creating envelope from template via API (using n8n + OAuth2)

Hi everyone,

I’m trying to send an envelope using the DocuSign eSignature REST API from an n8n automation workflow, but I’m getting a 400 - UNPROCESSABLE_ENTITY error when using a template.

Here’s the full request body I’m sending:

{
  "emailSubject": "Please sign this document",
  "templateId": "b19401de-25af-426b-addc-c290c0ef0753",
  "templateRoles": [
    {
      "email": "abc@gmail.com",
      "name": “Group",
      "roleName": "BCBA"
    }
  ],
  "status": "sent",
  "eventNotification": {
    "url": "",
    "loggingEnabled": true,
    "requireAcknowledgment": true,
    "envelopeEvents": [
      {
        "envelopeEventStatusCode": "Completed",
        "includeDocuments": true
      }
    ]
  }
}


 

And here’s the error response:

400 - {"errorCode":"UNPROCESSABLE_ENTITY","message":"The entity could not be processed."}

Request details:

  • Endpoint: https://demo.docusign.net/restapi/v2.1/accounts/a66ffa71-c12f-4cab-b5ae-854d3c378e3f/envelopes

  • Auth type: OAuth2 (Authorization Code grant)

  • Integration tool: n8n

  • Environment: Developer (demo)

  • Account type: Developer account (no templates created directly in this account; the template is from another connected DocuSign account)

What I’ve checked:

  • The role name (“BCBA”) matches exactly with the role defined in the template.

  • The email and name fields are valid.

  • The API call is properly authorized with a valid access token.
     

Question:

Could this error be due to using a template from another account (not the one the OAuth token belongs to)?
Or is there any specific field or configuration I might be missing in the API body?

Any help or insights from others who have faced this issue would be appreciated! 🙏

Thanks in advance,

1 reply

JohnSantos
Guru
Guru
Nov 3, 2025 3:38 PM UTC

​@zang2012 

  • Try moving the Template to the Demo account where you are sending the request.  You should post to the base URI and accountId of the account that owns the template.
  • You left eventNotification.url empty. That field is required if you include eventNotification. If you don’t need Connect callbacks, remove the whole block.
  • envelopeEventStatusCode is case-sensitive. Use "completed", not "Completed"
  • includeDocuments belongs on eventNotification (top level), not inside each envelopeEvents item.

 

 

Translate
Welcome to the DocuSign Community! Your feedback is highly valued. If you find my response helpful, please give it a "Like" and consider marking it as the "Best Answer" to assist others with similar issues.