Skip to main content

I want to use the DocuSign API to send different custom emails to different recipients of the same envelope. I gather this can be done in normal cases using the emailNotification parameter when creating a signer recipient, but I’m sending custom-branded HTML emails using an email resource file. When I try sending a test envelope with the parameter - "signers":s{..."emailNotification":{"emailBody":"TEST EMAIL BODY","emailSubject":"TEST EMAIL SUBJECT"}}] - it’s ignored and I get the regular branded email from my resource file.

Is there a way to create separate emails for different recipients of the same envelope while using an email resource file? Should I be able to insert custom text within EnvelopeActivation_HtmlBody in the resource file using coData:emailnotification.emailbody]], or else an Envelope Custom Field or something?

Are you also providing a supportedLanguage like en?  That is required for this to work.


After much trial and error, I answered my own question. If you pass different emailNotification parameter values for each recipient, you can access those parameter values within your email resource file:

  • emailNotification.emailSubject populates the [[Data:SubjectInput]] field in the email resource file
  • emailNotification.emailBody populates the [[Data:EmailBlurb]] field in the email resource file

There’s a 10,000-character limit on the emailBody. In practice, this means you can’t create completely different HTML emails for each recipient, but you can customize the text. You can even slip some HTML into the emailBody and it’ll render - though the fancier you try to get, the more you’re pushing your luck.

One warning: by default, any custom emailBody you set will also be visible in the header of the signing page. If you don’t want that, you can prevent it by customizing your signing resource file with the following extra line: <data name="DocuSign_WelcomeDialogHideEmailContent">true</data>


Reply