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,
Back to Docusign.com
