Question

Receiving INVALID_EMAIL_ADDRESS_FOR_RECIPIENT on few out of 130 templates. Here is the two JSON requests sent to DocuSign REST API v2:

{"status":"sent","emailBlurb":"","emailSubject":"Please DocuSign this document: blah blah blah",
"templateId":"308B68BB-85B7-42A0-8D11-7DF84F485681",
"customFields":{"textCustomFields":[{"name":"TAMID","value":"XXXXXXX"}]},
"templateRoles":[{"email":"dsmith16@answerfinancial.com","name":"Melinda Nelson","roleName":"Client"}]}

{"status":"sent","emailBlurb":"","emailSubject":"Please DocuSign this document: blah blah blah",
"templateId":"99EAF489-FA43-4943-A5EE-530D5888D078",
"customFields":{"textCustomFields":[{"name":"TAMID","value":"XXXXXXX"}]},
"templateRoles":[{"email":"dsmith16@answerfinancial.com","name":"Melinda Nelson","roleName":"Client"}]}

The first one returns INVALID_EMAIL_ADDRESS_FOR_RECIPIENT error code, while the second one is properly "sent". I looked at the templates and they seem identical besides the content of the document itself. Anyone have experienced similar problems, have solution? Any help is appreciated.

Here are two almost identical template XMLs. The one with "(Bad Code)" in the name returns error 100% of the time. PDFBytes node contents removed.

<?xml version="1.0" encoding="utf-8"?>
<EnvelopeTemplate xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.docusign.net/API/3.0">
<EnvelopeTemplateDefinition>
    <TemplateID>3fb25b02-eabc-49c1-b904-3d04a3601abd</TemplateID>
    <Name>MO 100 Producer Service Agreement (Bad Code)</Name>
    <Shared>true</Shared>
    <TemplatePassword/>
    <TemplateDescription>MO 100 Producer Service Agreement</TemplateDescription>
    <LastModified>2014-01-08T22:21:09.813</LastModified>
    <PageCount>1</PageCount>
</EnvelopeTemplateDefinition>
<Envelope>
    <AccountId>736c1f32-6c73-4798-b67b-de3f6a1a61bc</AccountId>
    <Documents>
        <Document>
            <ID>1</ID>
            <Name>MO_100_R_Producer Service Agreement.pdf</Name>
            <PDFBytes/>
        </Document>
    </Documents>
    <Recipients>
        <Recipient>
            <ID>1</ID>
            <UserName/>
            <Email/>
            <Type>Signer</Type>
            <AccessCode/>
            <RequireIDLookup>false</RequireIDLookup>
            <SAMLAuthentication>
                <SAMLAttributes/>
            </SAMLAuthentication>
            <RoutingOrder>1</RoutingOrder>
            <Note/>
            <RoleName>Client </RoleName>
            <TemplateLocked>true</TemplateLocked>
            <TemplateRequired>true</TemplateRequired>
            <SignInEachLocation>false</SignInEachLocation>
        </Recipient>
    </Recipients>
    <Tabs>
        <Tab>
            <DocumentID>1</DocumentID>
            <RecipientID>1</RecipientID>
            <PageNumber>1</PageNumber>
            <XPosition>136</XPosition>
            <YPosition>519</YPosition>
            <ScaleValue>1</ScaleValue>
            <Type>SignHere</Type>
            <Name>Sign Here</Name>
            <TabLabel>Signature 1</TabLabel>
            <Value/>
            <TemplateLocked>false</TemplateLocked>
            <TemplateRequired>false</TemplateRequired>
            <Bold>false</Bold>
            <Italic>false</Italic>
            <Underline>false</Underline>
        </Tab>
        <Tab>
            <DocumentID>1</DocumentID>
            <RecipientID>1</RecipientID>
            <PageNumber>1</PageNumber>
            <XPosition>120</XPosition>
            <YPosition>608</YPosition>
            <ScaleValue>1</ScaleValue>
            <Type>DateSigned</Type>
            <Name>Date Signed</Name>
            <TabLabel>Date Signed</TabLabel>
            <Value/>
            <TemplateLocked>false</TemplateLocked>
            <TemplateRequired>false</TemplateRequired>
            <Bold>false</Bold>
            <Italic>false</Italic>
            <Underline>false</Underline>
        </Tab>
    </Tabs>
    <Subject>Please DocuSign this document: Producer Service Agreement MO</Subject>
    <EmailBlurb/>
    <SigningLocation>Online</SigningLocation>
    <CustomFields>
        <CustomField>
            <Name>TAMID</Name>
            <Show>True</Show>
            <Required>True</Required>
            <Value/>
        </CustomField>
    </CustomFields>
    <AutoNavigation>true</AutoNavigation>
    <EnvelopeIdStamping>true</EnvelopeIdStamping>
    <AuthoritativeCopy>false</AuthoritativeCopy>
    <Notification>
        <Reminders>
            <ReminderEnabled>false</ReminderEnabled>
            <ReminderDelay>0</ReminderDelay>
            <ReminderFrequency>0</ReminderFrequency>
        </Reminders>
        <Expirations>
            <ExpireEnabled>true</ExpireEnabled>
            <ExpireAfter>120</ExpireAfter>
            <ExpireWarn>0</ExpireWarn>
        </Expirations>
    </Notification>
    <EnforceSignerVisibility>false</EnforceSignerVisibility>
    <EnableWetSign>true</EnableWetSign>
    <AllowMarkup>false</AllowMarkup>
    <AllowReassign>true</AllowReassign>
</Envelope>


<?xml version="1.0" encoding="utf-8"?>
<EnvelopeTemplate xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.docusign.net/API/3.0">
<EnvelopeTemplateDefinition>
    <TemplateID>f8dba6af-5875-4a81-887a-28096b876c5c</TemplateID>
    <Name>MO 100 Producer Service Agreement</Name>
    <Shared>true</Shared>
    <TemplatePassword/>
    <TemplateDescription>MO 100 Producer Service Agreement</TemplateDescription>
    <LastModified>2014-01-08T22:23:50.34</LastModified>
    <PageCount>1</PageCount>
</EnvelopeTemplateDefinition>
<Envelope>
    <AccountId>736c1f32-6c73-4798-b67b-de3f6a1a61bc</AccountId>
    <Documents>
        <Document>
            <ID>1</ID>
            <Name>MO_100_R_Producer Service Agreement.pdf</Name>
            <PDFBytes/>
        </Document>
    </Documents>
    <Recipients>
        <Recipient>
            <ID>1</ID>
            <UserName/>
            <Email/>
            <Type>Signer</Type>
            <AccessCode/>
            <RequireIDLookup>false</RequireIDLookup>
            <SAMLAuthentication>
                <SAMLAttributes/>
            </SAMLAuthentication>
            <RoutingOrder>1</RoutingOrder>
            <Note/>
            <RoleName>Client</RoleName>
            <TemplateLocked>true</TemplateLocked>
            <TemplateRequired>true</TemplateRequired>
            <SignInEachLocation>false</SignInEachLocation>
        </Recipient>
    </Recipients>
    <Tabs>
        <Tab>
            <DocumentID>1</DocumentID>
            <RecipientID>1</RecipientID>
            <PageNumber>1</PageNumber>
            <XPosition>137</XPosition>
            <YPosition>519</YPosition>
            <ScaleValue>1</ScaleValue>
            <Type>SignHere</Type>
            <Name>Sign Here</Name>
            <TabLabel>Signature 1</TabLabel>
            <Value/>
            <TemplateLocked>false</TemplateLocked>
            <TemplateRequired>false</TemplateRequired>
            <Bold>false</Bold>
            <Italic>false</Italic>
            <Underline>false</Underline>
        </Tab>
        <Tab>
            <DocumentID>1</DocumentID>
            <RecipientID>1</RecipientID>
            <PageNumber>1</PageNumber>
            <XPosition>120</XPosition>
            <YPosition>609</YPosition>
            <ScaleValue>1</ScaleValue>
            <Type>DateSigned</Type>
            <Name>Date Signed</Name>
            <TabLabel>Date Signed</TabLabel>
            <Value/>
            <TemplateLocked>false</TemplateLocked>
            <TemplateRequired>false</TemplateRequired>
            <Bold>false</Bold>
            <Italic>false</Italic>
            <Underline>false</Underline>
        </Tab>
    </Tabs>
    <Subject>Please DocuSign this document: MO_100_R_Producer Service Agreement.pdf</Subject>
    <EmailBlurb/>
    <SigningLocation>Online</SigningLocation>
    <CustomFields>
        <CustomField>
            <Name>TAMID</Name>
            <Show>True</Show>
            <Required>True</Required>
            <Value/>
        </CustomField>
    </CustomFields>
    <AutoNavigation>true</AutoNavigation>
    <EnvelopeIdStamping>true</EnvelopeIdStamping>
    <AuthoritativeCopy>false</AuthoritativeCopy>
    <Notification>
        <Reminders>
            <ReminderEnabled>false</ReminderEnabled>
            <ReminderDelay>0</ReminderDelay>
            <ReminderFrequency>0</ReminderFrequency>
        </Reminders>
        <Expirations>
            <ExpireEnabled>true</ExpireEnabled>
            <ExpireAfter>120</ExpireAfter>
            <ExpireWarn>0</ExpireWarn>
        </Expirations>
    </Notification>
    <EnforceSignerVisibility>false</EnforceSignerVisibility>
    <EnableWetSign>true</EnableWetSign>
    <AllowMarkup>false</AllowMarkup>
    <AllowReassign>true</AllowReassign>
</Envelope>

The only solution I've got so far is to re-create the templates. Not a big deal besides all the related headache associated with it, but this looks like a bug to me. May be DocuSign guys will have time to look at it some time.

Was it helpful?

Solution

I believe I can see the problem- I did a diff of your two template definitions and see one difference that could be causing your issue. If you look at the template role for each template, the GOOD template looks like this:

<RoleName>Client</RoleName>

and the BAD template has it's role like this:

<RoleName>Client </RoleName>

That extra space after Client is most likely causing your issue. To resolve, try exporting the bad template through the UI, remove the space, then re-upload and that should do the trick.

OTHER TIPS

Your JSON looks valid to me, but without also seeing the XML for each of the Templates that you're using to send (the one that fails and the one that succeeds), it's hard to provide much feedback beyond that. (If you can download the Template XML for each template, remove PDF bytes from the XML (for brevity), and update your question to include the XML for each template, I'll be happy to review and provide further feedback.)

These (somewhat recent) posts in the (old) DocuSign Dev Forum seem to describe a similar issue:

The final thread in the first of these two posts mentions a DocuSign bug # (26473). Perhaps someone with DocuSign can chime in on this thread with an update on that bug status, on the off chance that it's behind the issues you're experiencing.

You receive the error Invlid_email_address_for_recipient but you haven't used the recipient email in your program just yet.

Use your email address (one for docusign account) and not the docusign guid of the email on your account.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top